5.2.2 Command State
During the Command state, the microcontroller acts as a USART bridge between the serial terminal and the RN4870 module.
This functionality opens a line of communication to the RN4870 module so that the PC can be used to retrieve the module MAC address. The Command state can also be entered to make any desired configurations, such as changing the name of the module.
The Command state is only for prototyping purposes, and will not be used in the final application.
- Check for the MAC
address of the device. This info will be required later by
the Lambda. The MAC address will be on the first line of the
reply:
- Send: ‘
d
’ - Reply: ‘
BTA=D88039F37559
’ - Reply: ‘
Name=RN4870-7559
’ - Reply: ‘
Connected=no
’ - Reply: ‘
Authen=2
’ - Reply: ‘
Features=0000
’ - Reply: ‘
Services=C0
’
- Send: ‘
- Ensure the board
uses the latest firmware available, which at this moment is
v1.30:
- Send: ‘
v
’ - Reply: ‘
RN4870 V1.30 3/18/2018 (c)Microchip Technology Inc
’
- Send: ‘
In Command state, utilize any command described in the BLE RN4870 Module User's Guide.