Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
brutzler
@brutzler
äähmmmm any link to the docs? Always searching this stuff desperately. Do not see (imho) any central starting point for searching such stuff
Me No Dev
@me-no-dev
yes that's the build
brutzler
@brutzler
thx ... bookmarked. Will test it at weekend. not too much time actually.
Then lets hope for quick integration into Arduino IDE.
And is it still the same? Already having a webserver at port 80 is not enough for recognizing the board, because the IDE is waiting for port 8266?
Me No Dev
@me-no-dev
yes
we are advertizing port 8266 as OTA port
you can change it to 80, then HTTP will be enough
void setup(){
  ....
  ArduinoOTA.setPort(80);
  ArduinoOTA.begin();
  ....
}
brutzler
@brutzler
And with this little change I do not need the prebuild?
Me No Dev
@me-no-dev
i'm 99% positive
brutzler
@brutzler
not 100% ;-)
Me No Dev
@me-no-dev
failure is always an option :)
try and youll see
brutzler
@brutzler
that will be the game. will merge the ota-stuff into my project. and throw away the old ota stuff. but as i told...weekend.
Is the WiFiUdp.h still neccessary for ArduinoOTA?
Me No Dev
@me-no-dev
no
brutzler
@brutzler
then it should be removed from the ArduinoOTA example?
Me No Dev
@me-no-dev
will be, I will add a "compatibility" example as well
brutzler
@brutzler
??? whats that?
Me No Dev
@me-no-dev
one with "TelenetServer"
brutzler
@brutzler
ok. going to bed now ... 2:00 in the "morning"
siedi
@siedi
@Links2004 great work on your http client, really appreciated. May I make a few comments / questions / suggestions for improvements
  1. The user agent is hardcoded. It doesn't check if the header is maybe added and thus sent twice (some external servers expect a certain user agent for a dumb check)
  1. from my understanding the writeToStream is blocking, means it is waiting (and blocking the main loop) until it received all the data. With a slow webserver or large data this might be a pain for the main loop. For some it is ok to wait for the http request, but if you make a regular request (e.g. I'm pooling open openweathermap) it might be good to have it kind of "asynchron". Suggestion: add it "client.handle" or whatever which can be called within the main loop + possibility to handle a callback function
siedi
@siedi
  1. Do you plan to integrate a parsing function for the server response headers?
Once again, really appreciate your efforts in the library
(sorry, the 1. 1. 1. should read 1. 2. 3. :-))
Markus
@Links2004

@siedi user agent can be made changeable.
writeToStream and getString are blocking yes they for easy usage if you want full control over the data flow use getStreamPtr and handle the data like you want.
https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266httpClient/examples/StreamHttpClient/StreamHttpClient.ino#L66

the header from the server is parsed allready see:
https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266httpClient/src/ESP8266httpClient.cpp#L521

siedi
@siedi
@Links2004 perfect! seems like I have overlooked parts of the code....many thanks
onkelfunny
@onkelfunny
hi @all. what is the best solution to set a unique id to a esp but the code is still the same. Is the eprom the correct solution to handle it?
maybe i can set the id with the serial to the eprom
Markus
@Links2004
each chip has a unique id, you can access it with ESP.getChipId();
or use the mac address
onkelfunny
@onkelfunny
i need a id like this: de_de_0990 -> load de_de config file or de_ch_1890 -> load de_ch file
the number is not important
it is not a id... it is a config identifier. 5 modules loads de_de and 5 modules load de_ch. the firmware is the same
Markus
@Links2004
then use the filesystem or the eeprom to store the information
onkelfunny
@onkelfunny
the filesystem is also the same... i have to json config files. i try to use the eeprom
the eprom will not overwrite if i flash a new firmware, correct?
Markus
@Links2004
yes
onkelfunny
@onkelfunny
ok thx!!
brutzler
@brutzler
@me-no-dev : coming back to your 99%
the trick with ArduinoOTA.setPort(80); is not working without IDE-changes.
I had to edit the platform.txt:
tools.espota.upload.pattern="{cmd}" "{path}/espota.py" -i "{serial.port}" -p 80 -f "{build.path}/{build.project_name}.bin"
otherwise there is a "no answer"
But after this changes I was always succesfull on uploading. Only with a http-server on port 80. This was enough to recognize the board in the Arduino IDE.
I tried to change the IP of my ESP between the uploads. The IDE was always loosing the port. And I had to restart it, that there was a rescan.
Thought there is a rescan durin open IDE every x minutes, but I din't see this.
brutzler
@brutzler
EDIT:
To be honest, I was not always succesfull on uploading:
Only the very first time, the ESP stucks:
Progress: 99%
Progress: 100%
End
 ets Jan  8 2013,rst cause:2, boot mode:(1,6)
 ets Jan  8 2013,rst cause:4, boot mode:(1,6)
wdt reset
Me No Dev
@me-no-dev
@brutzler that first digit inthe boot mode is looking not OK
having some hardware pulling down on your GPIOs?
brutzler
@brutzler
Yep, there is a I2C-levelshifter on D5 and D7. Added just today.
Normally the booting looks like this:
Progress: 99%
Progress: 100%
End
 ets Jan  8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
@cp:0
ld
But as I told. This was only the very first time, After this I made about 20 flash cycles. And always working fine.
Markus
@Links2004
may same as here #1017
brutzler
@brutzler
@me-no-dev : You once told me there is a rescan of the IP devices from the IDE every 10 minutes. Can not see this right now. (IDE 1.6.5 + 2.0.0-rc1)
Only get a rescan on restarting the IDE
Me No Dev
@me-no-dev
there is a bug with the IDE itself