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

Pairing with second instance of chiptool results in failure CHIP Error 0x00000038: Invalid PASE parameter #15362

Closed
vinay-apple opened this issue Feb 18, 2022 · 8 comments

Comments

@vinay-apple
Copy link

Problem

Pairing with second instance of chiptool results in failure CHIP Error 0x00000038: Invalid PASE parameter

SHA: 149c271

Steps to reproduce

  1. Pair M5 with chip tool1 and see that toggle light works fine.
  2. Enable pairing from chip tool1
  3. Try to pair M5 with second instance, chip tool 2 (on a different device) and seeing below error.

Note: Same error was seen on a different setup when tried to install chip tool 2 on the same device and tried to pair M5 with it.

2022-02-18 12:52:01.170431-0800 localhost CHIPTool[4853]: (CHIP) [com.zigbee.chip:all] � [1645217521170] [4853:261377] CHIP: [SC] Received error (protocol code 2) during PASE process. ../../../../../../../../../../../CHIP-TOOL/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:846: CHIP Error 0x00000038: Invalid PASE parameter
2022-02-18 12:52:01.170503-0800 localhost CHIPTool[4853]: (CHIP) [com.zigbee.chip:all] � [1645217521170] [4853:261377] CHIP: [SC] Failed during PASE session setup. ../../../../../../../../../../../CHIP-TOOL/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:846: CHIP Error 0x00000038: Invalid PASE parameter
2022-02-18 12:52:01.170584-0800 localhost CHIPTool[4853]: (CHIP) DevicePairingDelegate status updated: 1
2022-02-18 12:52:01.170791-0800 localhost CHIPTool[4853]: (CHIP) PersistentStorageDelegate Set Key StartKeyID
2022-02-18 12:52:01.170967-0800 localhost CHIPTool[4853]: (CoreFoundation) [com.apple.defaults:User Defaults] CFPrefsPlistSource<0x282562000> (Domain: com.apple.chiptool, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) skipping setting already-present value for key StartKeyID
2022-02-18 12:52:01.171063-0800 localhost CHIPTool[4853]: (CHIP) DevicePairingDelegate Pairing complete. Status ../../../../../../../../../../../CHIP-TOOL/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:846: CHIP Error 0x00000038: Invalid PASE parameter
2022-02-18 12:52:01.171277-0800 localhost CHIPTool[4853]: (CHIP) [com.zigbee.chip:all] � [1645217521171] [4853:261377] CHIP: [EM] Sending Standalone Ack for MessageCounter:389034827 on exchange 53941i

Chiptool1-logs.txt
Failed-during-pase-session-setup-chiptool2-logs.txt
Failed-during-pase-session-setup-M5-logs.txt

@kean-apple
Copy link

kean-apple commented Feb 18, 2022

I'm seeing the same with 2 chip tools apps on the same device. I suspect on network pairing is broken? this same use case worked for me yesterda
failed-PASE-session-2nd-pairing-chiptool.txt
failed-PASE-session-2nd-pairing-M5-logs.txt
y

@bzbarsky-apple
Copy link
Contributor

@emargolis changed PASE stuff around in #15318. @kean-apple are you willing to check whether things work on SHA 4394fcb (right before that PR) and on SHA 8a5032d (which is the merge of that PR)?

@bzbarsky-apple
Copy link
Contributor

@kean-apple @vinay-apple That's all with the iOS chip-tool? Because this:

./out/debug/standalone/chip-tool administratorcommissioning open-basic-commissioning-window 600 17 0 --timedInteractionTimeoutMs 10000

./out/debug/standalone/chip-tool pairing onnetwork 18 20202021 --commissioner-name beta

works fine for me on tip....

@kean-apple
Copy link

I was able to verify on 4394fcb that I was able to pair with 2nd instance of iOS chiptool.

With 8a5032d I was seeing a separate issue with my M5 board not able to connect to my Wifi on the 1st pairing so I haven't been able to validate the 2nd chiptool scenario yet

This is all with iOS chiptool . .Chaitanya mention chiptool CLI worked for him with RasPi as well

@kean-apple
Copy link

OK. I confirmed with 8a5032d the failure starts happening.

@emargolis
Copy link
Contributor

In the src/controller/CHIPDeviceController.cpp file (line 854) there is TODO. I believe this should be the root cause of the issue. For the ECM case the the correct PasscodeId (instead of kDefaultCommissioningPasscodeId) should be passed to the Pair() function.

emargolis added a commit to emargolis/connectedhomeip-1 that referenced this issue Feb 22, 2022
andy31415 pushed a commit that referenced this issue Feb 22, 2022
@kean-apple
Copy link

The temp fix seems to resolve the issue. I'm able to pair with 2nd iOS chiptool instance

@emargolis
Copy link
Contributor

This was initially addressed with #15430 and then proper fix was implemented as part of work on #15735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants