Matter - Android CHIP Tool fails to send commands to clusters and read attributes from clusters

Following this link -> developer.nordicsemi.com/.../ug_matter_gs_adding_clusters.html I have set up two endpoints on a Matter end device (nRF52840 DK) and some commands and attributes cant be interacted with. I have modified the nRF Connect SDK v2.1.0 Template sample project and added a temperature sensor endpoint. Following Nordics tutorial, the On/Off cluster is needed to trigger temperature reads. My problem is when I send the on or off command to the On/Off cluster the Android CHIP Tool returns with a "Command Failed" error (See below).

    

The basic cluster works as expected and endpoint 0 does too. Not sure how to solve this error, any suggestions?

Error from End Device:

 

I: 168771 [EM]Received message of type 0x8 with protocolId (0, 1) and MessageCounter:195486001 on exchange 35492r
D: 168781 [EM]Handling via exchange: 35492r, Delegate: 0x2000cd24
D: 168787 [DMG]No command 0x0000_0001 in Cluster 0x0000_0006 on Endpoint 0x1
D: 168794 [DMG]Command handler moving to [ Preparing]
D: 168799 [DMG]Command handler moving to [AddingComm]
D: 168804 [DMG]Command handler moving to [AddedComma]
D: 168809 [DMG]Decreasing reference count for CommandHandler, remaining 0
I: 168816 [IN]Prepared secure message 0x20005124 to 0x000000000001B669 (1)  of type 0x9 and protocolId (0, 1) on exchange 35492r with MessageCounter:17585820.
I: 168830 [IN]Sending encrypted msg 0x20005124 with MessageCounter:17585820 to 0x000000000001B669 (1) at monotonic time: 000000000002937E msec
D: 168844 [DMG]Command handler moving to [CommandSen]
D: 168849 [DMG]Command handler moving to [AwaitingDe]
I: 168901 [EM]Received message of type 0x10 with protocolId (0, 0) and MessageCounter:195486002 on exchange 35492r
D: 168911 [EM]Found matching exchange: 35492r, Delegate: (nil)
D: 168917 [EM]Rxd Ack; Removing MessageCounter:17585820 from Retrans Table on exchange 35492r
D: 168925 [EM]Removed CHIP MessageCounter:17585820 from RetransTable on exchange 35492r
E: 168971 [SWU]No suitable OTA Provider candidate found
I: 168976 [SWU]No provider available

