These are chat archives for SmingHub/Sming

16th
Mar 2018
slaff
@slaff
Mar 16 2018 09:13 UTC

so now we're supposed to use a single HttpClient for the whole application?

No, that is not needed. You can use as much HttpClients as you want. With the newer HttpClient you get out of the box things like request pipelining or SSL session resumption which help do a lot more with ESP8266.

slaff
@slaff
Mar 16 2018 09:19 UTC
@gbl08ma You can see the changes from here: SmingHub/Sming#1112
Gabriel
@gbl08ma
Mar 16 2018 13:08 UTC
I think I understand, I managed to convert all of my code to the new Sming stuff and it compiles
slaff
@slaff
Mar 16 2018 13:09 UTC
Good, glad to hear that and welcome back to Sming :)
Gabriel
@gbl08ma
Mar 16 2018 13:10 UTC
I couldn't test it yet because it can't mount the spiffs, goes on a ERROR in flash_read: r=1 at 0x... loop until it gives up
very strange because I am absolutely sure I am giving it the right spiffs address, and I'm also sure the spiffs is getting flashed at the right address, and I'm sure the flash size is set correctly, and this program used to work on this very same esp8266 I'm trying to use
slaff
@slaff
Mar 16 2018 13:12 UTC
Are you using rBoot ?
Gabriel
@gbl08ma
Mar 16 2018 13:12 UTC
I need to get this going because I'm going to use this for a school project, worst case scenario is that I'll need to take the old Sming code I used before (I still have it, it's from last summer)
yes, I'm using rboot, forgot to mention that
compiling under the linux subsystem in windows (the choco packages are quite broken)
and with "linux" I can use the esp-open-sdk
slaff
@slaff
Mar 16 2018 13:13 UTC
ok - let me see the changelog related to rBoot - now we use real flash addresses and not memory mapped one. For example if you mount something at 0x10000 in the flash you should load it with the same address.
Gabriel
@gbl08ma
Mar 16 2018 13:14 UTC
I tried passing both 0x100000 and 0x42300000 (0x100000 + 0x42300000 ). The result is the same (and it appears to be trying to read the flash from the same addresses, so I think it actually has some smarts to detect whether one is trying to use the real address or the memory mapped one)
int slot = rboot_get_current_rom(); if (slot == 0) { spiffs_mount_manual(RBOOT_SPIFFS_0, SPIFF_SIZE); } else { spiffs_mount_manual(RBOOT_SPIFFS_1, SPIFF_SIZE); }
...ok, that didn't get formatted as I wanted, anyway, that's how I'm trying to mount the filesystem
slaff
@slaff
Mar 16 2018 13:16 UTC
read the "Backwards-incompatible changes" from https://github.com/SmingHub/Sming/releases/tag/3.1.0
Gabriel
@gbl08ma
Mar 16 2018 13:16 UTC
I confirmed RBOOT_SPIFFS_0 is correct, also tried hardcoding the addresses
my code used to work with sming 3.2 or 3.3 (I think, it was last summer as I said) so I don't think the changes from version 3.1 are relevant
I think it's more likely there's some problem with my toolchain. so when I get home for the weekend, I'll do some tests using the computer I used last summer
where I still have the same toolchain I used (and the same sming I used)
Gabriel
@gbl08ma
Mar 16 2018 13:21 UTC
I'm also sure my program binary is not overwriting the spiffs, I have about 500 KB of code and the filesystem should only start at 1 MB. the esp has a 4 MB flash. I used to successfully use rboot and I could perform OTAs with it, successfully switching between slot 0 (code at 0 + filesystem at 1MB) and slot 1 (code at 2MB + filesystem at 3MB)