Does Zephyr have a turnkey / drop-in solution for communicating between two processors via UART?

Hello,

I am currently working through the nRF Connect SDK Intermediate training in preparation for an upcoming project. Said project will require communication between two physically separate processors over UART. Specifically, a nRF91 modem and a nRF52 BLE module.

From my research, it doesn't seem that Zephyr has a drop-in driver to facilitate communication between processors via UART, unless I am overlooking it?

Ideally, it would be as simple as enabling the driver, defining your UART pins, and defining the maximum payload size. The low level hardware and protocol framing would be handled by the driver. The message types and corresponding message payloads would be defined by the developer on the application layer. A callback function would return a pointer to the received payload (message) and payload size. Parsing and processing the message would be left to the application developer.

Does something like this not already exist? I would be surprised if not since it is such a common use case and given that Zephyr is meant to be a plug-and-play OS it seems. For reference, I have created my own version of this on FreeRTOS for the nRF52840.

I have seen SLIP, but this seems to only handle the framing layer.

Edit: If an existing solution does exist , it doesn't necessarily have to be UART based, but could be transport agnostic.

Thanks,

Derek

Parents
  • Hello,

    I may be a bit late to the party, but you mentioned: 

    Specifically, a nRF91 modem and a nRF52 BLE module

    So are those the two things that you want to communicate with eachother? In that case, there are samples in the nRF Connect SDK (NCS) showing how to do this. I don't know exactly what you intend to do, but if you aim to have the main application running on an nRF91's application core, communicate with the modem core, and use the nRF52 as a BLE device, then we have samples doing this. One of these is the NCS\nrf\applications\connectivity_bridge (particularly meant to be running on an Thingy91). This utilizes the onboard nRF52840 as a BLE device (running the ncs\zephyr\samples\bluetooth\hci_uart sample)

    Best regards,

    Edvin

  • Hey Edvin,

    Somehow I overlooked this reply, my apologies. I will take a look at this "connectivity_bridge" example to better understand what framing / transport methods are used.

    So are those the two things that you want to communicate with eachother?

    Yes exactly. The use case you described is what we intend to do. The nRF91 will talk to a Nordic BLE module over UART to provide BLE connectivity for our specific application.

Reply
  • Hey Edvin,

    Somehow I overlooked this reply, my apologies. I will take a look at this "connectivity_bridge" example to better understand what framing / transport methods are used.

    So are those the two things that you want to communicate with eachother?

    Yes exactly. The use case you described is what we intend to do. The nRF91 will talk to a Nordic BLE module over UART to provide BLE connectivity for our specific application.

Children
No Data
Related