0

I want to figure out the configuration that allows me to detect the new UUID of a beacon when it changes in the shortest time. I use this code in my Raspberry Pi to start the beacon

sudo hciconfig hci0 reset
sudo hciconfig hci0 up
sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 $
sudo hcitool -i hci0 cmd 0x08 0x0006 A0 00 A0 00 03 00 00 00 00 00 00 00 00 07 $
sudo hcitool -i hci0 cmd 0x08 0x000a 01

then I change the UUID and mesure the time needed for the mobile device to detect the change. Until know the average is 800 ms with 10hz of transmission rate.

Do you have an idea if it's possible to make a shorter time ?

Keyb
  • 33
  • 4

1 Answers1

0

To get a faster detection time, you can decrease the scan period, using code like below. You can experiment with the exact timing, but given a transmission period of 100 ms, I suspect you might get the fastest response with a period like 200 ms as shown below.

beaconManager.setForegroundScanPeriod(200l);
beaconManager.updateScanPeriods();
davidgyoung
  • 63,876
  • 14
  • 121
  • 204