Skip to content
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

Matter Linux Bridge example - Thread commissioning #31869

Open
FHFS opened this issue Feb 2, 2024 · 1 comment
Open

Matter Linux Bridge example - Thread commissioning #31869

FHFS opened this issue Feb 2, 2024 · 1 comment

Comments

@FHFS
Copy link

FHFS commented Feb 2, 2024

Hello everyone,

I am trying to get the Matter Linux Bridge example to run with a Thread radio.

GitHub hash of the SDK that was being used:
commit from last week: 9bde938

RCP Version:
OPENTHREAD/thread-reference-20200818-2475-g7c5dca178; NRF52840; May 17 2023 17:04:40

Platform:
Raspberry Pi 4 with Ubuntu 22.04

I can build the example using:
./scripts/examples/gn_build_example.sh examples/bridge-app/linux out/debug/bridge-app chip_enable_openthread=true

I modified the chip-cirque-device-base Dockerfile to use Ubuntu 22.04 as a base image and included bluez and bluetooth in the apt install command.

The chip-cirque-device-base image is used as a base for the Matter Linux Bridge Dockerfile.
For the Matter Linux Bridge image I modified the entrypoint.sh:

#!/bin/bash

service dbus start
sleep 1
service avahi-daemon start
sleep 1
bluetoothd &
sleep 1

echo -e 'OTBR_AGENT_OPTS="-I wpan0 -B eth0 spinel+hdlc+uart:///dev/ttyUSB0 trel://eth0"\nOTBR_NO_AUTO_ATTACH=0' > /etc/default/otbr-agent
service otbr-agent start

sleep 1
ot-ctl panid 0x1234
ot-ctl ifconfig up
ot-ctl thread start

chip-bridge-app --thread

I can start the container with the command:
docker run -v /dev/ttyACM0:/dev/ttyUSB0 -v /dev/ttyAMA0:/dev/ttyAMA0 --privileged --net=host matterbridge:latest

From inside the container I confirmed Bluetooth is working using bluetoothctl. The otbr-agent service is running and with ot-ctl I can scan for networks.

However after I successfully commission the device, the openthread radio is not configured. The openthread state is even disabled. Commissioning logs: MatterBridge.txt

How do I make sure the OpenThread Radio gets configured during commissioning?

@github-actions github-actions bot added the linux label Feb 2, 2024
@FHFS FHFS changed the title Matter Linux Bridge app - Thread commissioning Matter Linux Bridge example - Thread commissioning Feb 2, 2024
@FHFS
Copy link
Author

FHFS commented Feb 5, 2024

I've added some variables to args.gni

chip_enable_openthread = true
chip_openthread_ftd = true
chip_config_network_layer_ble=true
chip_enable_openthread=true
chip_device_config_thread_ftd=true
chip_device_uses_otbr_posix_dbus=true
chip_enable_ble=true
chip_openthread_border_router=true

Only when I added the last one chip_openthread_border_router the OpenThread radio was commissioned onto the thread network.

Is it possible to commission the thread radio without being a border router?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants