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

Network adapter Ethernet to uart device on NRF52840-DK via Thread.

Good day!
The technology being evaluated is a thread.
As part of the evaluation of duplex data transmission capabilities, there is a need to create the following configuration.
Hardware Configuration:
One NRF52840-DK board is connected to the host Windows machine via USB.
Votra board nrf52840-DK is connected to the target device through UART.
Required software implementation:
When connecting the NRF52840-DK board to the Windows machine, a network interface is created and it is possible to open a data exchange channel with the target device. How can this be realized, can there be a ready-made example for quick testing of this task?

Thanks!

Parents
  • Hi Alexander,

    When connecting the NRF52840-DK board to the Windows machine, a network interface is created and it is possible to open a data exchange channel with the target device.

    Most of our examples have a Command Line Interface (CLI) over serial port. I recommend you take a look at the Thread CLI example and the OpenThread CLI Reference.

    Then, please correct me if I misunderstood, you want to comunicate over thread with another nRF52840 DK which has a UART peripheral connection with another device (for example a sensor)?

    Best regards,

    Marjeris

  • Then, please correct me if I misunderstood, you want to comunicate over thread with another nRF52840 DK which has a UART peripheral connection with another device (for example a sensor)?

    exactly! It is necessary to poll the UART device remotely over the Thread network

  • Hi Alexander,

    Are you planning to send the data over CoAP or UDP protocol? If you plan to use CoAP you could use our simple CoAP example and add a new resource for you sensor device and then add UART peripheral functionality.

    How good knowledge do you have of our SDK? I am afraid we don't have an example out of the box with Thread + UART driver, you will need to merge both the UART driver example and a Thread example (for example the Simple CoAP server example) together to get what you want.

    To add the UART driver to an example you need to enable the UART in the sdk_config.h, make sure the header files for the driver are added in the path, and add the source code to the project.

    You then need to initialize UART in your code, and add a handler for handling the data received over UART by the sensor.

    In sdk_config.h you need to set APP_UART_DRIVER_INSTANCE to 1 if CLI is enabled, and APP_UART_ENABLED needs to be set to 1.

    These configs also need to be set to 1: UART_ENABLED , UART_EASY_DMA_SUPPORT , UART1_ENABLED , and  UART1_CONFIG_USE_EASY_DMA

    You can take a look at the UART peripheral example under examples/peripheral/uart and the Simple CoAP Server example under examples/thread/simple_coap_server folder in our nRF5 SDK for Thread and Zigbee v3.2.0.

    Best regards,

    Marjeris

  • Good afternoon!
    I managed to launch the UART driver using an example "thread_freertos_coap_server_pca10056"
    How to transfer data through a thread in "transparent mode" with two NRF52840-DK boards? That is, one board is connected via UART to the computer, and the other is connected via UART to the device. It is necessary to obtain a "transparent" data exchange between these two objects.

  • Hi Alexander,

    Sorry for the late reply. Can you explain what you mean with "transparent mode"?

    Best regards,

    Marjeris

  • Hi Marjeris,

    Transparent mode means data transfer is the same as when directly connecting devices via UART.

  • Hi,

    OK I understand, but what exactly do you need help with now? As I said before you will need to setup the UART driver in the example you are using (you don't need freertos unless your application requires it), then send the data via CoAP in the UART event handler, and then read the data from CoAP on the receiving end and send this over UART again. You can post part of your code here if you need help with something specifically.

    Best regards,

    Marjeris

Reply
  • Hi,

    OK I understand, but what exactly do you need help with now? As I said before you will need to setup the UART driver in the example you are using (you don't need freertos unless your application requires it), then send the data via CoAP in the UART event handler, and then read the data from CoAP on the receiving end and send this over UART again. You can post part of your code here if you need help with something specifically.

    Best regards,

    Marjeris

Children
No Data