Skip to content
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

ESP32 mishandling of string BLE UUIDs in NRF.setServices() #1723

Closed
mfikes opened this issue Dec 17, 2019 · 0 comments · Fixed by #1726
Closed

ESP32 mishandling of string BLE UUIDs in NRF.setServices() #1723

mfikes opened this issue Dec 17, 2019 · 0 comments · Fixed by #1726

Comments

@mfikes
Copy link
Contributor

mfikes commented Dec 17, 2019

If you setServices using strings for BLE service / characteristic UUIDs on an ESP32 you will get errors.

For example, with 2v04:

>NRF.setServices({
:  "BCDE" : {
:    "ABCD" : {
:      value : "Hello",
:      readable : true
:    }
:  }
:});
ERROR: empty UUID type
ERROR: empty UUID type
=undefined

This results in the service being advertised, but under the wrong UUIDs. For me, instead of being advertised under the service 0xBCDE, I see 80084259-FFFF-FFFD-0000-00003FFC0000 and instead of the characteristic 0xABCD, I see 0xFEBC.

Note that if instead you use integer UUIDs, as in the following you get a correct advertisement.

>NRF.setServices({
:  0xBCDE : {
:    0xABCD : {
:      value : "Hello",
:      readable : true
:    }
:  }
:});
=undefined

Note there is a separate issue #1724 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant