This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why is UUID in wrong order?

Hi,

This time I am trying to work out the UART example.

I got it to the point where it is advertising, but the advertisement is wrong.

When I check with an Android phone, the advertisement data is all the way around. This should be the advertised one: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E And the received one: 9eca0001-0ee5-a9e0-93f3-a3b50100406e

I followed this thread but it did not help.

I tried modifying the advertisement data in the ble_nus_init:

ble_uuid128_t nus_base_uuid = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

ble_uuid128_t nus_base_uuid = {0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E};

ble_uuid128_t nus_base_uuid = {0x6E, 0x40, 0x00, 0x00, 0xB5, 0xA3, 0xF3, 0x93, 0xE0, 0xA9, 0xE5, 0x0E, 0x24, 0xDC, 0xCA, 0x9E};

But the received advertisement data always stayed the same. The ble_nus functions are coming from this site. The main function is a modified of that (removed all the parts, only kept the service_init and the advertisement_init).

Thanks for the help!

Parents
  • Is your UUID being sent out in Big Endian format? I believe the Android app is looking for it in that format. I had a similar problem with the Company ID not being recognized, being "backwards", in reality, I was sending it out as Little Endian and not Big.

  • That was my first thought too that is why I tried to modify the order of the UUID but it did not help. How do you change the Endian? Even when i set the UUID to 0s only, I received the wrong ID. No idea what is going on...

Reply Children
No Data
Related