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

How do I commission my thread device using CHIP tool? (CON-1044) #837

Closed
i-kratko opened this issue Feb 12, 2024 · 8 comments
Closed

How do I commission my thread device using CHIP tool? (CON-1044) #837

i-kratko opened this issue Feb 12, 2024 · 8 comments

Comments

@i-kratko
Copy link

I have a Thread Border Router that is connected to a device flashed with the light example. They are bot running the same dataset and are seemingly connected to one another. How do I commission the device flashed with the example to the chip tool? I have tried the following command:
pairing ble-thread 0x7283 hex:0e080000000000010000000300001835060004001fffe00208333256d779e3a9220708fdd90403948d42000510cfdb1dfac7cc1b393a07c927e76ceeae030f4f70656e5468726561642d32346134010224a40410f1009d5088ed9d7642fd8bba12a865cb0c0402a0f7f8 20202021 3840

@github-actions github-actions bot changed the title How do I commission my device using CHIP tool? How do I commission my device using CHIP tool? (CON-1044) Feb 12, 2024
@dhrishi
Copy link
Collaborator

dhrishi commented Feb 13, 2024

@i-kratko So you mean, the ESP Thread device is already on IP and is a part of the Thread network by the Border Router? If that's the case, you can use the chip-tool onnetwork command:

chip-tool pairing onnetwork node-id setup-pin-code

Also, the Thread Border Router should also be connected to the Wi-Fi network and the host machine running the pairing command should be on the same Wi-Fi

@i-kratko
Copy link
Author

Should the Thread Border router also be running matter. I am runnung a thread border router that is based on the example given in the idf repo - ot_br.

@dhrishi
Copy link
Collaborator

dhrishi commented Feb 13, 2024

No, it is not required. The Thread Border Router just has to bridge between the Wi-Fi and Thread networks.

@i-kratko i-kratko changed the title How do I commission my device using CHIP tool? (CON-1044) How do I commission my thread device using CHIP tool? (CON-1044) Feb 13, 2024
@i-kratko
Copy link
Author

@i-kratko So you mean, the ESP Thread device is already on IP and is a part of the Thread network by the Border Router? If that's the case, you can use the chip-tool onnetwork command:

chip-tool pairing onnetwork node-id setup-pin-code

Also, the Thread Border Router should also be connected to the Wi-Fi network and the host machine running the pairing command should be on the same Wi-Fi

Doing this commissioned the device successfully and all the example commands that were given in the esp-idf documentation ran trough. Thanks for the assistance.

@i-kratko
Copy link
Author

I am reopening the issue since I've started having difficulties with commissioning once again. I have added some extra code that reports a light sensor reading the same way the light reports its state. I have connected the device to my Thread device to my Thread border router and the connectivity between them seems fine since I can ping them from one another. I can ping the IPv4 and IPv6 address of the border router. I cannot ping any of the IPv6 addresses on the thread matter device.

Here is my setup: I am running the chip tool on an ubuntu virtual machine. I cannot ping the IPv6 address of the border router using the ubuntu vm. The vm is on a bridged network adapter. If i try to commission the device with wifi it goes trough fine using the onnetwork command.

Here are the chip tool longs when trying to pair the device:

>>> pairing onnetwork 0x7283 20202021
[1708172911.745388][22885:22885] CHIP:TOO: Command: pairing onnetwork 0x7283 20202021 
[1708172911.757800][22885:22887] CHIP:CTL: Setting attestation nonce to random value
[1708172911.757842][22885:22887] CHIP:CTL: Setting CSR nonce to random value
[1708172911.758030][22885:22887] CHIP:CTL: Generating NOC
[1708172911.758224][22885:22887] CHIP:FP: Validating NOC chain
[1708172911.758526][22885:22887] CHIP:FP: NOC chain validation successful
[1708172911.758549][22885:22887] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669
[1708172911.758554][22885:22887] CHIP:TS: Last Known Good Time: 2023-10-14T01:16:48
[1708172911.758557][22885:22887] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00
[1708172911.758559][22885:22887] CHIP:TS: Retaining current Last Known Good Time
[1708172911.763879][22885:22887] CHIP:FP: Metadata for Fabric 0x1 persisted to storage.
[1708172911.779267][22885:22887] CHIP:TS: Committing Last Known Good Time to storage: 2023-10-14T01:16:48
[1708172911.791614][22885:22887] CHIP:CTL: Joined the fabric at index 1. Fabric ID is 0x0000000000000001 (Compressed Fabric ID: 68F63C8582E5B2DA)
[1708172911.794742][22885:22887] CHIP:DIS: Updating services using commissioning mode 0
[1708172911.794957][22885:22887] CHIP:DIS: CHIP minimal mDNS started advertising.
[1708172911.795148][22885:22887] CHIP:DL: Using wifi MAC for hostname
[1708172911.795157][22885:22887] CHIP:DIS: Advertise operational node 68F63C8582E5B2DA-000000000001B669
[1708172911.795166][22885:22887] CHIP:DIS: Responding with _matter._tcp.local
[1708172911.795169][22885:22887] CHIP:DIS: Responding with 68F63C8582E5B2DA-000000000001B669._matter._tcp.local
[1708172911.795173][22885:22887] CHIP:DIS: Responding with 68F63C8582E5B2DA-000000000001B669._matter._tcp.local
[1708172911.795176][22885:22887] CHIP:DIS: Responding with 0800276550680000.local
[1708172911.795178][22885:22887] CHIP:DIS: Responding with 0800276550680000.local
[1708172911.795182][22885:22887] CHIP:DIS: Responding with _I68F63C8582E5B2DA._sub._matter._tcp.local
[1708172911.795185][22885:22887] CHIP:DIS: CHIP minimal mDNS configured as 'Operational device'; instance name: 68F63C8582E5B2DA-000000000001B669.
[1708172911.796064][22885:22887] CHIP:DIS: mDNS service published: _matter._tcp
[1708172911.867626][22885:22887] CHIP:DL: Long dispatch time: 110 ms, for event type 2
[1708172942.912865][22885:22887] CHIP:DIS: Timeout waiting for mDNS resolution.

What should I try troubleshooting. I can provide additional information if necessary.

@i-kratko i-kratko reopened this Feb 17, 2024
@wqx6
Copy link
Contributor

wqx6 commented Mar 6, 2024

What should I try troubleshooting. I can provide additional information if necessary.

Looks like the chip-tool cannot resolve the address for the Thread End device? What's the backbone netif of the Thread border router? Is the backbone netif connected to the same local network as the chip-tool? You can check it by avahi-browse -rt _meshcop._udp to see whether there is service advertised by the Thread BR.

@dhrishi
Copy link
Collaborator

dhrishi commented Mar 29, 2024

@i-kratko Can you please provide the requested details? Or else close the issue if resolved

@dhrishi
Copy link
Collaborator

dhrishi commented Apr 6, 2024

Closing. Feel free to re-open by providing the requested details.

@dhrishi dhrishi closed this as completed Apr 6, 2024
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