1. GW02
This manual provides essential information for programming the UpNode GW02 gateway adapter module. The UpNode GW02, is a pre-assembled PCB that integrates an STM32F103C8T6 Blue Pill development board, an A9G module, and a CC1101 RF module, offering a versatile platform for IoT and wireless communication projects.
1.1. Product Overview
1.1.1. Key Components
-
STM32F103C8T6 Blue Pill development board
-
A9G module (GPS, cellular connectivity, SD card support)
-
CC1101 RF module (range up to 500 meters)
-
ST-Link V2 programming port
-
DPDT switch for power management
1.2. Product Images
1.2.1. PCB Front and Back Views
1.2.2. 3D Views
1.3. Hardware Connections
1.3.1. CC1101 to Blue Pill Connections
CC1101 Pin | Blue Pill Pin | Function |
---|---|---|
1 (GND) |
GND |
Ground |
2 (VCC) |
3.3V |
Power |
3 (GDO0) |
PB0 |
General Digital Output 0 |
4 (CSN) |
PA4 |
SPI Chip Select |
5 (SCK) |
PA5 |
SPI Clock |
6 (MOSI) |
PA7 |
SPI MOSI |
7 (MISO) |
PA6 |
SPI MISO |
8 (GDO2) |
Not Connected |
Not used |
1.3.2. A9G Module to Blue Pill Connections
A9G Pin | Blue Pill Pin | Function |
---|---|---|
GND |
GND |
Ground |
VCC |
5V |
Power |
TXD |
PA10 |
UART1 RX |
RXD |
PA9 |
UART1 TX |
1.3.3. ST-Link V2 to Blue Pill Connections (Programming)
ST-Link V2 Pin | Blue Pill Pin | Function |
---|---|---|
6 (SWCLK) |
PA14 |
Serial Wire Clock |
2 (SWDIO) |
PA13 |
Serial Wire Data I/O |
4 (GND) |
GND |
Ground |
8 (3.3V) |
3.3V |
Power |
1.3.4. Power Management
The DPDT switch manages power supply and programming modes:
-
Position 1 (Normal Operation): 5V to STM32’s 5V input
-
Position 2 (Programming Mode): ST-Link 3.3V to STM32’s programming port
1.4. Development Environment Setup
The UpNode GW02 can be programmed using various development environments. This manual covers two popular options:
1.4.1. Option 1: Arduino IDE
-
Download and install the latest Arduino IDE from the official website.
-
Install STM32 board support:
-
Go to File > Preferences
-
Add the following URL to the "Additional Boards Manager URLs" field:
http://dan.drown.org/stm32duino/package_STM32duino_index.json
-
Go to Tools > Board > Boards Manager
-
Search for "STM32" and install the "STM32F1xx/GD32F1xx boards" package
-
-
Select the board: Tools > Board > STM32F1 Boards > BluePill F103C8
-
Install necessary libraries for A9G and CC1101 modules
1.4.2. Option 2: PlatformIO (VS Code)
-
Install Visual Studio Code
-
Install the PlatformIO extension for VS Code
-
Create a new project:
-
Select STM32F103C8 as the board
-
Choose Arduino as the framework
-
-
Configure
platformio.ini
file:
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = stlink
-
Install necessary libraries for A9G and CC1101 modules using PlatformIO’s library manager
1.5. Programming the UpNode GW02
1.5.1. Flashing the STM32F103C8T6
-
Connect ST-Link V2 to your computer via USB
-
Set DPDT switch to programming position (Position 2)
-
Connect ST-Link V2 to the programming port on the UpNode GW02
-
In your chosen IDE:
-
Write or open your program
-
Compile the code
-
Upload the program to the board
-
-
After programming, switch DPDT to normal operation (Position 1 (5V))
1.5.2. Programming the A9G Module
The A9G module offers GPS, cellular connectivity (including SMS and MQTT), and SD card support. Here’s a basic example to initialize the module and retrieve GPS data:
#include <SoftwareSerial.h>
SoftwareSerial a9gSerial(PA10, PA9); // RX, TX
void setup() {
Serial.begin(115200);
a9gSerial.begin(115200);
// Initialize A9G module
a9gSerial.println("AT");
delay(1000);
// Enable GPS
a9gSerial.println("AT+CGPS=1");
delay(1000);
}
void loop() {
// Request GPS information
a9gSerial.println("AT+CGPSINFO");
// Read and print response
while (a9gSerial.available()) {
Serial.write(a9gSerial.read());
}
delay(5000);
}
1.5.3. Programming the CC1101 RF Module
The CC1101 module allows for wireless communication with a range of up to 500 meters. Here’s a basic example to initialize the module and send data:
#include <ELECHOUSE_CC1101_SRC_DRV.h>
void setup() {
Serial.begin(115200);
// Initialize CC1101 module
ELECHOUSE_cc1101.Init();
ELECHOUSE_cc1101.setMHZ(433.92); // Set frequency
}
void loop() {
// Send data
const char* data = "Hello from UpNode GW02";
ELECHOUSE_cc1101.SendData(data, strlen(data));
Serial.println("Data sent");
delay(5000);
}
1.6. Advanced Features
1.6.1. A9G Module Capabilities
-
SMS: Send and receive text messages
-
MQTT: Connect to MQTT brokers for IoT applications
-
GPS: Retrieve location data
-
SD Card: Store and retrieve data locally
1.6.2. CC1101 Long-Range Communication
The CC1101 module can communicate up to 500 meters in optimal conditions. Factors affecting range include:
-
Antenna design and placement
-
Environmental obstacles
-
Transmission power settings
-
Data rate and modulation scheme
1.7. Troubleshooting
1.7.1. Common Programming Issues
-
Upload fails:
-
Check DPDT switch position
-
Verify ST-Link connections
-
Ensure correct board and port selection in IDE
-
-
A9G module not responding:
-
Check power supply
-
Verify UART connections in the program
-
Ensure correct baud rate
-
-
CC1101 communication issues:
-
Check antenna connection
-
Verify SPI pin connections
-
Ensure correct frequency settings
-
1.8. Suggestions for Improvement
Any suggestions or improvements for the UpNode GW02 is welcome. Please contact SiliconWit on GitHub or visit our community forums.
For detailed specifications or advanced usage, please refer to the individual component datasheets.
Add Comment
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Comments