4.2 New Features
Version 1.41 has a new feature that allows you to configure the UART parity check and stop bits of the module. The new feature is included by adding more parameters to the already existing SB commands as shown below.
In all firmware versions prior to V1.41, the SB command takes in only one parameter, which is used to define the baud rate between the module and the host.
Starting with V1.41, the SB command will have three additional parameters to set the UART
configuration. The command format is as
follows:
SB,<H8>,<H8>,<H8>,<H8>
SB,<Baud rate>,<Parity Check enable/disable>,<Parity mode>,<Stop bits>The options available for each parameter are shown in the tables below:
| Setting | Baud Rate |
|---|---|
| 00 | 921600 |
| 01 | 460800 |
| 02 | 230400 |
| 03 | 115200 |
| 04 | 57600 |
| 05 | 38400 |
| 06 | 28800 |
| 07 | 19200 |
| 08 | 14400 |
| 09 | 9600 |
| 0A | 4800 |
| 0B | 2400 |
| Setting | Parity Check |
|---|---|
| 00 | Disable |
| 01 | Enable |
| Setting | Mode |
|---|---|
| 00 | Odd |
| 01 | Space |
| 02 | Even |
| 03 | Mark |
| Setting | Stop Bits |
|---|---|
| 00 | 1 |
| 01 | 2 |
Default: 03
Examples:
SB,07 // Set the UART baud rate to 19200
SB,04,01,02,00 // Set the UART baud rate to 57600
// Enable parity check as Even mode
// Set stop bits to 1 bitResponse:
AOK // Success
ERR // Syntax error or invalid parameter