LPMS-BE2 LPBus Command List
Firmware Function / Command List
Summary
Acknowledged / Not-acknowledged Identifiers | ||||
Identifier | Name | Parameter | Response | Default |
0 (00h) | Â | Â | Â | |
1 (01h) | Â | Â | Â |
Register Value Save and Reset Command | ||||
Identifier | Name | Parameter | Response | Default |
4 (04h) | NONE | ACK/NACK | Â | |
5 (05h) | NONE | ACK/NACK | Â |
Mode Switching Commands | ||||
Identifier | Name | Parameter | Response | Default |
6 (06h) | NONE | ACK/NACK | Â | |
7 (07h) | NONE | ACK/NACK | Â |
Sensor Status Command | ||||
Identifier | Name | Parameter | Response | Default |
8 (08h) | NONE | UInt32 | 1 |
Get Data Commands | ||||
Identifier | Name | Parameter | Response | Default |
9 (09h) | NONE | Â | Â |
Device Info | ||||
Identifier | Name | Parameter | Response | Default |
20 (14h) | NONE | Char[24] | Â | |
21 (15h) | NONE | Char[24] | Â | |
22 (16h) | NONE | Char[24] | Â | |
23(17h) | NONE | Char[24] | Â |
Data Transmission Commands | ||||
Identifier | Name | Parameter | Response | Default |
30 (1Eh) | UInt32 | ACK/NACK | Â | |
31 (1Fh) | NONE | UInt32 | Â |
IMU ID Settings Commands | ||||
Identifier | Name | Parameter | Response | Default |
32 (20h) | UInt32 | ACK/NACK | Â | |
33 (21h) | NONE | UInt32 | 1 |
Stream Frequency Commands | ||||
Identifier | Name | Parameter | Response | Default |
34 (22h) | UInt32 | ACK/NACK | Â | |
35 (23h) | NONE | UInt32 | 100Hz |
Deg/Rad Output Commands | ||||
Identifier | Name | Parameter | Response | Default |
36 (24h) | UInt32 | ACK/NACK | Â | |
37 (25h) | NONE | UInt32 | 0 |
Reference Setting and Offset Reset Commands | ||||
Identifier | Name | Parameter | Response | Default |
38 (26h) | UInt32 | ACK/NACK | Â | |
39 (27h) | NONE | ACK/NACK | Â |
Accelerometer Settings Commands | ||||
Identifier | Name | Parameter | Response | Default |
50 (32h) | Int32 | ACK/NACK | Â | |
51 (33h) | NONE | Int32 | 4g |
Gyroscope Settings Commands | ||||
Identifier | Name | Parameter | Response | Default |
60 (3Ch) | UInt32 | ACK/NACK | Â | |
61 (3Dh) | NONE | UInt32 | 2000dps | |
62 (3Eh) | NONE | ACK/NACK | Â | |
64 (40h) | UInt32 | ACK/NACK | Â | |
65 (41h) | NONE | UInt32 | 1 |
Filter Settings Command | ||||
Identifier | Name | Parameter | Response | Default |
90 (5Ah) | UInt32 | ACK/NACK | Â | |
91 (5Bh) | NONE | UInt32 | 1 |
UART / RS232 Settings Command | ||||
Identifier | Name | Parameter | Response | Default |
130 (82h) | UInt32 | ACK/NACK | Â | |
131 (83h) | NONE | UInt32 | 115200 | |
132 (84h) | UInt32 | ACK/NACK | Â | |
133 (85h) | NONE | UInt32 | 0 | |
134 (86h) | Int8[4] | ACK/NACK | Â | |
135 (87h) | NONE | Char[4] | 0x24 0x0A 0x00 0x00 | |
136 (88h) | UInt32 | ACK/NACK | Â | |
137 (89h) | NONE | UInt32 | 1 |
Sensor Data Timestamp Manipulation | ||||
Identifier | Name | Parameter | Response | Default |
152 (98h) | UInt32 | ACK/NACK | Â |
Details
Acknowledged and Not-acknowledged Identifiers
Identifier | Name | Parameter | Response | Default |
0 (00h) | REPLY_ACK | Â | Â | Â |
Description Confirms a successful SET command. |
Identifier | Name | Parameter | Response | Default |
1 (01h) | REPLY_NACK | Â | Â | Â |
Description Reports an error during processing a SET command. |
Register Value Save and Reset Command
Identifier | Name | Parameter | Response | Default |
4 (04h) | WRITE_REGISTERS | None | ACK/NACK | Â |
Description Writes the currently set parameters to flash memory. Settings will be preserved after power cycle. Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
5 (05h) | RESTORE_FACTORY_VALUE | None | ACK/NACK | Â |
Description Resets the sensor parameters to factory default values. Please note that upon issuing this command your currently set parameters will be erased. Response ACK (success) or NACK (error) |
Mode Switching Commands
Identifier | Name | Parameter | Response | Default |
6 (06h) | GOTO_COMMAND_MODE | None | ACK/NACK | Â |
Description Switches to command mode. In command mode the user can issue commands to the firmware to perform calibration, set parameters etc. Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
7 (07h) | GOTO_STREAM_MODE | None | ACK/NACK | Â |
Description Switches to streaming mode. In this mode data is continuously streamed from the sensor. Response ACK (success) or NACK (error) |
Sensor Status Commands
Identifier | Name | Parameter | Response | Default |
8 (08h) | GET_SENSOR_STATUS | None | UInt32 | 1 |
Description Gets the status of the sensor, i.e whether the sensor is in command mode or streaming mode. Response: 0: Command mode 1: Streaming mode |
Get Data Commands
Identifier | Name | Parameter | Response | Default |
9 (09h) | GET_IMU_DATA | None | Raw binary | Â |
Description Retrieves the latest set of sensor data. A data packet will be composed as defined by GET_TRANSMIT_DATA (1Fh). The data format (LPBus or ASCII) can be retrieved with GET_UART_FORMAT (85h). Data precision of sensor data can be retrieved with GET_LPBUS_DATA_PRECISION (88h). Response: See the LP-BUS protocol explanation for a description of the measurement data format. More information to be added. |
Device Info
Identifier | Name | Parameter | Response | Default |
20 (14h) | GET_SENSOR_MODEL | NONE | Char[24] | Â |
Description Gets the sensor model. Response Depending on sensor model, the response includes: LPMS-BE1, LPMS-BE2 Unused spaces in returned array are initialized to ‘\0’ |
Identifier | Name | Parameter | Response | Default |
21 (15h) | GET_FIRMWARE_INFO | NONE | Char[24] | Â |
Description Gets the sensor firmware version information. Response Firmware version, eg: BE2-1.1.2-20210816 Unused spaces in returned array are initialized to ‘\0’ |
Identifier | Name | Parameter | Response | Default |
22 (16h) | GET_SERIAL_NUMBER | NONE | Char[24] | Â |
Description Gets the sensor serial number. Response 24 characters long serial number, eg: 2033374D59565010004F0037 |
Identifier | Name | Parameter | Response | Default |
23 (17h) | GET_FILTER_VERSION | NONE | Char[24] | Â |
Description Gets version of sensor fusion core. Response Version of sensor fusion core, eg: LPFUSION_20210805 |
Data Transmission Commands
Identifier | Name | Parameter | Response | Default |
30 (1Eh) | SET_IMU_TRANSMIT_DATA | UInt32 | ACK/NACK | Â |
Description Enables/disables output data from the sensor. To enable a particular data output, the corresponding data mapping bit has to set to 1. Setting to 0 will disable the corresponding data output. Data mapping is as follow:
Example:
we will send 14466 (binary: 00000000 00000000 00111000 10000010) as parameter to the sensor Parameter UInt32 Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
31 (1Fh) | GET_IMU_TRANSMIT_DATA | NONE | UInt32 | Â |
Description Gets the settings for data output of the sensor. Response UInt32 representing the data output. See SET_IMU_TRANSMIT_DATA (1Eh) for details of data bit mapping. |
IMU ID Settings
Identifier | Name | Parameter | Response | Default |
32 (20h) | SET_IMU_ID | UInt32 | ACK/NACK | Â |
Description Sets the sensor ID. Parameter Sensor ID 0~INT_MAX Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
33 (21h) | GET_IMU_ID | NONE | UInt32 | Â |
Description Gets the sensor ID. Response Sensor ID |
Stream Frequency Commands
Identifier | Name | Parameter | Response | Default |
34 (22h) | SET_STREAM_FREQ | UInt32 | ACK/NACK | Â |
Description Set the sensor data streaming frequency (Hz). Please note that high frequencies might be not practically applicable due to limitations of the communication interface. Check the current baud rate before setting this parameter. Parameter Available data streaming frequencies:
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
35 (23h) | GET_STREAM_FREQ | NONE | UInt32 | 100Hz |
Description Gets the current streaming frequency. Response Current streaming frequency (Hz):
|
Deg/Rad Output Commands
Identifier | Name | Parameter | Response | Default |
36 (24h) | SET_DEGRAD_OUTPUT | UInt32 | ACK/NACK | Â |
Description Sets the output unit of gyroscope, euler angles angular velocity to degree or radian. Parameter
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
37 (25h) | GET_DEGRAD_OUTPUT | NONE | UInt32 | Â |
Description Gets the output unit of gyroscope, euler angles angular velocity to degree or radian. Response
|
Reference Setting and Offset Reset Command
Identifier | Name | Parameter | Response | Default |
38 (26h) | SET_ORIENTATION_OFFSET | UInt32 | ACK/NACK | Â |
Description Sets the orientation offset using one of the three offset methods. Parameter
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
39 (27h) | RESET_ORIENTATION_OFFSET | NONE | ACK/NACK | Â |
Description Resets the orientation offset to unity quaternion. Response ACK (success) or NACK (error) |
Accelerometer Settings Command
Identifier | Name | Parameter | Response | Default |
50 (32h) | SET_ACC_RANGE | UInt32 | ACK/NACK | Â |
Description Sets the current range of the accelerometer (g). Parameter Available accelerometer range:
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
51 (33h) | GET_ACC_RANGE | NONE | UInt32 | 4g |
Description Gets current accelerometer range. Response Current accelerometer range settings:
|
Gyroscope Settings Command
Identifier | Name | Parameter | Response | Default |
60 (3Ch) | SET_GYR_RANGE | UInt32 | ACK/NACK | Â |
Description Sets the current range of the gyroscope(dps. Parameter Available gyroscope range:
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
61 (3Dh) | GET_GYR_RANGE | NONE | UInt32 | 2000dps |
Description Gets current gyroscope range. Response Current gyroscope range settings:
|
Identifier | Name | Parameter | Response | Default |
62 (3Eh) | START_GYR_CALIBRATION | NONE | ACK/NACK | Â |
Description Starts the static calibration of the gyroscope sensor. This calibration procedure will calculate the zero offset of the gyroscope. Please make sure the sensor is static on a stable surface when performing this calibration. Static calibration will take 2 seconds to complete. Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
64 (40h) | SET_ENABLE_GYR_AUTOCALIBRATION | UInt32 | ACK/NACK | Â |
Description Enables or disables auto-calibration of the gyroscope. Parameter
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
65 (41h) | GET_ENABLE_GYR_AUTOCALIBRATION | NONE | UInt32 | 1 |
Description Gets gyroscope autocalibration settings Response
|
Filter Settings Command
Identifier | Name | Parameter | Response | Default |
90 (5Ah) | SET_FILTER_MODE | UInt32 | ACK/NACK | Â |
Description Sets the sensor filter mode. Parameter Filter mode identifier:
ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
91 (5Bh) | GET_FILTER_MODE | NONE | UInt32 | 1 |
Description Gets the current filter mode. Response Filter mode identifier:
|
UART Settings Commands
Identifier | Name | Parameter | Response | Default |
130 (82h) | SET_UART_BAUDRATE | UInt32 | ACK/NACK | Â |
Description Sets the current UART baud rate. Parameter Available baud rates (bps):
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
131 (83h) | GET_UART_BAUDRATE | NONE | UInt32 | 921600 |
Description Gets current UART baud rate. Response Current UART baud rate (bps):
|
Identifier | Name | Parameter | Response | Default |
132 (84h) | SET_UART_FORMAT | UInt32 | ACK/NACK | Â |
Description Sets USB/UART data output format, LPBus protocol or ASCII. Parameter Data output format identifier
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
133 (85h) | GET_UART_FORMAT | NONE | UInt32 | 0 |
Description Gets USB/UART output format. Default is LPBus. Response Data output format identifier
|
Identifier | Name | Parameter | Response | Default |
134 (86h) | SET_UART_ASCII_CHARACTER | Char[4] | ACK/NACK | Â |
Description Sets UART start/stop characters when output format is in ASCII mode Parameter Start/stop characters should be set in first and second character in the data array respectively. eg: Sending Char[4] of [0x24 0x0A 0x00 0x00] will set the start character to ‘$' and stop character to '\n’ Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
135 (87h) | GET_UART_ASCII_CHARACTER | NONE | Char[4] | 0x24 0x0A 0x00 0x00 |
Description Gets UART start/stop characters when output format is in ASCII mode Response Char[4] where:
|
Identifier | Name | Parameter | Response | Default |
136 (88h) | SET_LPBUS_DATA_PRECISION | Uint32 | ACK/NACK | Â |
Description Sets the output data precision for USB/UART. Parameter
Response ACK (success) or NACK (error) |
Identifier | Name | Parameter | Response | Default |
137 (89h) | GET_LPBUS_DATA_PRECISION | NONE | Uint32 | 1 |
Description Sets output data precision for USB/UART. Response
|
Sensor Data Timestamp Manipulation
Identifier | Name | Parameter | Response | Default |
152 (98h) | SET_TIMESTAMP | Uint32 | ACK/NACK | Â |
Description Sets sensor timestamp. Parameter Timestamp counter (Each counter represent 0.002s increment). E.g.:
Response ACK (success) or NACK (error) |