RoadRunners – Communication Protocol
TF -
Protocol of communication
21/46
January 2007
ANNEXE 1 : SMARTMODULE
DEVELOPER IMPLEMENTATION GUIDE
The configuration frames are as follow:
Header: 1 Byte
Length: 2 Bytes (MSB, LSB)
Payload: 0 to 65535 Bytes.
Set PinCode
(0x01) (flash only)
Command
Header
Length
Payload
Answer
Set PinCode
0x01
00 00
N digits PIN. (Défaut “0000”)
0x01 00 01 01 if done
0x01 00 01 00 if not
Max Pin length=16
Get PinCode
(0x07)
Command
Header
Length
Payload
Answer
Get PinCode
0x07
00 00
N digits PIN. (Défaut “0000”)
0x07 {PinCode size} {Pincode}
Set Name
(0x02) (flash only)
Command
Header
Length
Payload
Answer
Set Name
0x02
xx xx
(new name size)
New name
0x02 00 01 01 if done
0x02 00 01 00 if not
(Names up to 248 Bytes)
Get Name
(0x08)
Command
Header
Length
Payload
Answer
Get Name
0x08
00 00
0x08 {name size} {name}
(Name size: 2 Bytes MSB, LSB Names up to 248 Bytes)
Set Mode
(0x03) (flash only)
Command
Header
Length
Payload
Answer
Set
mode
0x03
00
01
0x01 if MASTER, 0x00 if
SLAVE
0x03 00 01 01 if done
0x03 00 01 00 if not
Command
Header
Length
Payload
Answer
Set mode
0x03
00 02
[0x01 if MASTER, 0x00 if SLAVE],
[Role switch]
0x03 00 01 01 if done
0x03 00 01 00 if not
When in Master, the Module connects to the address specified by Set REMOTE BDA or to the last
paired device.
Remark:
Make sure that gpio5 (gpio disconnect) is set to 0 to connect. If this gpio is set to 1, the
module will not try to connect if in master mode.
You can set the size to 2. In this case, the second argument tells the module for an automatic role
switch. This is an optional argument.