mirko / SonOTA

Flashing Itead Sonoff devices with custom firmware via original OTA mechanism
GNU General Public License v2.0
717 stars 105 forks source link

Fix ssl protocol error when sonoff basic tries to connect to the torn… #167

Closed ashimokawa closed 5 years ago

ashimokawa commented 5 years ago

…ado server on debian

This enables TLSv1.1 support for the tornado https server which the sonoff tries to connect to. TLSv1.1 is insecure and therefore disabled by default by most modern packages. But it seems the sonoff firmware can only do TLSv1.1 Without this I got a ssl protocol error and I could not move to FinalStage.

sillyfrog commented 5 years ago

What version and device did you test this with? I'm assuming it's an older firmware? Cheers.

ashimokawa commented 5 years ago

@sillyfrog

The device is a Sonoff Basic. I got it as a present and did not buy it myself. It seems to be from 2016 and has an orange logo (not black) and the board says "Sonoff TH" (although it is not). It was untouched when I got it.

Regarding the fw version, unfortunately I cannot tell anymore since I never saw the original firmware. It might be in the SonOTA logs(?), will check that later.

(We can leave this PR open forever, it still might be helpful for someone having the same problem as I had, this patch definitely fixed it)

ashimokawa commented 5 years ago

@sillyfrog

2019-04-23 18:29:39,386: DEBUG: "romVersion": "1.2.0",

sillyfrog commented 5 years ago

Great, thanks, looks like it was an old one. I'll merge that in now. Cheers.