radino rf serial bridge

From InCircuit
Revision as of 10:40, 25 July 2017 by CGruenig (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



The radino rf serial bridge is an example for a uart bridge over radio.

Currently implemented is the functionality following radino wireless chips:


At the section "Main configuration" within the sketch the used hardware has to be configured.

Which serial interface to bridge over wireless


Which wireless chip is used

#define WIRELESS_HARDWARE CC1101_868_38400_p100

If and which pin is used to enter command mode


If TX and RX LEDs should display activity on the serial interface

#define USE_SERIALLEDS true

Define bigger buffers for the radio communication is necessary. Note that this only makes sense on radino32 modules with its bigger memory.

//#define MY_RADIO_BUFSIZE  4096  //Overide Buffer for data received from radio
//#define MY_UART_BUFSIZE   4096  //Overide Buffer for data received from uart


  • 1 select serial to bridge. Default: HardwareSerial1
  • 2 select wireless chip. Default: CC1101 at 868mHz
  • 3 Upload the sketch to your radino modules.
  • 4 Connect serial hardware to the interface selected in step 1.
  • 5 Data received by one module is written out one the other one.

Command mode

By pulling down the commandModePin the module is put into the command mode, where wireless addressing can be changed.

The module will print the info string

N)wID:00  M)yID:FF  T)gtID:FF  L)istenBC:1  S)tore  P)ing  R)eload  Q)uit

NwID: Network ID. Only messages from our network are accepted
MyID: Our ID. Messages targeted at our ID are received. Is used as srcId in messages. 0xFF: BroadcastAdress->is not ACKed
TgtID: Targets ID. Messages are sent to this device. 0xFF: Broadcast
ListnBC: Are we accepting messages targeted at the Broadcast ID 0xFF

Commands consisting of up to 3 chars can then be entered.
The chars are shifted in and on '\r' or '\n' the last 3 entered ones are interpreted as command.

Available commands

"nXX": set network ID to XX (Hex)
"mXX": set my ID to XX (Hex)
"tXX": set target ID to XX (Hex)
"lXX": set broadcast listening (Hex) (0->off, else->on)
"s": store values to eeprom
"r": reload values from eeprom
"p": ping and list devices in range
"q": exit command mode


"n2m55\r" -> command "m55" is executed
"l0\r" -> command "l0" is executed
"sss\n" -> command "s" is executed
"qss\n" -> command "q" is executed

Output of the sequence "CommandModePin LOW", "p\r\n", "q\r\n"

Entering command mode
N)wID:00  M)yID:FF  T)gtID:FF  L)istenBC:1  S)tore  P)ing  R)eload  Q)uit
> p
p: Pinging neighbours
FF      -30.50  -29.50
N)wID:00  M)yID:FF  T)gtID:FF  L)istenBC:1  S)tore  P)ing  R)eload  Q)uit
> q
q: Quitting command mode
Personal tools