Skip to content

Commit d66e7a6

Browse files
authored
Update README.md
1 parent b1e0b76 commit d66e7a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ The program uses the bluetooth and mqtt client libraries, steps to image Raspber
1515

1616
To compile:
1717

18+
```
1819
gcc -o ble_sensor_mqtt_pub ble_sensor_mqtt_pub.c -lbluetooth -l paho-mqtt3c
1920
21+
```
2022
To run:
2123
```
2224
sudo ble_sensor_mqtt_pub <bluetooth adapter> <scan type> <scan window> <scan interval>
2325
24-
bluetooth adapter = integer number of bluetooth devices, run hciconfig to see your adapters, 1st adapter is 0, so hci1 is 0
26+
bluetooth adapter = integer number of bluetooth devices, run hciconfig to see your adapters, 1st adapter is referenced as 0 in this program
2527
scan type = 0 for passive, 1 for active advertising scan, some BLE sensors only share data on type 4 response active advertising packets
2628
scan window = integer number that is multiplied by 0.625 to set advertising scanning window in milliseconds. Try 100 to start.
2729
scan interval = integer number that is multiplied by 0.625 to set advertising scanning interval in milliseconds. Try 1000 to start.

0 commit comments

Comments
 (0)