openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
420 stars 235 forks source link

Can I run both RCP and NCP on single BR #1159

Closed bhumikaajain closed 2 years ago

bhumikaajain commented 2 years ago

On a Rpi based gateway, is it possible;e to run both wpantund and ot-ctl interface? Can I add 2 nrf52840 devices to rpi USB ports and configure one device as NCP and other as RCP?

jwhui commented 2 years ago

On a Rpi based gateway, is it possible;e to run both wpantund and ot-ctl interface? Can I add 2 nrf52840 devices to rpi USB ports and configure one device as NCP and other as RCP?

It should be possible, you'll need to specify different USB ports and network interfaces. That said, it's not a configuration that we typically see.

bhumikaajain commented 2 years ago

where can we specify USB port for RCP interface?

jwhui commented 2 years ago

where can we specify USB port for RCP interface?

See src/agent/otbr-agent.default.in

bhumikaajain commented 2 years ago

This port assignment is dynamic, if we have 2 USBs on 2 ports, then anyone can assume ACM0/ACM1. In case of NCP set up to solve this issue, we have added below configuration in its config file:

#ifndef APP_USBD_STRINGS_PRODUCT
#define APP_USBD_STRINGS_PRODUCT APP_USBD_STRING_DESC("nRF52 Thread NCP")
#endif

Now additional to ACM port, it forms one "tty/NCP" port, and we have fixed this port in wpantund.conf file as Config:NCP:SocketPath "/dev/ttyNCP" This helps our border router to refer to the correct port each time even if multiple devices are connected to USD port. So is there the same way to do this in RCP configuration?

jwhui commented 2 years ago

How the USB port is presented seems to be independent of whether it is in NCP or RCP mode. Also, APP_USBD_STRINGS_PRODUCT is a Nordic-specific configuration.

jwhui commented 2 years ago

Closing stale issue.