7.5. Manage the device state
7.5.1. CMD_GETSTATE_REQ
This command returns the current state of the module.
Please refer to chapter
for details on the states of the module.
Format:
Start signal
Command
Length
CS
0x02
0x01
0x00 0x00
0x03
Response (
Start signal
Command
| 0x40
Length
Module role
Module
actions
More info
CS
0x02
0x41
2 Bytes
1 Byte
1 Byte
(Length - 2) Bytes
1 Byte
Module role:
0x00:
No role
0x01:
Peripheral
0x02:
Central
0x10:
Direct test mode (DTM)
Other:
Reserved
Module action:
0x00:
No action
0x01:
Idle (advertising)
0x02:
Scanning
0x03:
Connected (More info is the 6 Bytes
address of the connected device)
0x04:
Sleep (system-off mode)
0x05:
Direct test mode
7.5.1.1. Example 1
Get the current state of the module.
Proteus-III reference manual version 1.3
© August 2020
www.we-online.com/wireless-connectivity
82