Difference between revisions of "radino rf serial bridge"

From InCircuit
Jump to: navigation, search
(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...")
 
(Command mode)
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
The radino rf serial bridge is an example for a uart bridge over radio.
 
The radino rf serial bridge is an example for a uart bridge over radio.
  
Currently the functionality for radino CC1101 is implemented.
+
Currently implemented is the functionality following radino wireless chips:
Other RF chips will be added over time.
+
* CC1101 at 868.3 MHz ([[radino CC1101]], [[radino32 CC1101]])
 +
* CC1101 at 922.5 MHz ([[radino CC1101]], [[radino32 CC1101]])
 +
* CC1101 at 433 MHz ([[radino CC1101]], [[radino32 CC1101]])
 +
* RF69 at 433 MHz ([[radino RF69]])
 +
* RF233 at 2.4 GHz ([[radino RF233]])
  
 
==Configuration==
 
==Configuration==
Line 9: Line 13:
  
 
Which serial interface to bridge over wireless
 
Which serial interface to bridge over wireless
  #define BRIDGED_SERIAL_SELECTION 1
+
  #define BRIDGED_SERIAL_SELECTION BRIDGE_HWSERIAL
 
  #define BRIDGED_SERIAL_SPEED 9600
 
  #define BRIDGED_SERIAL_SPEED 9600
  
 
Which wireless chip is used
 
Which wireless chip is used
  #define WIRELESS_HARDWARE 1
+
  #define WIRELESS_HARDWARE CC1101_868_38400_p100
  
 
If and which pin is used to enter command mode
 
If and which pin is used to enter command mode
Line 20: Line 24:
 
If TX and RX LEDs should display activity on the serial interface
 
If TX and RX LEDs should display activity on the serial interface
 
  #define USE_SERIALLEDS true
 
  #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
  
 
==Usage==
 
==Usage==
Line 57: Line 65:
 
  "sss\n" -> command "s" is executed
 
  "sss\n" -> command "s" is executed
 
  "qss\n" -> command "q" 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
 +
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
 +
> q
 +
q: Quitting command mode
 +
OK

Latest revision as of 09:40, 25 July 2017

Contents

[edit] Overview

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

Currently implemented is the functionality following radino wireless chips:

[edit] 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 BRIDGE_HWSERIAL
#define BRIDGED_SERIAL_SPEED 9600

Which wireless chip is used

#define WIRELESS_HARDWARE CC1101_868_38400_p100

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

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

[edit] 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.

[edit] 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

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
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
> q
q: Quitting command mode
OK
Personal tools