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

OTA on TE7 branch has invalid Location param causing QueryImage on OTA-Provider to fail #11508

Closed
liamgonyea opened this issue Nov 5, 2021 · 4 comments

Comments

@liamgonyea
Copy link
Contributor

liamgonyea commented Nov 5, 2021

Problem

When testing TC-SU-3.1 I used 3 RasPis: OTA-Provider, chip-tool, OTA-Requestor.
Commissioning works fine, from chip-tool to both OTA-Provider and OTA-Requestor but attempting to run ./chip-tool otasoftwareupdaterequestor announce-ota-provider 1234 0 0 0 4321 0 was not successful as the Location parameter read by the OTA-Provider from QueryImage was not the correct length-2 "US" but instead "USZ???"

The same commands run on the master branch commit cbf346e85d5e998d481ef137a4e5b240f2160ac3 does successfully run the commands but does not have the latest changes like the test_event_7 branch.

Testing Setup

On test_event_7 branch commit c80fd0cfd732f764eafb5b6ffc66fd10e3e28ae6 for all 3 RasPis

Failed Section of attached logs

[1636151279.825767][1311532:1311532] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_0029 Command=0x0000_0000
[1636151279.825821][1311532:1311532] CHIP:ZCL: OTA Provider received QueryImage
[1636151279.825851][1311532:1311532] CHIP:ZCL: VendorID: 0x0
[1636151279.825878][1311532:1311532] CHIP:ZCL: ProductID: 77
[1636151279.825906][1311532:1311532] CHIP:ZCL: SoftwareVersion: 0
[1636151279.825933][1311532:1311532] CHIP:ZCL: ProtocolsSupported: 0
[1636151279.825960][1311532:1311532] CHIP:ZCL: HardwareVersion: 3
[1636151279.825988][1311532:1311532] CHIP:ZCL: Location: USZ???
[1636151279.826016][1311532:1311532] CHIP:ZCL: RequestorCanConsent: 0
[1636151279.826043][1311532:1311532] CHIP:ZCL: MetadataForProvider: 0
[1636151279.826070][1311532:1311532] CHIP:ZCL: location param length 6 != expected length 2
[1636151279.826116][1311532:1311532] CHIP:DMG: ICR moving to [AddingComm]
[1636151279.826154][1311532:1311532] CHIP:DMG: ICR moving to [AddedComma]
[1636151279.826204][1311532:1311532] CHIP:EM: Piggybacking Ack for MessageCounter:0 on exchange: 27019r
[1636151279.826272][1311532:1311532] CHIP:IN: Prepared encrypted message 0xaaaab39d88a8 to 0x00000000000010E1 of type 0x9 and protocolId (0, 1) on exchange 27019r with MessageCounter:1.

TE7 TC-SU-3.1 Full Testing Logs (Fail).txt

@liamgonyea
Copy link
Contributor Author

Update

Issue is still happening on latest latest changes using RasPi.

However, I am able to successfully run ./chip-tool otasoftwareupdaterequestor announce-ota-provider 1234 0 0 0 4321 0 after changing a line in the generated C++ code for the file connectedhomeip/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp.

Roughly line 182 where it states:

SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), location.data()));

was changed to:

SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), location));

and the software img file now transfers successfully from OTA-P to OTA-R.

Test Setup

1 RasPi running OTA-Provider, chip-tool, and OTA-Requestor.
test_event_7 commit: f51eeb39de1e58c8f55a13cfc59782e8e11c6948

Logs

I have put together both Failed Logs (similar to those from original post) and Pass Logs (after confirming several times that this was the only change made)

Fail Logs OTA-P snippet:

[1637094679.965090][6380:6380] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_0029 Command=0x0000_0000
[1637094679.965142][6380:6380] CHIP:ZCL: OTA Provider received QueryImage
[1637094679.965164][6380:6380] CHIP:ZCL: VendorID: 0x0
[1637094679.965184][6380:6380] CHIP:ZCL: ProductID: 77
[1637094679.965204][6380:6380] CHIP:ZCL: SoftwareVersion: 0
[1637094679.965224][6380:6380] CHIP:ZCL: ProtocolsSupported: 0
[1637094679.965243][6380:6380] CHIP:ZCL: HardwareVersion: 3
[1637094679.965323][6380:6380] CHIP:ZCL: Location: USÿœˇˇ
[1637094679.965347][6380:6380] CHIP:ZCL: RequestorCanConsent: 0
[1637094679.965367][6380:6380] CHIP:ZCL: MetadataForProvider: 0
[1637094679.965387][6380:6380] CHIP:ZCL: location param length 6 != expected length 2

Fail Logs.zip

Pass Logs OTA-P snippet:

[1637095045.776068][6633:6633] CHIP:BDX: OutputEvent type: AckEOFReceived
[1637095045.776154][6633:6633] CHIP:BDX: Transfer completed, got AckEOF

Pass Logs.zip

@carol-apple
Copy link
Contributor

#11661 is the fix that exists on master branch which addresses this issue.

@vivien-apple
Copy link
Contributor

@liamgonyea I assume this is not happening anymore ? Can you confirm so I can close this issue.

@carol-apple
Copy link
Contributor

@liamgonyea I don't see this issue on ToT of master branch. I'll close this. Please file a new issue if you see it again.

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

6 participants