BTBCN (Bluetooth Beacon)¶
This command is used for the terminal to scan nearby Bluetooth Beacon accessories.
Example:
AT@BTBCN=gl601###,0,0,0,,0,5,2400,012F$
+ACK:BTBCN,123456789012345,C031,10,0,0,012F,20210407101530,1234$
AT@BTBCN?gl601###,,0C37$
+QRY:BTBCN,123456789012345,C031,10,0,3,1,0,0,0,,0,5,2400,0C37,20210407101530,1234$
+QRY:BTBCN,123456789012345,C031,10,0,3,2,1,0,0,,0,5,2400,0C37,20210407101530,1235$
+QRY:BTBCN,123456789012345,C031,10,0,3,3,2,0,0,,0,5,2400,0C37,20210407101530,1236$
Parts |
Fields |
Length (Byte) |
Range/Format |
Default |
|---|---|---|---|---|
Head |
Header |
3 |
AT@ |
AT@ |
Command Word |
5 |
BTBCN |
BTBCN |
|
Leading Symbol |
1 |
= |
= |
|
Password |
8-16 |
gl601### |
||
Body |
Group ID |
<=2 |
0, 1, 2 |
|
Type |
<=2 |
0, 13, 80, 81 |
0 |
|
Filter Type |
1 |
0, 1, 2 |
0 |
|
Filter Data |
N |
Please see below. |
||
Detection Mode |
1 |
0, 1, 2 |
0 |
|
Detection Duration |
<=2 |
30 - 600 (seconds) |
30 |
|
Low Voltage Threshold |
<=4 |
0-5000 (mV) |
2400 |
|
Tail |
Sequence Number |
4 |
0000-FFFF (‘0’-‘9’, ‘A’-‘F’) |
|
Tail |
1 |
$ |
$ |
Group ID
Indicates the group ID of the Beacons. Each group contains up to 10 Beacons.
Note: Only the Beacons of the same type can be assigned to the same group, otherwise the Beacons may not be correctly identified.
Type
This field indicates what type of the Beacon will be used for the specified ‘Group ID’. If set to 0, it means that the specified ‘Group ID’ is disabled.
0 - None.
13 - WID310. Supports ‘Filter Type’ 0, 1 and 2.
80 - Eddystone-UID. Supports ‘Filter Type’ 0, 1 and 2.
81 - iBeacon. Supports ‘Filter Type’ 0, 1 and 2.
Filter Type
Specify the filter type.
0 - No Filter. If ‘Type’ is not 0 (None), the terminal will scan and collect information on all nearby Bluetooth accessories that match the type specified in the ‘Type’ parameter.
1 - MAC. If ‘Type’ is not 0 (None), the terminal will scan for nearby Bluetooth accessories that match the type specified in the ‘Type’ parameter, and collect accessory information by filtering based on the MAC address.
2 - OUI. Organization Unique Identifier. If ‘Type’ is not 0 (None), the terminal will scan for nearby Bluetooth accessories that match the type specified in the ‘Type’ parameter, and collect accessory information by filtering based on the OUI.
Filter Data
Specify which Beacon will be detected.
The length and content of this field are determined by ‘Filter Type’ parameter. Multiple data elements are separated with vertical bar (‘|’).
For different filter types, the maximum number of data elements supported by this field is shown in the table below:
Filter Type
Max Number
MAC
10
OUI
10
Detection Mode
The working mode of the Beacon detection.
0 - Disable.
1 - Enable once detection. After entering ignition on and moving state, the terminal will detect Beacons one time for the duration specified by ‘Detection Duration’ parameter, and then will send the Record 95H with event code 00H to report information of Beacon(s).
2 - Enable continuous detection. After entering ignition on and moving state, the terminal will detect Beacons continuously. If the terminal detects Beacon(s) or change of available Beacon(s), it will send the Record 95H with event code 00H to report information of Beacon(s).
Detection Duration
Specify the duration for Beacon detection.
Low Voltage Threshold
Specify the lower limit voltage for Beacon. When the voltage of Beacon is below this value, the terminal will report message Record 95H with event code 01H to backend server.
In particular, 0 means disable low voltage detection.
Note: This parameter will invalid when the Beacon can not broadcast voltage.