Pb
Bluetooth Low Energy Packet
Added on v2.4.0
TCP
HTTP
Defines the Bluetooth Low Energy advertisement scan packet of the Layrz Protocol, which is used to send data from a peripheral (A BLE device) to the server. Used as part the
Layrz Global Network
to allow BLE devices to communicate with the server without needing a direct connection.This packet sends only the advertisement information of the BLE device, such as the device name, service UUIDs, and other relevant information. Not any data from the device after connection or internal communication.
Example Usage
<Pb>PACKET+DEFINITION;CRC16</Pb>
Parameter | Type | Description | Example |
---|---|---|---|
PACKET+DEFINITION | PACKET+DEFINITION | The advertisement data scanned | N/A |
CRC16 | integer | Cyclic Redundancy Check for error checking. | 1234 |
Packet definition PACKET+DEFINITION
MAC_ADDRESS;LATITUDE;LONGITUDE;ALTITUDE;MODEL;RSSI;TX_POWER;MANUFACTURER_DATA;SERVICE_DATA;CRC16
Parameter | Type | Description | Example |
---|---|---|---|
MAC_ADDRESS | string | MAC address of the BLE device without colons | 001122334455 |
LATITUDE | float | Defines the latitude of the BLE device, send empty if is not available | 8.98293776 |
LONGITUDE | float | Defines the longitude of the BLE device, send empty if is not available | -79.51847453 |
ALTITUDE | float | Defines the altitude of the BLE device, send empty if is not available | 10.0 |
MODEL | string | Defines the model of the BLE device, this model should be the same as your BLE parser in the server | GENERIC |
RSSI | int | Defines the RSSI (Received Signal Strength Indicator) of the BLE device, 0 if is not available | -7 |
TX_POWER | float | Defines the TX Power of the BLE device, 0 if is not available | 0 |
MANUFACTURER_DATA | MANUFACTURER+DATA | Manufacturer specific data of the BLE device, send empty if is not available | 0000:00 |
SERVICE_DATA | SERVICE+DATA | Service specific data of the BLE device, send empty if is not available | 0000:00 |
CRC16 | integer | Cyclic Redundancy Check for error checking. | 1234 |
Manufacturer data MANUFACTURER+DATA
COMPANY_ID1:ADVERTISED_INFORMATION1,COMPANY_ID2:ADVERTISED_INFORMATION2,...
Parameter | Type | Description |
---|---|---|
COMPANY_ID1,COMPANY_ID2 | hex | Company ID identifier of the manufacturer. You should send in Big Endian format. |
ADVERTISED_INFORMATION1,ADVERTISED_INFORMATION2 | hex | Advertised information of the manufacturer, this is a hexadecimal string. |
Example
0000:0000,0001:0101
Manufacturer data SERVICE+DATA
SERVICE_UUID1:ADVERTISED_INFORMATION1,SERVICE_UUID2:ADVERTISED_INFORMATION2,...
Parameter | Type | Description |
---|---|---|
SERVICE_UUID1,SERVICE_UUID2 | hex | Service UUID 16-bit identifier of the manufacturer. You should send in Big Endian format. |
ADVERTISED_INFORMATION1,ADVERTISED_INFORMATION2 | hex | Advertised information of the manufacturer, this is a hexadecimal string. |
Example
0000:0000,0001:0101