cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth LE Stack randomly disconnects from my Cadence sensor on Quest 2

Boodums
Explorer

My Unity app uses a BLE cadence sensor to control the player movement. It works well except that the Quest 2 will randomly disconnect from the cadence sensor. It happens one or more times within a half hour period.

The problem is not with the sensor because:

1. The sensor is only a few feet away.

2. I have an IOS app that has never disconnected from the cadence sensor.

3. I've tested three cadence sensors from different manufacturers and the results are the same.

My code does not initiate the disconnect. It comes from the Quest 2.

When it disconnects, the BluetoothGattCallback state is STATE_DISCONNECTED, and the status is GATT_SUCCESS.  

This wouldn't be a problem if it could reconnect immediately, but it takes about 13 seconds to reconnect and re-subscribe to the cadence characteristic. 

Is this random disconnection normal? Is there anything I can do to prevent this, or at least to minimize reconnect time?

For reference, my Quest 2 is running version 53. The version 54 update is not available on my system. My unity version is 2021.3.26f1. I've tried other Unity versions but the problem is still there.

 

 
3 REPLIES 3

Boodums
Explorer

Another issue is that the cadence notifications sometimes come in groups. They typically come once every second. Quite often you'll see a cadence notification come after 2 seconds. In this case you'll get a the next notification a millisecond later. I've seen a 3 second delay quite often as well.  It looks like the Quest 2 will occasionally queue up 2 or even 3 notifications before sending them to the onCharacteristicChanged() callback. This can cause a 3 second delay in the cadence measurement. It makes it difficult to control a character real time. I don't have this issue on my IOS application. 

zaryab.278790
Honored Guest

Nice

It appears that the Cadence Notification delays are caused by a bug in the Quest 2.

I installed nRF Connect on the Quest 2 and the Cadence notifications it receives are just as irregular as with my app. However when I run nRF Connect on my IPhone, the cadence notifications come in regularly. That is to say that they each arrive about 1 second after the previous one. 

I've since updated the Quest 2 to version 56, but the problem remains.