ct-Open-Source / tuya-convert

A collection of scripts to flash Tuya IoT devices to alternative firmwares
MIT License
4.58k stars 498 forks source link

Can not flash Gosund SP 112 (DECRYPTION_FAILED_OR_BAD_RECORD_MAC). firmware dumps included #624

Closed DanielWe2 closed 4 years ago

DanielWe2 commented 4 years ago

I got a few Gosund SP 111 and SP 112 (two). I had no problem flashing the SP 111 using tuyu-convert.

The SP112 are failing with Sending SmartConfig over and over.

From my smarthack-psk.log:

ID: 0242416f68626d64366147393149465231daefeb635d364473692c346c5336fa0e313c594cfebf478e149ff3b603e41cdd
PSK: 1c6318dc37b662a234ee1e653c7ef9f37ec0ccfa4050351d0e40d2c1850bc866
could not establish sslpsk socket: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:852)

I have two of those devices and dumped the original firmware on both (after my failed tuya-convert attempts though ) before and after registering it with the original app.

I also have the tcpdumps from both devices for the failed convert and the cloud connect. But I will only provide them if they are really needed (my phone accessed lots of other stuff on the internet and the file is full of that :( ). For me it looks like all communication with Tuya is encrypted anyway.

Firmware:

firmware-original-before-1.bin.zip firmware-original-after-registration-1.bin.zip firmware-original-before-2.bin.zip firmware-original-after-registration-2.bin.zip

Logs: Device 1: smarthack-mqtt.log smarthack-psk.log smarthack-udp.log smarthack-web.log smarthack-wifi.log

I have lost the logs from device 2. But they looked very much the same.

I think my issue is similar to #483 but maybe not?

kueblc commented 4 years ago

This is indeed #483. Thank you for the data!