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

Link to UART example

Yan,

  1. You mentioned these UART examples: examples\ble_peripheral\ble_app_uart or examples\ble_central\ble_app_uart_c I was not able to find them on your web site. Please provide direct links.

  2. My external processor UART, every 5 mili-seconds @ 19.2 KBPS, transmits an 8 bit byte to UART RCV of NRF52832, which needs to convert this to BLE. Is there a more specific example for this situation?

Thanks,

Mike.

  • Hi Mike,

    1. I guess you are looking for nRF5 SDK, then it's unsurprisingly in Resources tab up on this very page;) If you plan to use one of nRF52 chips I recommend to download the latest nRF5 SDK v13.1.0 and use S132 V4.0.x Soft Device (BLE stack) on nRF52 DK board for easy prototyping and debugging (nRF52832 chip on board). I also believe that going through all Tutorials and Getting Started will be really helpful and you will appreciate that time investment down the road.
    2. OK, so you want to use physical UART at 19.2kbps baud rate to send single byte (8bits) to nRF5x chip every 5ms. Well that means 200Bytes per second, that's easily achievable with any BT LE 4.x link (you could probably even solve it with broadcasting only if you don't care about 100% receiving certainty). I would still recommend these Nordic BLE UART Service examples as the best starting point. You just need to understand that typical BLE connection uses longer "interval" then 5ms so you cannot put each byte into single PDU, you will need to group them somehow. Then depending on latency criteria you can either transmit the packets as soon as UART data arrive (if you have two dedicated BLE devices you can go with 7.5ms interval so each of them you would transfer 1-2 packets, with typical iOS or Android phone you would need to settle with their default 30-50ms so you would already need to group bytes into packets because no BLE stack today can transmit 10 packets per one interval) or if you will be grouping them and waiting until certain number of bytes arrive (e.g. 10B = 50ms) and then issue single packet over BLE link (which will be "ticking" independently on lower layers by exchanging empty packets).

    Cheers Jan

Related