-
Notifications
You must be signed in to change notification settings - Fork 717
registerForNotify BLEUUID("0x2902") ERROR: UUID value not 2, 4, 16 or 36 bytes #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, i will check it but for now you can change it to: |
Thanks! Now it can work most of the time, but yet there is a problem. As I have five BLE servers to read data from by turns, I try to connect and disconnect for many times, but it stuck after a few minutes. The log: E (106920) BT_GATT: application already registered. It seems that the program is stuck in: |
Should the cast fix from chegewara be implementet in the codebase? |
Could you try |
Did not work. see below. (cast fix works) How do i check for the callbacks, there should be a loop somewhere?
Throws:
Throws:
|
Its taken literally, each digit is converted to ascii, which is wrong. What do you mean check for callbacks? No, the isn't any loop. |
My BLE device can both serve READ and NOTIFY on the same characteristic. So its a bit confusing. But back to the topic. Do you have any conserns about your uint16_t type cast fix? |
You can have registerForNotify() for each remote characteristic that is serving notify or indicate, and you can in addition setCallbacks() for each characteristic that can be read/write. You can also find examples about it. |
I am using the example of the BLE_client collecting data from a BLE server, which supports only "notify" characteristic, but it crashes in registerForNotify().
I am using the latest code in esp32-snippets, and I have found the wrong point as follow.
BLERemoteCharacteristic.cpp
Line 504: BLERemoteDescriptor *desc = getDescriptor(BLEUUID("0x2902"));
length("0x2902") is always 6, which leads to the error "UUID value not 2, 4, 16 or 36 bytes".
Here is the log:
[D][BLERemoteCharacteristic.cpp:484] registerForNotify(): >> registerForNotify(): Characteristic: uuid: 49535343-1e4d-4bd9-ba61-23c647249616, handle: 42 0x2a, props: broadcast: 0, read: 0, write_nr: 0, write: 0, notify: 1, indicate: 0, auth: 0
[E][BLEUUID.cpp:115] BLEUUID(): ERROR: UUID value not 2, 4, 16 or 36 bytes
[D][BLEDevice.cpp:143] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_REG_FOR_NOTIFY_EVT
[D][BLERemoteCharacteristic.cpp:364] getDescriptor(): >> getDescriptor: uuid:
[D][BLEUtils.cpp:1377] dumpGattClientEvent(): GATT Event: ESP_GATTC_REG_FOR_NOTIFY_EVT
[D][BLERemoteCharacteristic.cpp:372] getDescriptor(): << getDescriptor: Not found
[Guru Meditation Error: Core 1 panic'ed (LoadProhibited)
. Exception was unhandled.
The text was updated successfully, but these errors were encountered: