BLE client connection problems
Posted: Wed Jul 25, 2018 9:45 pm
Hey folks,
I am trying to connect to a BLE device (Shimano SC-E8000). For now I just want to read a few characteristics to ensure I have a stable connection. Unfortunatly I canĀ“t get it right.
Here is what I did:
Using the nRF Connect App I got the Service and characteristic I want to read out.
I am interested in the Service: Device Information: UUID 0x180A
and the Manufacturer Name String: UUID 0x2A29
result image
With this information I opened Niel Kolbans BLE Client example and changed the serviceUUID and charUUID to my discovered UUIDs in the following way:
basicly I added "-0000-1000-8000-00805f9b34fb" to the UUID. I got this information from Andreas Spiess, Youtube, (min: 9:50)
I also tried using the short UUIDs like this with the same result:
Is this the correct way of writing the UUIDs or is this allready the mistake I am looking for?
Now when I run the sketch on the ESP32 this is the result:
I noticed the ESP32 discovers the device I am looking for but does not connect to it.I guess I messed something up with the UUIDs? Also the serial Monitor gives me the information of this new service UUID ": 000018ff-5348-494d-414e-4f5f424c4500"
So I tried putting this in the sketch instead of the 0x180A UUID. Here is the result:
Now the ESP32 can connect to the device and finds the service I am looking for but aborts after that. Why is that? Is the device protected? Also the BLE device is restarting after this connection attampt.
I would highly appreciate your help.
L.Kording
I am trying to connect to a BLE device (Shimano SC-E8000). For now I just want to read a few characteristics to ensure I have a stable connection. Unfortunatly I canĀ“t get it right.
Here is what I did:
Using the nRF Connect App I got the Service and characteristic I want to read out.
I am interested in the Service: Device Information: UUID 0x180A
and the Manufacturer Name String: UUID 0x2A29
result image
With this information I opened Niel Kolbans BLE Client example and changed the serviceUUID and charUUID to my discovered UUIDs in the following way:
Code: Select all
serviceUUID("0000180A-0000-1000-8000-00805f9b34fb");
charUUID("00002A29-0000-1000-8000-00805f9b34fb");
I also tried using the short UUIDs like this with the same result:
Code: Select all
serviceUUID((uint16_t)0x180A);
charUUID((uint16_t)0x2A29);
Now when I run the sketch on the ESP32 this is the result:
Code: Select all
Starting Arduino BLE Client application...
BLE Advertised Device found: Name: SCE8000, Address: d7:ed:14:15:38:03, serviceUUID: 000018ff-5348-494d-414e-4f5f424c4500
So I tried putting this in the sketch instead of the 0x180A UUID. Here is the result:
Code: Select all
Starting Arduino BLE Client application...
BLE Advertised Device found: Name: SCE8000, Address: d7:ed:14:15:38:03, serviceUUID: 000018ff-5348-494d-414e-4f5f424c4500
Found our device! address: Forming a connection to d7:ed:14:15:38:03
- Created client
- Connected to server
- Found our service
abort() was called at PC 0x401810d3 on core 1
Backtrace: 0x40090c38:0x3ffd5ab0 0x40090e3b:0x3ffd5ad0 0x401810d3:0x3ffd5af0 0x4018111a:0x3ffd5b10 0x4016ebb3:0x3ffd5b30 0x400d4579:0x3ffd5b50 0x400d1733:0x3ffd5bb0 0x400d1932:0x3ffd5c00 0x40188c90:0x3ffd5c60
Rebooting...
I would highly appreciate your help.
L.Kording