Getting issue while testing nordic service peripheral uart example in nrf52840 dongle.

Hi All,

My development IDE for BLE based firmware is Visual Studio Code.

SDK download for this version is 1.9.1 zephyr based.

I have select the example code "nrf/samples/bluetooth/peripheral uart/'  from the available application of sdk in visual studio code, build and compile.

But while running the code my dongle is only connect and disconnect with the Nordic uart service in android phone. Not able to send and rcv the data from dongle to uart and vice-versa.

So can u please give me the reply for the  below query mentioned:

1)  Not able to send and receive the data from nRF52840 dongle to PC and vice -versa. Can u please let me know about the solution to  resolve this issue.

2) Here in zephyr based code of examples select ->"nrf/samples/bluetooth/peripheral uart/'. Can i have to load the softdevice here or for the zephyr based code user do not require the soft device.

3) Also i am not able to see the printf log for LOG_INF, LOG_ERR in nRF52840 dongle while code is running. How can i enable the printf in nRF52840 dongle so that i can be easier to debug the firmware in case of issue very well

Looking forward to hear from u as soon as possible.

Regards,

RRJ

  • Hello,

    The thing with the peripheral_uart sample is that it takes whatever is coming in through the UART on the nRF, and transmitting it to the connected device, which then outputs it through it's UART. So basically a wireless UART port. 

    On the DKs, the UART of the nRF chip is routed through the debugger and via the USB cable.

    On the Dongle however, there is no debugger, and hence no forwarding of the UART to the computer. The USB pins on the dongle are connected to the peripheral USB port, and not a debugger, so the peripheral_uart sample will not work on an nRF52840 Dongle.

    I think my best advice would be to get hold of another DK. If you are restranied by the size, you can look into using the USB CDC for communication between the peripheral USB port and the computer, but to do so, I recommend you to do that development on a DK, where you have a debugger that you can debug with.

    If you only need a wireless link, then you can check out the nRF5 SDK example: SDK\examples\peripheral\usbd_ble_uart, which does pretty much that. It uses the USB peripheral instead of the UART, and otherwise, it acts as the ble_app_uart example.

    Best regards,

    Edvin

    Best regards,

    Edvin

  • Hi, 

    Thanks for the reply.

    Its to inform you that you have given the reply of only first query out of the total 3 query mentioned above.

    Looking forward to hear from you soon about the reply of below query:

    Here in zephyr based code of examples select ->"nrf/samples/bluetooth/peripheral uart/'. Can i have to load the soft device here or for the zephyr based code user do not require the soft device.

    Regards,

    RRJ

  • Hello,

    Sorry that I didn't mention those specifically. 

    2) Here in zephyr based code of examples select ->"nrf/samples/bluetooth/peripheral uart/'. Can i have to load the softdevice here or for the zephyr based code user do not require the soft device.

    as long as you use "west flash" or flash through nRF Connect for VS Code, the softdevice controller is loaded automatically.

    3) Also i am not able to see the printf log for LOG_INF, LOG_ERR in nRF52840 dongle while code is running. How can i enable the printf in nRF52840 dongle so that i can be easier to debug the firmware in case of issue very well

    The LOG_INF/LOG_ERR is printed either through UART or RTT. In the peripheral_uart example it is printed using RTT, since the UART is used by the application. However, RTT is a protocol that is handled by the debugger, which the nRF52840 dongle doesn't have. Even if you were to change it to UART, it still wouldn't be printed through the USB, because of the lack of the same debugger.

    Basically, the dongle is not a development kit. It is intended as a tool to be used with nRF Connect for Desktop -> Bluetooth, or with nrfutil as the connectivity board. The lack of the debugger makes it hard to develop on the device. If you develop on the DK, however, using the USB peripheral, you can then later port the application to run on the dongle, once you are sure that everything is working as intended with the debugger.

    Best regards,

    Edvin

Related