This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sending hex values through ble_uart dongle

i am using the nrf52840 ble-uart  development kit examples (ble_app_uart_pca10056_s140), with an nrf52840 development tool board.  Connected to a device that only accepts hex data such as 0x7E, 0xFF, 0x06, 0x3F, 0xFE, 0xBC, through UART, i am trying to send hex from my phone to the device(smart fan), it's not responding. While debugging,  i connected the ble-uart tool to my computer via serial port and i sent the hex from the phone app to ble which then sends to the uart and i read from the console terminal. From the console output, i could only see unreadable values, instead of the hex that i sent. And sent back the hex data from the terminal, i could read it on my phone as i input them. 

how can i make it show the hex i sent through ble to the console terminal ?

any help would be welcomed.  Thank you!

Parents
  • Hello,

    Make sure that you understand the difference between ascii and hex, typically you need to use a binary mode and/or ascii to hex (or the other way around). The console window typically will believe that received values are ascii code, thereby if you are receiving hex that won't work very well. Google ascii table to find the difference.

    Best regards,
    Kenneth

Reply
  • Hello,

    Make sure that you understand the difference between ascii and hex, typically you need to use a binary mode and/or ascii to hex (or the other way around). The console window typically will believe that received values are ascii code, thereby if you are receiving hex that won't work very well. Google ascii table to find the difference.

    Best regards,
    Kenneth

Children
Related