Home Subscribe

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

  1. STM32F103C8T6 Blue Pill development board

  2. A9G module (GPS, cellular connectivity, SD card support)

  3. CC1101 RF module (range up to 500 meters)

  4. ST-Link V2 programming port

  5. DPDT switch for power management

1.2. Product Images

1.2.1. PCB Front and Back Views

Front PCB View
Back PCB View

1.2.2. 3D Views

3D Left View
3D Right View

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

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

  1. Download and install the latest Arduino IDE from the official website.

  2. Install STM32 board support:

    1. Go to File > Preferences

    2. Add the following URL to the "Additional Boards Manager URLs" field: http://dan.drown.org/stm32duino/package_STM32duino_index.json

    3. Go to Tools > Board > Boards Manager

    4. Search for "STM32" and install the "STM32F1xx/GD32F1xx boards" package

  3. Select the board: Tools > Board > STM32F1 Boards > BluePill F103C8

  4. Install necessary libraries for A9G and CC1101 modules

1.4.2. Option 2: PlatformIO (VS Code)

  1. Install Visual Studio Code

  2. Install the PlatformIO extension for VS Code

  3. Create a new project:

    1. Select STM32F103C8 as the board

    2. Choose Arduino as the framework

  4. Configure platformio.ini file:

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = stlink
  1. 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

  1. Connect ST-Link V2 to your computer via USB

  2. Set DPDT switch to programming position (Position 2)

  3. Connect ST-Link V2 to the programming port on the UpNode GW02

  4. In your chosen IDE:

    1. Write or open your program

    2. Compile the code

    3. Upload the program to the board

  5. 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

  1. SMS: Send and receive text messages

  2. MQTT: Connect to MQTT brokers for IoT applications

  3. GPS: Retrieve location data

  4. 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

  1. Upload fails:

    • Check DPDT switch position

    • Verify ST-Link connections

    • Ensure correct board and port selection in IDE

  2. A9G module not responding:

    • Check power supply

    • Verify UART connections in the program

    • Ensure correct baud rate

  3. 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

* Required information
1000
Drag & drop images (max 3)
What is the sum of 1 + 2 + 3?

Comments

No comments yet. Be the first!