google-home / sample-apps-for-matter-android

The Google Home Sample App for Matter (GHSA for Matter) uses the Home Mobile SDK to create an Android app that's similar to Google Home.
Apache License 2.0
111 stars 38 forks source link

Commissioning timeout with esp32 #194

Open MysteryMS opened 10 months ago

MysteryMS commented 10 months ago

The commissioning seems to stuck at "Connecting to GHSAFM..." Last logs form the device at this part:

I (263232) chip[DIS]: mDNS service published: _matterc._udp
I (263232) chip[ZCL]: Commissioning window is now open
I (263232) chip[EM]: <<< [E:32362r S:16408 M:8440976 (Ack:260179185)] (S) Msg TX to 1:DFACA600B666FB2E [656D] [UDP:192.168.0.120%st1:54061] --- Type 0001:09 (IM:InvokeCommandResponse)
I (263262) chip[EM]: >>> [E:32362r S:16408 M:260179186 (Ack:8440976)] (S) Msg RX from 1:DFACA600B666FB2E [656D] --- Type 0000:10 (SecureChannel:StandaloneAck)

We can confirm the timeout with the logcat error:

m.gqg: Timed out waiting for commissioner to respond (ComponentInfo{com.google.homesampleapp.default/com.google.homesampleapp.commissioning.AppCommissioningService}).

After the error, it seems that the commissioning process continues? Then it gets stuck again:

I (198322) chip[SC]: SecureSession[0x3ffc61c8, LSID:16660]: State change 'kActive' --> 'kPendingEviction'
I (198342) app-devicecallbacks: Commissioning complete
I (198342) app-devicecallbacks: Current free heap: 137768

I (198342) chip[EM]: >>> [E:26315r S:16659 M:23248509 (Ack:220862636)] (S) Msg RX from 3:000000000001B669 [8EF0] --- Type 0000:10 (SecureChannel:StandaloneAck)

However, commissioning with the chip-tool CLI works normally. The project tested was all-clusters-app (from esp-matter connectedhomeip submodule at d38a649) as described in the Google Home Matter Sample

The commissioning also timed out with simpler projects, like light-switch

MysteryMS commented 10 months ago

I wonder if this is related to #180 somehow

bgelli commented 10 months ago

I had the same issue with an Eve smart plug. Could it be that my local development fabric is not compatible with a production device?

MysteryMS commented 10 months ago

It's hard to tell since I couldn't make my device work. But I don't think that would be the case, as long as it has the on/off capabilities.