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

mdns error when connect device #27505

Open
nykh2010 opened this issue Jun 27, 2023 · 4 comments
Open

mdns error when connect device #27505

nykh2010 opened this issue Jun 27, 2023 · 4 comments
Labels

Comments

@nykh2010
Copy link

CHIP_ERROR lastError = CHIP_ERROR_NO_ENDPOINT;

>>> onoff toggle 0x12344321 1
[1687870707.009955][1160548:1160548] CHIP:TOO: Command: onoff toggle 0x12344321 1 
[1687870707.010566][1160548:1160550] CHIP:TOO: Sending command to node 0x12344321
[1687870707.010880][1160548:1160550] CHIP:CSM: FindOrEstablishSession: PeerId = [1:0000000012344321]
[1687870707.010907][1160548:1160550] CHIP:CSM: FindOrEstablishSession: No existing OperationalSessionSetup instance found
[1687870707.010965][1160548:1160550] CHIP:DIS: OperationalSessionSetup[1:0000000012344321]: State change 1 --> 2
[1687870707.011042][1160548:1160550] CHIP:DIS: OperationalSessionSetup[1:0000000012344321]: State change 2 --> 1
[1687870707.011071][1160548:1160550] CHIP:-: src/lib/dnssd/minimal_mdns/Server.cpp:344: CHIP Error 0x00000046: No endpoint was available to send the message at ../commands/clusters/ModelCommand.cpp:62
[1687870707.011094][1160548:1160550] CHIP:TOO: Run command failure: src/lib/dnssd/minimal_mdns/Server.cpp:344: CHIP Error 0x00000046: No endpoint was available to send the message

step:

  1. close all wifi connections.
  2. enter chip-tool's interactive mode.
  3. run onoff toggle 0x12344321 1.
  4. error is "No endpoint was available to send the message, this is in expections.
  5. let wifi connect to AP.
  6. run onoff toggle 0x12344321 1 again
  7. error is "No endpoint was available to send the message. I think this is not in expections.

in some cases, for example, mdns initialization completes before wifi connection, it unable to return to normal status.

@bzbarsky-apple
Copy link
Contributor

@nykh2010 Are you on Linux or Mac? It sounds like the platform is not dispatching relevant "network changed" notifications...

@bzbarsky-apple
Copy link
Contributor

I am guessing Linux, since minimal mdns is involved.

@nykh2010
Copy link
Author

@bzbarsky-apple yes, platform is Linux.

@andy31415
Copy link
Contributor

Expectation for platform implementations is that minmdns would be restarted on networking changes.

Since notifications of networking changes is platform-specific, this probably has to be handled by the app on a platform by platform basis. I had a PR open for using a single listening socket which would have probably covered this as ANY would keep updating, however it ended up not playing well with LWIP (#27219).

I am unlikely to have time to add platform-specific dnssd restart logic to chip-tool or example apps for minmdns, however I would be happy to review patches for this.

@andy31415 andy31415 removed their assignment Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants