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

ScanNetworks returns no results #17730

Closed
ChengqiangShe opened this issue Apr 26, 2022 · 12 comments
Closed

ScanNetworks returns no results #17730

ChengqiangShe opened this issue Apr 26, 2022 · 12 comments
Labels
stale Stale issue or PR

Comments

@ChengqiangShe
Copy link

During the network Commissioning, the app notifies the sub-device to scan the surrounding Thread network through the ScanNetworks command and returns it to the app, but the scan result is not returned. It is suspected that during the BLE connection, scanning the Thread network will cause BLE and thread conflicts, thus losing the scanning results. Eventually lead to no thread network information returned

@jmartinez-silabs
Copy link
Member

Scan network should be done once the device is commissioned and can communicate with the chip-tool. It can then Scan for thread networks in his vicinity. I might not understand what you are attempting.

@ChengqiangShe
Copy link
Author

The App wants to know whether there is a suitable Thread network near the device during the network Commissioning process, so as to give the user a prompt

@jmartinez-silabs
Copy link
Member

And what is the thread state of the device at that point? It is probably disabled meaning the ifconfig is down. This is not the Matter commissioning process as it doesn't do a scanNetwork. Is this code you added modified?

@ChengqiangShe
Copy link
Author

After the device PASE is completed, the app will scan the thread network. This is a new feature added to our app

@bzbarsky-apple
Copy link
Contributor

@jmartinez-silabs The use case for ScanNetworks that led to it being added to the spec is to use it during commissioning to see which networks the device can see. Doing ScanNetworks once you are on an operational network is fairly pointless....

See step 11 of commisioning flows in the spec, where it says:

Commissioner MAY learn about the networks visible to the Commissionee using ScanNetworks command (see Section 11.8.8.2, “ScanNetworks Command”).

as part of talking about sending AddOrUpdate*Network to the commissionee.

@jmartinez-silabs
Copy link
Member

@bzbarsky-apple Yes I understand Boris. What I meant is that with the current examples and use of chip-tool you cannot use it to just do a BLE connect and send a scan thread network. You need to do the ble-thread command to commission the device and then you can send scan-network command. In that use case, it can be useful to see other networks and the area and maybe change network with the AddOrUpdate command.

However, @ChengqiangShe does seem to either have modifications in the chip-tool or his own controller. If that is the case, that can totally work but he also needs to make sure the end device is in the right thread state to scan. Currently, before any commissioning attempts the device thread status is disabled.

@chrisdecenzo
Copy link
Contributor

@jmartinez-silabs - it sounds like we need to add some test cases to make sure ScanNetworks can be called over the PASE connection (before AddNetworks has been called). That is the most likely/useful time to use this command.

@jmartinez-silabs
Copy link
Member

This PR that was merge sunday #19200 should fix the issue for end devices

@stale
Copy link

stale bot commented Jan 13, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Jan 13, 2023
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Jan 13, 2023
@bzbarsky-apple
Copy link
Contributor

@ChengqiangShe is there still an issue left here?

@stale
Copy link

stale bot commented Aug 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Aug 7, 2023
@stale
Copy link

stale bot commented Oct 15, 2023

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issue or PR
Projects
None yet
Development

No branches or pull requests

4 participants