loop-through, nRF52480-dongle on PC-COM, nRf5340_DK on UART, fast on BLE

Hi,

Im using:
nRF Connect 1.9.0, Visual Studio Code.
I have:
a nRF52480-dongle
a nRf5340_DK

I would like to have Samples (code), to have a loop through with the highest possible througput speed (using PHY 2Mhz)

(sample-code for) a BLE-Central on the nRF52480-dongle, with the USB-connector as COM access (not via UART on GPIO-pins, that must be connected to pins on the nRF52480-dongle)
(and it is preferable, that the BLE-Central is capable, to address more BLE-Peripherals)

(sample-code for) a BLE-Peripheral on the nRf5340_DK, where a UART-is used.

Then have a loop-through set up in the following manner:
PC(send) -> USB-CDC TX -> BLE-Central sending => --air-- => BLE-Peripheral receiving -> Uart-TX
connection on Peripheral UART-TX connected to UART-RX
Uart-RX -> BLE-Peripheral sending => --air-- => BLE-Central receiving -> USB-CDC-RX -> PC(receive)

The questions are:
1) What sample is needed for the Central to be used on the nRF52480-dongle (with COM access, via the USB-connector)
2) What sample is needed for the Peripherall to be used on the nRf5340_DK (with Uart GPIO connections)


Best Regards,
Theo

PS: i already have seen/used the througput-sample (is fast but only from central to peripheral), the NUS-central sample(is not fast and works using uart) , the NUS-peripheral sample(is not fast).
and seperately i have seen/used the CDC_acm sample on the nRF52480-dongle

Parents Reply Children
  • Hi Amanda,

    Thanks for a first answer, but is only a partial answer

    my original questions are:
    1) What sample is needed for the Central to be used on the nRF52480-dongle (with COM access, via the USB-connector)
    2) What sample is needed for the Peripherall to be used on the nRf5340_DK (with Uart GPIO connections)

    Looking forward to an answer on this, thanks in advance.

    Best Regards,

    Theo

  • Hi, 

    TF mulder said:
    1) What sample is needed for the Central to be used on the nRF52480-dongle (with COM access, via the USB-connector)

    Currently, there is no sample that meets your requirement in NCS. 

    The thing with the peripheral_uart sample is that it takes whatever is coming in through the UART on the nRF and transmits it to the connected device, which then outputs it through its 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 restrained 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.

    TF mulder said:
    2) What sample is needed for the Peripherall to be used on the nRf5340_DK (with Uart GPIO connections)

    See Bluetooth: Peripheral UART, and refer to the prj.conf. For nRF5340, it also needs https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/throughput/child_image/hci_rpmsg.conf 

    -Amanda

  • Hi Amanda,

    Thanks for the advices. For the central on dongle i wil use a nRF52480_DK, to try to add a USB CDC into the Central-Uart, and than try to build for the dongle (hope that will work).

    But still its a shame that there is no complete ready solution. I would think a lot of people would like to have that as samples to have a quicker start.

    Best Regards,

    Theo

  • Hi,

    Thanks for the feedback. I will report to the internal. Since we move from nRF5 SDK to NCS, we are still working on importing and developing the examples in NCS. Sorry for the inconvenience. 

    -Amanda 

  • Hi Amanda,

    Ok thanks.

    I started to try to combine the samples: central_uart  and cdc_acm

    I added the items of the cdc_acm.prj.conf into the central_uart's prj.conf..

    Then  i started to merge items of cdc_acm main,c  into central_uart's main.c

    on top the merged *.h files..

    this already does not build, it seems to have problems with 

    #include <usb/usb_device.h>
    the first error of the build is:
    In file included from C:\ncs\v1.9.1\zephyr\include\usb\usb_device.h:43,
    from c:\Projects\NordicSemi\nRF52840DK\central_uart\src\main.c:50:
    C:\ncs\v1.9.1\zephyr\include\logging\log.h:417:3: error: redefinition of '__log_current_const_data'
    417 | __log_current_const_data __unused = \
    | ^~~~~~~~~~~~~~~~~~~~~~~~

    then i tried to merge items of the  CMakeLists.txt    (but dis not resolve this error)

    How to combine samples?  What procedure to follow?  Maybe some pointers/documentation.

    like:  how to handle, combining of  e.g.

    in main.c:
    LOG_MODULE_REGISTER(LOG_MODULE_NAME);
    LOG_MODULE_REGISTER(cdc_acm_echo, LOG_LEVEL_INF);

    Best Regards,

    Theo

Related