Parents Reply Children
  • Hi,

    Testing the sample you uploaded, I am able to toggle on/off on endpoint 1:

    D: 61937 [DMG]<RE> ReportsInFlight = 0 with readHandler 0, RE has no more messages
    D: 61945 [DMG]IM RH moving to [AwaitingDestruction]
    D: 61949 [DMG]All ReadHandler-s are clean, clear GlobalDirtySet
    I: 61979 [EM]Received message of type 0x10 with protocolId (0, 0) and MessageCounter:121724512 on exchange 60191r
    D: 61989 [EM]Found matching exchange: 60191r, Delegate: (nil)
    D: 61995 [EM]Rxd Ack; Removing MessageCounter:252237330 from Retrans Table on exchange 60191r
    D: 62003 [EM]Removed CHIP MessageCounter:252237330 from RetransTable on exchange 60191r
    E: 68263 [SWU]No suitable OTA Provider candidate found
    I: 68268 [SWU]No provider available
    I: 78855 [EM]Received message of type 0x8 with protocolId (0, 1) and MessageCounter:121724513 on exchange 60192r
    D: 78865 [EM]Handling via exchange: 60192r, Delegate: 0x2000cd74
    D: 78872 [DMG]Received command for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001
    I: 78879 [ZCL]On/Off set value: 1 1
    I: 78882 [ZCL]On/off already set to new value
    D: 78887 [DMG]Command handler moving to [ Preparing]
    D: 78891 [DMG]Command handler moving to [AddingComm]
    D: 78896 [DMG]Command handler moving to [AddedComma]
    D: 78901 [DMG]Decreasing reference count for CommandHandler, remaining 0
    I: 78908 [IN]Prepared secure message 0x2000515c to 0x000000000001B669 (1)  of type 0x9 and protocolId (0, 1) on exchange 60192r with MessageCounter:252237331.
    I: 78922 [IN]Sending encrypted msg 0x2000515c with MessageCounter:252237331 to 0x000000000001B669 (1) at monotonic time: 000000000001344A msec
    D: 78936 [DMG]Command handler moving to [CommandSen]
    D: 78941 [DMG]Command handler moving to [AwaitingDe]
    D: 79268 [EM]Retransmitting MessageCounter:252237331 on exchange 60192r Send Cnt 1
    I: 79275 [IN]Sending encrypted msg 0x2000515c with MessageCounter:252237331 to 0x000000000001B669 (1) at monotonic time: 00000000000135AB msec
    D: 79289 [CSM]UpdatePeerAddress: No existing OperationalSessionSetup instance found
    D: 79297 [CTL]OperationalSessionSetup[1:000000000001B669]: State change 1 --> 2
    I: 79304 [DIS]Resolving DF18303D6875348B:000000000001B669 ...
    I: 79424 [EM]Received message of type 0x10 with protocolId (0, 0) and MessageCounter:121724514 on exchange 60192r
    D: 79435 [EM]Found matching exchange: 60192r, Delegate: (nil)
    D: 79441 [EM]Rxd Ack; Removing MessageCounter:252237331 from Retrans Table on exchange 60192r
    D: 79449 [EM]Removed CHIP MessageCounter:252237331 from RetransTable on exchange 60192r
    I: 79458 [EM]Received message of type 0x10 with protocolId (0, 0) and MessageCounter:121724515 on exchange 60192r
    I: 79504 [DIS]Checking node lookup status after 200 ms
    I: 94304 [DIS]Checking node lookup status after 15000 ms
    E: 94309 [DIS]OperationalSessionSetup[1:000000000001B669]: operational discovery failed: 32
    q
    uart:~$ I: 248283 [EM]Received message of type 0x8 with protocolId (0, 1) and MessageCounter:121724516 on exchange 60193r
    D: 248293 [EM]Handling via exchange: 60193r, Delegate: 0x2000cd74
    D: 248299 [DMG]Received command for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0000
    I: 248307 [ZCL]On/Off set value: 1 0
    I: 248310 [ZCL]Toggle on/off from 1 to 0
    D: 248314 [DMG]Endpoint 1, Cluster 0x0000_0006 update version to 42c7976f
    D: 248321 [DMG]Command handler moving to [ Preparing]
    D: 248326 [DMG]Command handler moving to [AddingComm]
    D: 248330 [DMG]Command handler moving to [AddedComma]
    D: 248335 [DMG]Decreasing reference count for CommandHandler, remaining 0
    I: 248343 [IN]Prepared secure message 0x2000515c to 0x000000000001B669 (1)  of type 0x9 and protocolId (0, 1) on exchange 60193r with MessageCounter:252237332.
    I: 248357 [IN]Sending encrypted msg 0x2000515c with MessageCounter:252237332 to 0x000000000001B669 (1) at monotonic time: 000000000003CA25 msec
    D: 248371 [DMG]Command handler moving to [CommandSen]
    D: 248376 [DMG]Command handler moving to [AwaitingDe]
    I: 248496 [EM]Received message of type 0x10 with protocolId (0, 0) and MessageCounter:121724517 on exchange 60193r
    D: 248506 [EM]Found matching exchange: 60193r, Delegate: (nil)
    D: 248512 [EM]Rxd Ack; Removing MessageCounter:252237332 from Retrans Table on exchange 60193r
    D: 248520 [EM]Removed CHIP MessageCounter:252237332 from RetransTable on exchange 60193r
    

    So you code is right.

    Try to remove your build folder and build again, then erase all and flash again.

    Try to download the chip-tool from https://github.com/nrfconnect/sdk-connectedhomeip/releases/tag/v2.1.0.

    Try the same on another android phone and see if the issue persists.

    Regards,
    Sigurd Hellesvik

Related