Difference between revisions of "radino rf serial bridge"
(Created page with "==Overview== The radino rf serial bridge is an example for a uart bridge over radio. Currently the functionality for radino CC1101 is implemented. Other RF chips will be adde...") |
|||
Line 57: | Line 57: | ||
"sss\n" -> command "s" is executed | "sss\n" -> command "s" is executed | ||
"qss\n" -> command "q" is executed | "qss\n" -> command "q" is executed | ||
+ | |||
+ | N)wID:00 M)yID:FF T)gtID:FF L)istenBC:1 S)tore P)ing R)eload Q)uit | ||
+ | > p | ||
+ | p: Pinging neighbours | ||
+ | ID MyRSSI TgtRSSI | ||
+ | FF -30.50 -29.50 | ||
+ | OK | ||
+ | N)wID:00 M)yID:FF T)gtID:FF L)istenBC:1 S)tore P)ing R)eload Q)uit | ||
+ | > |
Revision as of 18:28, 4 December 2015
Contents |
Overview
The radino rf serial bridge is an example for a uart bridge over radio.
Currently the functionality for radino CC1101 is implemented. Other RF chips will be added over time.
Configuration
At the section "Main configuration" within the sketch the used hardware has to be configured.
Which serial interface to bridge over wireless
#define BRIDGED_SERIAL_SELECTION 1 #define BRIDGED_SERIAL_SPEED 9600
Which wireless chip is used
#define WIRELESS_HARDWARE 1
If and which pin is used to enter command mode
#define CONFIG_BUTTON_PIN 5
If TX and RX LEDs should display activity on the serial interface
#define USE_SERIALLEDS true
Usage
- 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
Examples
"n2m55\r" -> command "m55" is executed "l0\r" -> command "l0" is executed "sss\n" -> command "s" is executed "qss\n" -> command "q" is executed
N)wID:00 M)yID:FF T)gtID:FF L)istenBC:1 S)tore P)ing R)eload Q)uit > p p: Pinging neighbours ID MyRSSI TgtRSSI FF -30.50 -29.50 OK N)wID:00 M)yID:FF T)gtID:FF L)istenBC:1 S)tore P)ing R)eload Q)uit >