Skip to content
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>
ParameterTypeDescriptionExample
PACKET+DEFINITIONPACKET+DEFINITIONThe advertisement data scanned N/A
CRC16integerCyclic Redundancy Check for error checking.1234

Packet definition PACKET+DEFINITION

MAC_ADDRESS;LATITUDE;LONGITUDE;ALTITUDE;MODEL;RSSI;TX_POWER;MANUFACTURER_DATA;SERVICE_DATA;CRC16
ParameterTypeDescriptionExample
MAC_ADDRESSstringMAC address of the BLE device without colons001122334455
LATITUDEfloatDefines the latitude of the BLE device, send empty if is not available8.98293776
LONGITUDEfloatDefines the longitude of the BLE device, send empty if is not available-79.51847453
ALTITUDEfloatDefines the altitude of the BLE device, send empty if is not available10.0
MODELstringDefines the model of the BLE device, this model should be the same as your BLE parser in the serverGENERIC
RSSIintDefines the RSSI (Received Signal Strength Indicator) of the BLE device, 0 if is not available-7
TX_POWERfloatDefines the TX Power of the BLE device, 0 if is not available0
MANUFACTURER_DATAMANUFACTURER+DATAManufacturer specific data of the BLE device, send empty if is not available0000:00
SERVICE_DATASERVICE+DATAService specific data of the BLE device, send empty if is not available0000:00
CRC16integerCyclic Redundancy Check for error checking.1234

Manufacturer data MANUFACTURER+DATA

COMPANY_ID1:ADVERTISED_INFORMATION1,COMPANY_ID2:ADVERTISED_INFORMATION2,...
ParameterTypeDescription
COMPANY_ID1,COMPANY_ID2hexCompany ID identifier of the manufacturer. You should send in Big Endian format.
ADVERTISED_INFORMATION1,ADVERTISED_INFORMATION2hexAdvertised 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,...
ParameterTypeDescription
SERVICE_UUID1,SERVICE_UUID2hexService UUID 16-bit identifier of the manufacturer. You should send in Big Endian format.
ADVERTISED_INFORMATION1,ADVERTISED_INFORMATION2hexAdvertised information of the manufacturer, this is a hexadecimal string.

Example


0000:0000,0001:0101