Due to the lack of a gear display, I'm trying to communicate with my Stages SB20 indoor bike over bluetooth using a Lolin ESP32
If I use the nRF Connect app or another Bluetooth utility on an iPhone, I'm able to find the Custom service that transmits the gear info, and the value also changes with the virtual gears.
But I'm not able to connect to that service using the BLE_client example.
Using the BLE_scan example it finds the UUID 00001826-0000-1000-8000-00805f9b34fb with which I can connect to the Bike using the BLE_client sketch.
I'm not able to receive any data, probably due to the wrong charUUID.
It seems to me that I might have totally misunderstud something or that there's some formatting that I have missed ?
I've attached a couple of screenshots showing the custom service that I would like to extract the value from.
Anything that can point my in the right direction will be highly appreciated.
It looks like the characteristic has a length of 11 bytes. It is likely a compound value e.g. a struct or array. I could not find a datasheet with BLE information about the bike. Did you get any manuals with the product that contain any information regarding the BLE data?
It would be useful to change the settings on your bike and then read the characteristic again. See which value change. Change one parameter at a time and compare the values.
Can you confirm whether your SB20 has any other characteristics?
Can you confirm which values the stages app shows you? This would give you an indication which values must be inside the 11bytes (or additional characteristics).
No... I haven't got any documentation with the bike, and it apparently also doesn't show up in the Bluetooth database.
I've done a lot of testing today, and I'm able to connect to the generic/standard fitness characteristics UUID 180A & 1826, but no succes with the custom one shown above.
The notify value in the screenshots above represents the gears, and it changes accordingly when testing with the nRF App and also the other Bluetooth scanner app.
So if I was able to connect to it with the ESP32 it would be a "simple" coding job to show something on a attached display.
I'm sort of standing in a corner knocking my head in to the wall at the moment, but haven't given up yet