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

Unable to commission Thread devices through Matter #2277

Open
fostergorman opened this issue May 7, 2024 · 12 comments
Open

Unable to commission Thread devices through Matter #2277

fostergorman opened this issue May 7, 2024 · 12 comments

Comments

@fostergorman
Copy link

Describe the bug A clear and concise description of what the bug is.

I'm currently working on a Matter hub that uses both WiFi and Thread. The WiFi part is working just fine, but the Thread part has never worked.

I have an open issue with the Matter team already and it seems that the Matter side of things are working as expected.

The problem that we've narrowed it down to is that Matter never receives an ack from the thread end device. I've looked through the logs and see that there are failures, but the information provided doesn't give enough to know if this is from Matter or some other error.

I have noticed that pinging the end devices IP is intermittent and can sometimes stall endlessly.

To Reproduce Information to reproduce the behavior, including:

  1. Unsure of the hash (whatever latest is for Docker)
  2. nRF52840-dongle
  3. Using OTBR docker (see below for how it's run)
  4. Single thread leader/router (running in docker on Raspberry Pi) with thread end devices

Docker setup:

docker network create \
	--ipv6 \
	--subnet fd11:db8:1::/64 \
	-o com.docker.network.bridge.name=otbr0 \
	otbr

docker run \
	-d \
	--privileged \
	--name otbr \
	--network otbr \
	--dns 127.0.0.1 \
	-p 8080:80 \
	--sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" \
	--volume $device:/dev/radio \
	--volume /run/avahi-daemon/socket:/run/avahi-daemon/socket:ro \
	openthread/otbr \
	--radio-url spinel+hdlc+uart:///dev/radio

sudo ip -6 route add fd11:22::/64 dev otbr0 via fd11:db8:1::2

Using Matter's chip-tool (latest commit) to commission a new device onto the Thread network and Matter fabric.

Expected behavior A clear and concise description of what you expected to happen.

Matter connects to the end device using the IP provided by the Thread network and is able to communicate over Thread.

Console/log output If applicable, add console/log output to help explain your problem.

See attached file: otbr.log

@scyto
Copy link

scyto commented Jun 1, 2024

I got this working using a macvlan network, this is my compose file (i created the macvlan using portainer). I think this is because mDNS is required to have full UDP multicast access to the network. This runs on my pi with an RCP. I am using with home assistant in a VM on proxmox which connects to this OTBR. I also have full IPv6 routed network. Nothing worked until i did a)this and b)realized i need to use android not iOS to commission a device.

services:
  otbr:
    container_name: otbr
    image: "openthread/otbr:latest"
    privileged: true
    restart: unless-stopped
    networks:
      - otbr_mvl
    sysctls:
      net.ipv6.conf.all.disable_ipv6: 0
      net.ipv4.conf.all.forwarding: 1
      net.ipv6.conf.all.forwarding: 1
      net.ipv6.conf.all.accept_ra_rt_info_max_plen: 64
      net.ipv6.conf.all.accept_ra: 2
    command: --radio-url spinel+hdlc+uart:///dev/ttyUSB1?uart-baudrate=460800
    devices:
      - /dev/ttyUSB1
    dns: 127.0.0.1

networks:
   otbr_mvl:
     external: true

@fostergorman
Copy link
Author

I got this working using a macvlan network, this is my compose file (i created the macvlan using portainer). I think this is because mDNS is required to have full UDP multicast access to the network. This runs on my pi with an RCP. I am using with home assistant in a VM on proxmox which connects to this OTBR. I also have full IPv6 routed network. Nothing worked until i did a)this and b)realized i need to use android not iOS to commission a device.

services:
  otbr:
    container_name: otbr
    image: "openthread/otbr:latest"
    privileged: true
    restart: unless-stopped
    networks:
      - otbr_mvl
    sysctls:
      net.ipv6.conf.all.disable_ipv6: 0
      net.ipv4.conf.all.forwarding: 1
      net.ipv6.conf.all.forwarding: 1
      net.ipv6.conf.all.accept_ra_rt_info_max_plen: 64
      net.ipv6.conf.all.accept_ra: 2
    command: --radio-url spinel+hdlc+uart:///dev/ttyUSB1?uart-baudrate=460800
    devices:
      - /dev/ttyUSB1
    dns: 127.0.0.1

networks:
   otbr_mvl:
     external: true

