ratgdo / homekit-ratgdo

A native HomeKit implementation of a Security+ 2.0 garage door controller based on ratgdo hardware
https://ratgdo.github.io/homekit-ratgdo/
GNU General Public License v3.0
214 stars 21 forks source link

Improv provisioning stalls #15

Closed thenewwazoo closed 8 months ago

thenewwazoo commented 11 months ago

During Improv-based provisioning, the various steps never "recover", and progressing requires closing the flasher UI entirely and re-connecting. Once the user has re-connected, the next step is available and succeeds (but never "recovers").

That is, instead of

Instead a user must

post-flashing

After flashing, the console log reads:

Wrote 542416 bytes (378008 compressed) at 0x0 in 37.034 seconds.
Leaving...
HARD RESET
DISCONNECT
Initializing Improv Serial
Starting read loop
Writing to stream: [0x49, 0x4D, 0x50, 0x52, 0x4F, 0x56, 0x01, 0x03, 0x02, 0x02, 0x00, 0xE5, 0x0A]
Finished read loop
Improv initialization failed. Error: Improv Wi-Fi Serial not detected

The time between DISCONNECT and Initializing Improv Serial is far, far shorter than the time required for the Improv loop to have begun running.

post wifi

After provisioning WiFi, the console log reads:

Writing to stream: [0x49, 0x4D, 0x50, 0x52, 0x4F, 0x56, 0x01, 0x03, 0x1B, 0x01, 0x19, 0x07, (ssid bytes), 0x10, (psk bytes), 0x12, 0x0A]
PROCESS {version: 1, packetType: 1, packetLength: 1, data: '[0x03]'}
Uncaught (in promise) TIMEOUT
Finished read loop

I suspect this is because the connect_wifi loop bails after 2 seconds (10 times 200ms delay). Increase this and see what happens.

kharamel commented 11 months ago

Was looking to get started with this but looks like this has been increased to 10s. Did that fix the issue?

jgstroud commented 11 months ago

I wonder if this is caused by https://github.com/ratgdo/homekit-ratgdo/pull/41

jgstroud commented 8 months ago

Fixed in #129