Central UART on 52840 dongle

Hello everybody,
i am trying to use BLE central uart sample software in zephyr, on nrf52840 dongle. I mapped the uart outputs on pins 20 and 24 of the connector, made the loaded board or the S140 softdevice insecure and flashed via Visual Studio Code and Jlink via the programming socket on the 10 pin dongle board.
This is the result on the terminal:

*** Booting Zephyr OS build v3.0.99-ncs1  ***
Starting Bluetooth Central UART example
[Disconnected]
[Connected]

on JlinkRTTView:

00> [00:00:32.617,645] <inf> central_uart: Disconnected: D4:F0:2B:4E:B1:6D (random) (reason 8)
00> [00:00:34.202,667] <inf> central_uart: Filters matched. Address: D4:F0:2B:4E:B1:6D (random) connectable: 0
00> [00:00:35.208,679] <inf> central_uart: Connected: D4:F0:2B:4E:B1:6D (random)
00> [00:00:35.409,942] <inf> central_uart: MTU exchange done

so everything seems ok, however, the strings that I send from the peripheral via BLE do not arrive (I do not see) on the uart terminal or on the RTT; what am I doing wrong ?

Obviously the connection takes place and if I do it from a smartphone with nrftool I see the incoming strings and transmit.

(if I do the same thing using a nrf52840DK everything works and there is the transmission but I should use it on the dongle ...)

thank you
Silvio

  • Okay, then I guess the issue is not UART, I will get back to you later with more info on how to debug furhter.

    In the meanwhile, can you add printk and LOG_INF in ble_data_received to be even more certain that the function is not triggered. In case for example that there is some wrong with the debugging of the dongle.

    You can also try to use uart_tx in main, here for example, to make sure that is working as expected.

  • okay, i did what you suggested but there is no trigger.


    In summary, I would need to use central uart on nrf52840_dongle with transceiver on pins P0.20 and P0.24 without hardware flow control.

    I compiled on visual studio code for the chosen board.

    on RTTViewer it connects to me without problems and writes me on the logger 'MTU Exchange done' but it does not trigger the 'ble_data_received' call back.

    The security setting is: 'BT_SECURITY_L1'

    with an nrf52840dk card, communication works without problems.

  • hi there,
    I am attaching the code for the dongle nrf52840 and the log on RTT.

    could it be the soc device S140?

    00> [00:00:00.011,047] <inf> fs_nvs: 4 Sectors of 4096 bytes
    00> [00:00:00.011,047] <inf> fs_nvs: alloc wra: 0, fd0
    00> [00:00:00.011,077] <inf> fs_nvs: data wra: 0, 1c
    00> [00:00:00.011,199] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
    00>                                          33 78 2a 18 20 f5 61 61  a6 8b 77 60 62 83 39 2a |3x*. .aa ..w`b.9*
    00>                                          7c f1 14 e4                                      ||...             
    00> [00:00:00.016,357] <inf> bt_hci_core: No ID address. App must call settings_load()
    00> [00:00:00.016,357] <inf> central_uart: Bluetooth initialized
    00> [00:00:00.018,432] <inf> central_uart: Scan module initialized
    00> [00:00:00.018,432] <inf> central_uart: NUS Client module initialized
    00> [00:00:00.029,327] <inf> central_uart: Scanning successfully started
    00> [00:00:01.957,397] <inf> central_uart: Filters matched. Address: FC:23:45:E6:D4:AC (random) connectable: 0
    00> [00:00:02.966,827] <inf> central_uart: Connected: FC:23:45:E6:D4:AC (random)
    00> [00:00:03.168,060] <inf> central_uart: MTU exchange done

    source code

  • Hi Simon, do you have any ideas?
    I can't figure it out.

    I tried to compile both for board 52840dk on dongle by diverting the uart0 on pins 20 and 24 and to compile for 52840dongle by selecting the card. No way.
    "printk" works in the sense that on pin 24 I find all the printk of the program.
    Although it connects perfectly with the peripheral saying "mtu exchanged done" in RTT, it does not actually trigger BLE reception.

    Maybe there is something to be sent from the central to the peripheral to start the transmission?

    Let me know thank you

    best regards

    Silvio

  • hi,
    I managed to get it to work by programming a peripheral on 52832dk and a central on 52840dk card.
    The only difference is that I haven't touched any of the sources. I left 'BT_SECURITY_L2' on the central. Thus it transmits perfectly.
    If, on the other hand, I use the BLE bridge output of the connectivity bridge thingy91 as peripheral, nothing happens.

    The nrfToolBox application on a smartphone, on the other hand, receives me well from the BLE bridge of the connectivity bridge.

    I think we need to see some security settings.

    Silvio

Related