Thank you for the reply. I will give that a shot sometime this week or next and let you know if it works for my case. We aren't using Home Assistant, so I'm hoping that doesn't make much of a difference.

@scyto
Copy link

scyto commented Jun 4, 2024 via email

@jwhui
Copy link
Member

jwhui commented Jun 4, 2024

Shouldn’t make any difference, but note I never figured out how to get commissioning working from the web interface.

Matter devices do not support Thread Commissioning - they support Matter Commissioning.

@fostergorman
Copy link
Author

Matter does support commissioning of Thread devices. I am able to use Matter to bring a Thread device onto the Thread network. You can see the device be brought onto the Thread network during Matter commissioning. The issue is after the device is brought onto the Thread network, it can't be reached again.

@fostergorman
Copy link
Author

Shouldn’t make any difference, but note I never figured out how to get commissioning working from the web interface. Get Outlook for iOShttps://aka.ms/o0ukef

________________________________ From: fostergorman @.> Sent: Tuesday, June 4, 2024 7:32:29 AM To: openthread/ot-br-posix @.> Cc: scyto @.>; Comment @.> Subject: Re: [openthread/ot-br-posix] Unable to commission Thread devices through Matter (Issue #2277) I got this working using a macvlan network, this is my compose file (i created the macvlan using portainer). I think this is because mDNS is required to have full UDP multicast access to the network. This runs on my pi with an RCP. I am using with home assistant in a VM on proxmox which connects to this OTBR. I also have full IPv6 routed network. Nothing worked until i did a)this and b)realized i need to use android not iOS to commission a device. services: otbr: container_name: otbr image: "openthread/otbr:latest" privileged: true restart: unless-stopped networks: - otbr_mvl sysctls: net.ipv6.conf.all.disable_ipv6: 0 net.ipv4.conf.all.forwarding: 1 net.ipv6.conf.all.forwarding: 1 net.ipv6.conf.all.accept_ra_rt_info_max_plen: 64 net.ipv6.conf.all.accept_ra: 2 command: --radio-url spinel+hdlc+uart:///dev/ttyUSB1?uart-baudrate=460800 devices: - /dev/ttyUSB1 dns: 127.0.0.1 networks: otbr_mvl: external: true Thank you for the reply. I will give that a shot sometime this week or next and let you know if it works for my case. We aren't using Home Assistant, so I'm hoping that doesn't make much of a difference. — Reply to this email directly, view it on GitHub<#2277 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWXVXHIJPVTH7FHFV57FPLZFXFX3AVCNFSM6AAAAABHLIBVV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGY4TENZZGA. You are receiving this because you commented.Message ID: @.***>

By the web interface do you mean OTBR's interface? I have never been able to get that to work either.

@jwhui
Copy link
Member

jwhui commented Jun 6, 2024

Matter does support commissioning of Thread devices.

Matter does NOT support Thread Commissioning as defined in the Thread Specification. The OTBR web interface implements Thread Commissioning.

Matter Commissioning supports configuring Thread interfaces, but that is not the same as Thread Commissioning. As a result, Thread Commissioning CANNOT be used to commission Matter devices.

@fostergorman
Copy link
Author

I think their may be a mix up of words here since both Matter and Thread use the terminology "commissioning". What I'm saying is that, through Matter commissioning, you are able to connect a Thread device to a Thread network, not that Matter is doing Thread commissioning.

@scyto
Copy link

scyto commented Jun 6, 2024 via email

@jwhui
Copy link
Member

jwhui commented Jun 6, 2024

@fostergorman , I was responding directly to this comment:

Shouldn’t make any difference, but note I never figured out how to get commissioning working from the web interface.

The OTBR web interface only implements Thread Commissioning, and not Matter Commissioning.

My assumption (maybe bad) was that the commissioning tab in OTBR would let me add a device that had a built on thread logo AND a matter logo. I assumed I would enter the key off the device and see it in the topology tab of OTBR. Personally I have no devices that have a thread logo without the matter logo.

Matter chose not to implement Thread Commissioning.

@scyto
Copy link

scyto commented Jun 6, 2024 via email

@jwhui
Copy link
Member

jwhui commented Jun 6, 2024

Thanks, does this mean if a device has a matter key printed on it that this precludes thread commission / the device won’t suppport pure thread commissioning? I had assumed the devices were in effect dual mode…

Matter devices are not currently required to implement Thread Commissioning. As a result, most do not.

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

No branches or pull requests

3 participants