Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Steve Nelson
@zenmanenergy
I have commented out my WiFi.begin() statement, but when I reboot my ESP, it auto connects to the last SSID. I don’t see method in the docs on github or on arduino.cc to turn the auto connecting on/off.
Markus
@Links2004
WiFi.disconnect(); will delete the stored config
Luc
@luc-github
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
esp8266/Arduino#779
not yet...
Luc
@luc-github
Ok - thanks - just wondering
Steve Nelson
@zenmanenergy
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
What do you mean exactly ? Can you describe the scenario ?
Steve Nelson
@zenmanenergy
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
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
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
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
may the same ip range then the coffee shop?
Steve Nelson
@zenmanenergy
oooh. would that do it?
Markus
@Links2004
then noting will work, try to change subnet (apIP)
Steve Nelson
@zenmanenergy
i’m trying 192,168,16,1
yes! you are beautiful. thank you.
David
@dmarkey
Is there a preferred HTTP client lib that works with ESPduino?
I dont see any examples as such
David
@dmarkey
Anyone?
Steve Nelson
@zenmanenergy
dmarkey did you find the answer? If you install the ESP board into the Arduino IDE using the board manager, you’ll see a bunch of examples. There is one called “WIFIClient” under “ESP8266WIFI”
look at the section titled “Installing with Boards Manager” https://github.com/esp8266/Arduino
David
@dmarkey
Looks very manual, no HTTP abstraction.
Steve Nelson
@zenmanenergy
Yes you have to manually create the HTTP strings which is a bit of a pain, but not too difficult once you get used to it. The thing that I found a bit of the pain was dealing with urlencoding. I made an example that hasnt’ been added to the library yet to simplify url encoding. look here: https://github.com/zenmanenergy/ESP8266-Arduino-Examples
David
@dmarkey
Ah, im ging to port a library, cant be bothered with all that.
sticilface
@sticilface
I'm using El capitan and now I get a "allow incoming network dialog" everytime I try to do an OTA update. The problem is that unless i click it immediately... the update fails. I've added python to firewall, and arduino... (which also asks..) does anyone have a solution... i tried this one... http://stackoverflow.com/questions/19688841/add-python-to-os-x-firewall-options but i get an error about not having Xcode...
Me No Dev
@me-no-dev
do you have Xcode?
sticilface
@sticilface
i did but had to remove it as I'm using an air with no hdd space left... having to install all that just for that is a bit of a pain!
think it runs to many gigs... and i've only 128gb ssd.
Me No Dev
@me-no-dev
yeah... no go then :) need Xcode for signing
sticilface
@sticilface
got it to work by adding a 2 second delay before the ESP tried to connect back. is long enough to work reliably..
arghhhhh
Me No Dev
@me-no-dev
lots of new security in El Captain
sticilface
@sticilface
yeah... to get the serial drivers to work, had to reboot into a mode... do stuff, then install.. total pain in the ass
i guess i can install, sign and uninstall?
Me No Dev
@me-no-dev
not really
since it's a self-signing thing
sticilface
@sticilface
mmm...
Me No Dev
@me-no-dev
you need to have the proper certs and so on services in order for the OS to recognize it as your signature
sticilface
@sticilface
guess i need to buy a new mac then... with more space! ;)
Me No Dev
@me-no-dev
unless of course you have a Mac Dev account that has a real certificate for distribution