BLE not working for reading certain characteristics with low-level bluetooth module #12939
-
I'm having some problems using the low-level bluetooth module. I was able to advertise my device, discover services and peripherals and get their value handles, and read several characteristics from my iPhone (i.e. 0x2a29 Manufacturer Name String: "Apple Inc."). Manufacturer name, model name, appearance, and device name all read perfectly fine using BLE.gattc_read(), but for whatever reason local time information, current time, and battery level do not. All 3 are advertised by the phone and show up when discovering services/characteristics. However, when attempting to read them, nothing happens. The IRQ is not called for the characteristic values, but is called when it finishes (_IRQ_GATTC_READ_DONE ). Setup:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
What is the status returned with the |
Beta Was this translation helpful? Give feedback.
-
Just bumping this because I haven't heard back from my issue #12958 yet. Why isn't ESP32 able to receive these callbacks? Is it a simple as a line of code added in a configuration file or is there a deeper issue? |
Beta Was this translation helpful? Give feedback.
On ESP32 it uses NimBLE. So 257 would be "invalid handle", and 261 would be "insufficient authentication" (i.e. pairing required). (I thought this might be the case, it would be privacy-very-bad if you could do unauthenticated read of those characteristics from any random phone because it would allow you to track people... I'm still kind of amazed how much they let you read from an iPhone at all... this is old news, see https://hexway.io/research/apple-bleee/ but still relevant).
Ref: https://github.com/apache/mynewt-nimble/blob/master/nimble/host/include/host/ble_att.h#L62 (NimBLE adds 0x100 to these values before returning them).