ARMmbed / connectedhomeip

Project Connected Home over IP is a new Working Group within the Zigbee Alliance. This Working Group plans to develop and promote the adoption of a new connectivity standard to increase compatibility among smart home products, with security as a fundamental design tenet.
https://www.connectedhomeip.com
Apache License 2.0
10 stars 4 forks source link

apk: Fix sendWiFiCredentials() #131

Closed fkjagodzinski closed 3 years ago

fkjagodzinski commented 3 years ago

Problem

Unlike other methods, sendWiFiCredentials() was not acquiring a mutex. This resulted in an incomplete BLE transmission. Only the first packet fragment was received by the device and the whole flow was interrupted by a timeout on the device side.

Summary of Changes

Add a missing ScopedPthreadLock. This fixes the Wi-Fi provisioning flow. The device is able to reassemble the whole packet since it receives all the fragments now.

Fixes: #114

fkjagodzinski commented 3 years ago

Pushed the fix upstream. See https://github.com/project-chip/connectedhomeip/pull/5644.