These are chat archives for esp8266/Arduino

23rd
May 2016
liangzelang
@liangzelang
May 23 2016 12:13
@dogmaphobic Thank you for your help ,and I learned a lot from your answer .but thre is a problem , In your project https://github.com/dogmaphobic/mavesp8266 , the static ip of host is 192.168.4.1 ,and the subnet mask is 0.0.0.0 ,accroding to your answer ,the broadcast address should be 255,255,255,255 .however I printf the broadcast address out ,it is 192.168.4.255 .so why ?
@Makuna thank you for your notice ,and I will compare the differences of the both .thank you
Gus Grubba
@dogmaphobic
May 23 2016 12:56
The hard wired IP is 192.168.4.1. The (assumed) subnet is 255.255.255.0. Note that 192.168.x.x is a special, non forwarding (local) address.
John
@9H5G
May 23 2016 13:27
Is anyone here working on an atomic.h implementation?
Charles
@hallard
May 23 2016 15:08
hi guys, I'm wondering is there any git guru there, I created some PR last week that I reverted back with git revert. see esp8266/Arduino#2040 then I closed this PR
but they are already there, each time I want to do a new PR they appears, I think I tried everything with no luck so if anyone know how to get rid of these, it will really help
thanks
Vague Rabbit
@thewhiterabbit
May 23 2016 22:28
Hello again! Is there a function to only read the HTTP response body? If there isn't there should be. I'm having an awful time trying to parse the response and remove the header "junk" to get to the "good stuff", my json response, for parsing.
I was hoping for something like client.readBody();
Martin Ayotte
@martinayotte
May 23 2016 22:36
@thewhiterabbit , which library are you using ? because if it is plain ESP8266WiFi, it is normal that it is up to you to parse the response, but it is pretty easy : just throw away any lines before first empty line.
Vague Rabbit
@thewhiterabbit
May 23 2016 22:40
@martinayotte, I was iterating through the client.readStringUntil(\r); but that is kinda wasting resources if you scale up past a single client. Also, I heard there is a key called response-body, that is not correct as far as I can tell.
Martin Ayotte
@martinayotte
May 23 2016 22:47
It is not really wasting resources, it is because ESP8266WiFi is plain socket, which could be used for something else like Telnet. But if you use another library such ESP8266HTTPClient, I think you will have that parsing done for you, but in fact this is only that the library does the same job for you : throwing any line until first empty one. You can't escape from basic HTML protocol. :-)
Vague Rabbit
@thewhiterabbit
May 23 2016 22:51
I understand that you cannot bypass the HTTP protocols and the HTML protocols. I thought there was a key for the html body so that I didn't have to iterate. I will look at the ESP8266HTTPClient library and maybe that is what I was missing. So many libraries and so many authors imploring us to use their library, it gets confusing. :)
Thank you, @martinayotte, for the information about ESP8266HTTPClient.
Martin Ayotte
@martinayotte
May 23 2016 22:54
Yes ! take a look if ESP8266HTTPClient fill your need ! (because the plain ESP8266WiFi will never get a client.readBody(); since it will still be a plain Socket library.)
Vague Rabbit
@thewhiterabbit
May 23 2016 22:59
I can simply replace the ESP8266Wifi library with the ESP8266HTTPClient library or it is dependent?
Martin Ayotte
@martinayotte
May 23 2016 23:04
The ESP8266HTTPClient has not the same API, but it is including the ESP8266Wifi in background. Take a look about its examples.