These are chat archives for SmingHub/Sming

26th
Mar 2017
Piotr Dobrowolski
@Informatic
Mar 26 2017 12:49
Hey! I've been trying to use SSL for rBootHttpUpdater on my private (public-facing) Nginx server without luck. I've already tried settings SSL buffer size to 4k (as someone mentioned that's the size used by google), but it still seems to fail on memory allocation after some packets received. Maybe our SSL implementation is leaking, or it's just leaking in case of rBootHttpUpdater?
Piotr Dobrowolski
@Informatic
Mar 26 2017 13:00
strangely enough MQTT over SSL seems to work pretty reliably. (but haven't tried transfering huge amounts of data over it, though')
riban-bw
@riban-bw
Mar 26 2017 14:25
Each time I call System.restart(); my device boots in to the opposite rboot ROM, i.e. the boot ROM toggles on each restart. Has anyone got any ideas why?
riban-bw
@riban-bw
Mar 26 2017 14:39
It was BOOT_GPIO_SKIP_ENABLED. I think maybe we should disable this by default. Out of the box, rboot will use GPIO16 to decide whether to select another ROM at boot. I think this should probably be something a developer consciously chooses.
Piotr Dobrowolski
@Informatic
Mar 26 2017 16:11
Ok, tested it with MQTT over SSL and I easily received multiple 8k / 4k / 2k messages.
16k message obviously crashed with ssl->need_bytes=16448 > 9211
Piotr Dobrowolski
@Informatic
Mar 26 2017 19:42
What the hell. I've just wanted to subclass rBootHttpUpdate and stub out flash writing as it might've had something to do with the crashes (but didn't do that, just made an empty subclass), and now it actually managed to do a full update without crashing for the first time. But now it keeps failing again. :D
simple downloadString seems to properly download whole firmware (but getResponseString() returns ~6kb of data, which makes sense)
Oh crap, nvm, it fails now because I updated to old firmware, and Basic_rBoot by default switches to rom 1 (and default make flash only writes rom 0) - this actually sounds like a bug for me. IMO flash should overwrite rBoot config to boot from rom0...
Piotr Dobrowolski
@Informatic
Mar 26 2017 19:49
Well, ok. It works approx. once every 10 flashes now, failing on either exc 9, 28, or WDT...
Piotr Dobrowolski
@Informatic
Mar 26 2017 19:57
Ok, it looks to be somehow timing related, like i expected, as stubbing out flash writes makes the transfer work 100% of the time.
Piotr Dobrowolski
@Informatic
Mar 26 2017 23:01
What the hell... rBootHttpUpdate over SSL/TLS seems to work perfectly fine on my home network (in contrast to failing 90% of the time on work network...)