These are chat archives for esp8266/Arduino

9th
Oct 2015
Luc
@luc-github
Oct 09 2015 04:35
Hi is there a way to know the capacity of SPIFFS and the current available size or occupation ?
In previous API there are such functions:
// DBG_OUTPUT_PORT.printf("\n==== SPIFFS Info ====\n"); // DBG_OUTPUT_PORT.printf("FS Mount: %d\n", FS.mount()); // DBG_OUTPUT_PORT.printf("FS Size: %s\n", formatBytes(FS.size())); // DBG_OUTPUT_PORT.printf("FS Bytes: total: %s, used: %s\n", formatBytes(FS.totalBytes()), formatBytes(FS.usedBytes())); // DBG_OUTPUT_PORT.printf("FS Blocks: total: %d, free: %d, size: %s\n", FS.totalBlocks(), FS.freeBlocks(), formatBytes(FS.blockSize())); // DBG_OUTPUT_PORT.printf("FS Pages: allocated: %d, deleted: %d, size: %s\n", FS.allocatedPages(), FS.deletedPages(), formatBytes(FS.pageSize()));
but cannot find in new SPIFFS
Thanks
Ivan Grokhotkov
@igrr
Oct 09 2015 09:29
esp8266/Arduino#779
not yet...
Luc
@luc-github
Oct 09 2015 09:29
Ok - thanks - just wondering
Steve Nelson
@zenmanenergy
Oct 09 2015 16:09
this is a crazy open ended question… but has anyone experienced WiFiClient not connecting to a server with one internet connection, but then have it work with another connection? Any idea how I could debug this?
Martin Ayotte
@martinayotte
Oct 09 2015 16:12
What do you mean exactly ? Can you describe the scenario ?
Steve Nelson
@zenmanenergy
Oct 09 2015 16:18
i’m in a coffee shop (i hacked into their router…guessed the password hehe, so I have access to their dd-wrt) anyway… if i connect my esp to their connection, it connects, gives me a local IP but if i do this: WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
it fails.
if… i change my connection to my phone, the same code works.
something must be happening at the hotspot to block or timeout the connection, but I just can’t figure out what it is.
Martin Ayotte
@martinayotte
Oct 09 2015 16:26
From the above snippet of code, it is hard to say what is happening. It could be a DNS issue ... Is the same setup with another WiFi router is working fine ?
Steve Nelson
@zenmanenergy
Oct 09 2015 16:30
yeah, that’s what is really weird. I am doing a captive portal on this device. maybe it’s f’ing up the dns somehow. I’ll just start commenting out code.
boom! dns must be it… commented out the portal and it works again. thanks.
Steve Nelson
@zenmanenergy
Oct 09 2015 16:36
it seems to boil down to these two lines:
IPAddress apIP(192, 168, 1, 1);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
if I comment them out it works, does anything look wrong there?
this is in ap_sta mode i.e.
WiFi.mode(WIFI_AP_STA);
Markus
@Links2004
Oct 09 2015 16:38
may the same ip range then the coffee shop?
Steve Nelson
@zenmanenergy
Oct 09 2015 16:38
oooh. would that do it?
Markus
@Links2004
Oct 09 2015 16:39
then noting will work, try to change subnet (apIP)
Steve Nelson
@zenmanenergy
Oct 09 2015 16:40
i’m trying 192,168,16,1
yes! you are beautiful. thank you.
David
@dmarkey
Oct 09 2015 23:52
Is there a preferred HTTP client lib that works with ESPduino?
I dont see any examples as such