Skip to content

Multihop Data Relay Implemented on TTGO-T-Beam -- The LoRa Module

License

Notifications You must be signed in to change notification settings

iPAS/TTGO-T-Beam_Multihop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multihop LoRa with TTGO-T-Beam

This project tries to implement multihopping data relay on the network of ESP32 modules -- TTGO-T-Beam nodes. It uses flood routing from the project: Flood Routing with Motelib.

Quick Start

Hardware Assembly

Connect T-Beam with UART-RS232

The firmware uses UART2 for communicating with the weather station through UART-232 module, while UART0 and UART1 are used for debugging and connecting with GPS respectively. The signal pins between the two modules are connected as following:

  • [T-Beam].2 (TXD2) <--> [UART-232].TXD
  • [T-Beam].13 (RXD2) <--> [UART-232].RXD
  • [T-Beam].GND <--> [UART-232].GND
  • [T-Beam].5V <--> [UART-232].VCC

Board connection

Connect T-Beam with Weather Station through UART-RS232

Board of the weather station sends data through DB9 connector. T-Beam receives the data with the transceiver board, UART-232 module. The DB9 pins are connected as following:

  • [station].2 (TX232) <--> [UART-232].3 (RX232)
  • [station].3 (RX232) <--> [UART-232].2 (TX232)
  • [station].5 (GND) <--> [UART-232].5 (GND)

Weather station board & DB9 connection

Firmware

  • Use Vscode plus Arduino extension to open the project in directory src.
  • Compile and flash into a T-Beam board without any re-configuration. The code will automatically dectect revision of the board.
  • At runtime, pass a command to set id as 0 for the node connected to the gateway device.
  • The work flow is explained in the next section.

System Overview

How Firmware Work

  1. After booting, a T-Beam node will be waiting data passed from its attached weather station.
  2. If the data is available through UART2, the node sends it out via the routing protocol to the sink node id 0 which is determined to be connected to the gateway.
  3. The sink node sends out the data it received, to the gateway through UART0 -- debugging port.

Routing

Multi-source + Hybrid-node Test

Terminal Commands

On purpose, these commands could be send to T-Beam through UART0, debugging port.

  • help for listing all commands.
  • hello for testing only.
  • node_id for setting node id, e.g.,
    • node_id for asking the current node id.
    • node_id <id> for setting the new id where in [0..25535].
  • vtube <params> for forwarding data through UART2.

TTGO-T-Beam

Pinout

Rev.0.7

0.7

Rev.1.0

1.0

Rev.1.1

1.1

Resources

Hardware References

Examples