-
Notifications
You must be signed in to change notification settings - Fork 8.4k
net: ot: OpenThread HOST to RCP communication via UART #82926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kartben
merged 4 commits into
zephyrproject-rtos:main
from
lmajewski:openthread-rcp-uart
Dec 20, 2024
Merged
net: ot: OpenThread HOST to RCP communication via UART #82926
kartben
merged 4 commits into
zephyrproject-rtos:main
from
lmajewski:openthread-rcp-uart
Dec 20, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rlubos
previously approved these changes
Dec 12, 2024
Contributor
rlubos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, but overall looks good. Thanks for the contribution!
jukkar
previously approved these changes
Dec 16, 2024
…(UART) This config allows setting up the echo_client program with RCP HOST UART (via SPINEL protocol) communication. Signed-off-by: Lukasz Majewski <[email protected]>
…ART) This overlay configures the imxrt1020 EVK board to use its lpuart2 serial port to communicate with other board (in this case nRF21540-DK), which is the RCP for OpenThread protocol. The nRF Zephyr RCP is the one from Nordic (v2.7.0): west build -p always -b nrf21540dk/nrf52840 -S logging nrf/samples/openthread/coprocessor The same UART (on nRF) can be used for testing/debugging purposes with using the ot-cli's SPINEL communication program: sudo ./build/posix/src/posix/ot-cli 'spinel+hdlc+uart:///dev/ttyACM1?u art-baudrate=1000000' --verbose Signed-off-by: Lukasz Majewski <[email protected]>
This patch adds support for HOST OpenThread communication to the RCP co-processor via UART using SPINEL protocol. The aim is to use OpenThread's RCP (Radio Co-Processor) with HOST device (for example imxRT1020). Such configuration is the same as one used with PC program (ot-cli) and RCP. Signed-off-by: Lukasz Majewski <[email protected]>
917fe8a to
ee4488f
Compare
Author
|
Changes for v2:
|
This description provides information about setting up RCP (nRF21540-DK) and OT HOST (mimxrt1020_evk) to communicate with HOST PC's echo_server via OpenThread Border Router (OTBR). Signed-off-by: Lukasz Majewski <[email protected]>
ee4488f to
07517af
Compare
rlubos
approved these changes
Dec 19, 2024
jukkar
approved these changes
Dec 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch set is in some sense the follow up for #75986 - however it is much simpler as it uses UART (serial port) to communicate via SPINEL protocol with RCP device.
This patch set is agnostic to architecture on which it is running - i.e. it uses Zephyr's API for serial port communication (NXP has for example
SerialManagerprogram in their HAL).The OpenThread's RX callback is called from a system based workqueue after the serial IRQ is served.
Used HW:
west build -p always -b nrf21540dk/nrf52840 -S logging nrf/samples/openthread/coprocessorfrom Nordic SDKAnother nRF21540-DK with (ot-cli) is used as RCP for PC controlled setup to check if OpenThread's communication works as expected.
The
echo_clientprogram has been used with proper DTS and configuration overlays.west build -p always -b mimxrt1020_evk samples/net/sockets/echo_client -- -DCONF_FILE="prj.conf overlay-ot-rcp-host-uart.conf"Following code can be used to check if the communication works correctly:
Lider/Commissioner (ot-cli):(nRF21540-DK)
dataset init newdatasetdataset commit activeifconfig upthread startcommissioner startcommissioner joiner add * J01NMEChild:(imxrt1020-evk)
ot factoryresetot ifconfig upot joiner start J01NMEot thread startnet ping -c 10000 fdc2:f018:d073:9b12:0:ff:fe00:fc00