I want to convert raw hex bytes to utf8 format. The nRF5 SDK supported this with help of ble_srv_ascii_to_utf8() api. Is there something similar api available with nRF Connect SDK?
I want to convert raw hex bytes to utf8 format. The nRF5 SDK supported this with help of ble_srv_ascii_to_utf8() api. Is there something similar api available with nRF Connect SDK?
Hello Hieu,
Basically I need to convert hex bytes to ASCII and send it over BLE. So if I have 0x45 it should be represented as E. So I am wondering if there is any API exist for this in NCS.
Hi Aniket,
If it's ASCII, can't you just treat your string into a uint8_t array?
What is the type of your string in the first place? How are you handling it? I always handle simple ASCII text string as uint8_t array from the beginning, so I cannot really imagine what you want.
Hi Hieu,
I am handling it as an uint8_t array. Anyways I believe the problem was just about representation of data on nRFConnect app. I just named the characteristic, changed the format and it gave me the expected result.
Thanks for your help though
Hi Hieu,
I am handling it as an uint8_t array. Anyways I believe the problem was just about representation of data on nRFConnect app. I just named the characteristic, changed the format and it gave me the expected result.
Thanks for your help though
I'm happy to hear that you have things working as you wanted. Please feel free to close this ticket at your convenience.