
5/ Appendix A: Bluetooth Protocol.
5.1/
The configuration frames are as follows:
Header Length Payload
1 byte 2 bytes(MSB, LSB) 0 to 65535 bytes
5.2/ Commands:
Command Header Length Payload Answer
Set
PinCode
0x01 xx xx
(new pin size)
N digits PIN.
(Default “0000”)
0x01 00 01 01 if done
0x01 00 01 00 if not
Max Pin length=16
Command Header Length Payload Answer
Get
PinCode
0x07 00 00 N digits PIN. (Default
“0000”)
0x07 {PinCode size}
{Pincode}
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 20 Bytes)
Command Header Length Payload Answer
Get Name 0x08 00 00 0x08 {name size} {name}
(Name size: 2 Bytes MSB, LSB)
Command Header Length Payload Answer
Set mode 0x03 00 01 0x01 if MASTER, 0x00 if
SLAVE (default SLAVE)
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.
Command Header Length Payload Answer
Set mode 0x03 00 02 [0x01 if MASTER, 0x00 if SLAVE],
[BT Clock Role switch] (default
SLAVE)
0x03 00 01 01 if
done
0x03 00 01 00 if
not
You can set the size to 2. In this case, the second argument tells the module for an
automatic BT clock role switch. This is an optional argument.
The real MASTER in a Bluetooth piconet is the device which manages the clock used for
the frequency hopping. We used to speak about MASTER too for devices which create the
connection( that's true if you do not switch the clock role)
A device with a slave BT clock role is unable to synchronize more than one master clock.
If more than one SmartModule needs to connect to the same other device (PC, Access
Point…) you will need to switch the clock role to allow the slave to be connected to more
than one master. Note that most of the BT access point already generate the BT clock
role switch when a master device creates a connection. In that case you don't need to
specify this argument (if you do, it will cancel the Access Point clock switch and the result
is as nothing was done)
Kommentare zu diesen Handbüchern