This section describes how to start working with the Bluetooth LE API and the O3.
Connecting to the O3
Communicating with the O3 using the Bluetooth LE interface involves the following steps:
- Ensure your application or device has adequate permissions.
- Discover the O3 device.
- Present a 6-digit PIN before performing a write to the O3.
You can read values from the device without entering a PIN.
Step 1: Obtain the Correct Permissions
In addition to standard Bluetooth permissions, some operating systems explicitly require enabled location permissions and location services on the user's device.
Step 2: Discover the O3
Use the O3's Generic Access Profile (GAP) advertising data to discover the O3.
Data Type | Data |
Eddystone-UID | 5C8E6B8BF66A4AB7A359 |
Service UUID | 4822 |
Service Name | Sensor Hub II-xxxxxx/xxxx where the x represents the hardware ID that is unique to each device. For example, SensorHub II‑103001/0010 |
Manufacturer Data | Each device's unique hexadecimal MAC address is contained in the manufacturer data. |
The O3 has a Bluetooth 5.0 Low Energy beacon that is configured to transmit an Eddystone-UID.
The Bluetooth beacon on the O3 does not stop advertising after a connection is made.
Step 3: Writing to the O3
CAUTION: Proviso will stop sending requests if your mobile screen turns off due to inactivity. Ensure your mobile screen remains on while writing values to the O3.
Before you can write any values to the O3, you must complete a pairing process to establish a secure connection. This involves presenting a 6‑digit PIN. The factory default PIN on the device is 000000.
Presenting the PIN
Present the PIN using the PIN characteristic.
Verifying the PIN
The O3 returns the result of the PIN verification using the Last Operation Result characteristic. If PIN is incorrect, the O3 will reject any write.
Connection Time Out
The connection times out after 20 minutes of inactivity.
Resetting the PIN
There are two ways to reset the PIN:
- Reset the PIN by writing to the MQTT topic
setting/ble/pin
on the O3's internal MQTT broker (MQTT write credentials are required.) For more details, refer to MQTT Setting Topics. - Reset the PIN using the CSV45 object in the O3's BACnet object database. For more details, refer to the BACnet Application Guide.
Comments
0 comments
Please sign in to leave a comment.