Skip to main content

Bluetooth

πŸ“‹ BLUETOOTH COMMANDS AND PARAMETERS​

πŸ”§ DEVICE CONFIGURATION​

CommandParameterDescriptionExample
set address1-255Sets the device Modbus addressset address 5
set baudrate2400,4800,9600,19200,38400,57600,115200Sets the RS485 communication speedset baudrate 19200

πŸ“‘ WIFI MANAGEMENT​

CommandDescriptionResult
wifi enableActivates the WiFi hotspotSSID: STATOTEST_LASERX, password: statotest2024
wifi disableDeactivates WiFiTurns off the WiFi module

πŸ“ MEASUREMENT​

CommandDescriptionResponse
stt measureOne-off measurementMEASURE STARTED + JSON data
stt continuous measure startStarts continuous measurement (1s interval)CONTINUOUS MEASURE STARTED
stt continuous measure stopStops continuous measurementCONTINUOUS MEASURE STOPPED

πŸ”΄ LASER CONTROL​

CommandDescriptionResponse
laser onTurns on the laser lightLASER ON
laser offTurns off the laser lightLASER OFF

ℹ️ DEVICE INFORMATION​

CommandDescriptionExample response
fw versionFirmware versionFW version: 1
hw versionHardware versionHW version: 2
helpShows the helpComplete list of commands

πŸ”„ SYSTEM COMMANDS​

CommandDescriptionResult
restartRestarts the deviceImmediate ESP32 restart

πŸ“Š MEASUREMENT DATA FORMAT​

During a measurement, data is sent in JSON format:

[
{
"SensorId": 90,
"Channel": 0,
"value": 1.2345,
"unit": "m",
"sensor": "laser",
"type": "displacement"
},
{
"SensorId": 90,
"Channel": 0,
"value": 23.5,
"unit": "C",
"sensor": "laser",
"type": "temperature"
},
{
"SensorId": 90,
"Channel": 0,
"value": 3.3,
"unit": "V",
"sensor": "laser",
"type": "voltage"
}
]

πŸ”— CONNECTION​

  • Device name: STATOTEST-LASER-X (where X = the device address)
  • Service UUID: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
  • RX Characteristic: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E (for sending commands)
  • TX Characteristic: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E (for receiving responses)

⚠️ NOTES​

  • All commands are case-sensitive
  • Unknown commands return: UNKNOWN COMMAND: [your command]
  • Changes to the address and baudrate are saved to the flash memory
  • The WiFi hotspot has a timeout of 600 seconds (10 minutes)
  • Continuous measurement runs until it is explicitly stopped