starryalley / CSC_BLE_Bridge

Android app that bridges ANT+ Cycling Speed/Cadence/HR sensors as Bluetooth LE sensors
MIT License
65 stars 17 forks source link

BLE Device Name #13

Open philharle opened 3 years ago

philharle commented 3 years ago

Firstly, top work on this. Great project! For info, in addition to the already listed devices I can confirm it works with the OnePlus 5T (Android 10) and the Garmin HRM3-SS monitor.

On using the app for a session today I experienced a drop out of the sensors after about 40 mins. This could have been overly aggressive app/battery optimisation on my phone with this app or the Ant+ radio service? - I guess further testing will establish this. However on scrolling back to the CSC_BLE app (I had Zwift companion in the foreground at the time) I clicked to Start BLE Bridging again and the app started reported sensor data after a few seconds. However Zwift didn't pick up the sensors automatically - I had to pair again within Zwift and it detected a totally new device. It seems the phone is advertising itself using MyPhoneName-{random number}. Is it possible to static the device name that's broadcast, so in the event of the above you wouldn't need to setup the pairing as if it's a new device?

starryalley commented 3 years ago

Thanks. Great question. On my Samsung S8 the BLE device naming is exactly what you described. And also I need to re-pair it in Zwift every time because it changes.

I never got time to work out if static naming is possible. However I will look into it. Thanks for the report!

pinkemma commented 3 years ago

I've tried setting the name, which works, but I cannot seem to get rid of the random number at the end. If anyone have any ideas on how that is done I'll implement it.

philharle commented 3 years ago

Do you guys run Zwift on an Apple TV by any chance, because I'm wondering if there's something specific to the Zwift app on this device?

I've spent a little time looking into this and whilst the device name on my Apple TV has the random number suffix, when I run Zwift directly on my Mac this suffix isn't present. Just wondering if you guys experience the same?

starryalley commented 3 years ago

I don't have Apple TV but I use Zwift on my Mac. I do see the random number suffix each time I connect my ANT+ sensors through this app. I really have have no idea how to get rid of the random number suffix, but I think maybe this is specific to Zwift? I didn't see the number suffix on BLE debugger app though.

leaskovski commented 3 years ago

I can confirm that the RGT app doesn't show any random number on the device name, however I do have to manually set the device every time I run the app up, which suggests there is something different each time the bridge is run and the devices are created.

starryalley commented 3 years ago

So the random number suffix looks to be a thing of zwift. Thanks @leaskovski for checking in RGT app.

starryalley commented 3 years ago

Closing for now. This looks like an expected behaviour in zwift.

nieko-nera commented 2 years ago

Hello, I think we need to manualy select device every time, because every time this app starts it using diferent Device UUID. @starryalley can you make Device UUID static?