-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GET or POST from esp8266 #851
Comments
Hey I have been facing a problem about sending GET and POST request using AT command, I am using Arduino IDE, I am trying to send GET request from serial monitor (Arduino IDE) using AT command. But the problem is I failed to send GET/POST request from serial monitor (of Arduino IDE). AT+RST AT+CWJAP="ssid","password" AT+CIPSTART="TCP","shotlu.usrs0.com",80 AT+CIPSEND=75
Now the problem is AT+CIPSEND dose not working on Arduino IDE, When I am sending GET request it shows me this message; AT+CIPSEND=75
SEND OK +IPD,168: <title>400 Bad Request</title>400 Bad Requesthosting OK OK" (By those command I am trying to hit a php file which is called receiver.php; ) But I have checked those command in different ide which is calle RealTerm. Where I have successfully sent GET request.But Don't know why I am getting those message from Arduino IDE. Please guys help me, if you know something about this problem. |
@asadujjamandm |
@Links2004 |
basically you can run any Arduino code direct on the ESP chip itself. first steps: supported boards: |
@Links2004 hey man thnx!!! for your reply, basically I am new at this platform, so I have no clear idea about this. In my project there is a sensor which can take data from environment, now I need to send those data to a web server, for that I saw some video tutorials in youtube where got to know about AT command. Can you please tell me is that possible to send data to a web server using those AT command from serial monitor (of Arduino IDE). |
no AT commands, no atmega chip, only the ESP + Serial adapter. |
But I am using atmega chip (arduino uno) for the sensor, if i use ESP+serial adapter how can i connect them? |
There are GPIOs, SPI and I2C available on the ESP8266. It is not 5v tolerant. If your sensors can run at 3v3 then great. If they need 5v you will need a level shifter |
@asadujjamandm Actually as presented there it runs as a Server, where as I think you are looking for a client to connect to a web server and then issue Post and Get messages from your UNO to the serial port (D0,D1) and have the ESP send them via WiFi to the web server. I am in the process of helping another user set up a client connection, but not finished yet. If the above is what you want to do then can I suggest you start by getting |
also check out https://github.com/jeelabs/esp-link/tree/v1.0.1 |
@penfold42 @drmpf I have successfully connect ESP8266 module with my arduino uno, with the help of level shifter and 10microF capacitor. As I told I am new at this platform and I saw some tutorial in youtube, so I taught that I can send my data to a web server through AT command. At this time I am little bit confused about the whole thing, cause I can connect this wifi module with internet via wifi network, and for that I used AT command which is AT+CWJAP="ssid","pasword", and I got "OK" message from the serial monitor, and also able connect with the web server using AT+CIPSTART="TCP","www.google.com",80 this command. Now the question is why I can not send GET or POST request using AT+CIPSEND ? |
I gave up on the 'AT' command set. I wrote a library to support it, but found the async msgs coming from the ESP made to too difficult to get a bullet proof version. So now I program the ESP directly from the Arduino IDE using this excellent board support. |
@drmpf i have wasted too much time behind this At command :( . In my project I just wanted to send my data to a web server. I used a sensor in my project and this sensor is connected with arduino uno, as I said I have wasted too much time, so need some easy idea for sending my data to a web server, and at this time I am totally blank, so guys please help me :'( . |
connect the sensor direct to the ESP use the Arduino IDE for ESP8266 to Program the ESP direct to send the data and you are done. |
@asadujjamandm see my suggestions above |
Works well for me in server mode (client connects to ESP8266 TCP server or Web server for config) |
By "existing arduino project" do you mean a separate arduino board with something like an atmel avr chip on it ? If so, this is not the repository for you. |
This is not the repository for you. This is a port of the arduino framework to run NATIVELY on the 8266 boards. |
If you want to add a simple wifi interface to an existing arduino avr/arm board project that was designed around a serial interface, it works great. If you want anything more than a simple TCP connection, you've picked the wrong architecture with your approach. Doing it natively on the 8266 will always be 2-10 times easier. If you feel you've been misled, complain to espressif or dozens of bloggers making claims you've misunderstood - please don't hijack an old closed issue on a repository that has nothing to do with your chosen architecture. |
Guys, I have a question.
The page you were looking for doesn't exist.You may have mistyped the address or the page may have moved. Can you please let me know, why is it always saying : Page Doesn't exist? |
You are requesting |
Yep. I figured out that one. Thanks for that.
Check the Proper Answer if you need, here http://arduino.stackexchange.com/questions/23780/how-to-capture-data-from-a-webpage-in-arduino-and-display-it-over-serial-monitor |
Did you found any solution for your problem with GET request and response "400 bad response"? I've got the same problem :/ |
Hey people! THIS ONLY REPLIES ME WITH SEND OK. There's no problem with the php script or anything else. it's just something in the format i think. please help me out guys. I am stuck with this. Thank You. |
Hello @riteshp887 :) Which firmware version have you got? Are you using Arduino IDE and Serial Monitor to communicate with module? |
@kluszon . Yes , i am using arduino ide and the serial monitor to communicate with the module. The firmware version: 0.25.0.0 (June 5 2015 16:27:16) SDK version: 1.1.1 Ai- Thinker technology. Thanks for helping :) |
Have you got ESP connected to Arduino board? If yes, I don't know exactle, why it don't work in Arduino IDE, but I got the same problem. Probably in Arduino IDE in Serial Monitor you sending command to slow (You can't do this faster insert command by hand). You should write a sketch or connect ESP directly by USB converter to PC (without Arduino board and after that GET and POST request work fine in Arduino Serial Monitor and RealTerm). |
@kluszon It works fine with real term. But actually i have to send co-ordinates using gps module. I do need arduino for getting the coordinates. I don't know what to do now. :/ |
From sketch too? My thread some time ago maybe helpful to you: http://www.esp8266.com/viewtopic.php?t=11582&p=54197#p54197 |
@kluszon I meant to say that if am sending the same commands using serial term with the same setup i.e the arduino connected to esp8266 , i am getting the results. I am able to call the php file then. But when i am working with arduino ide. I am not able to get any results. |
@riteshp887 Try me solution from link. I got the same problem "SEND OK" or "BAD REQUEST 400" form Arduino IDE without result in database. In my situation it was depend from ESP firmware version and delay in Arduino sketch. |
Hi guys, I have a question. Do I have to create a socket connection to send info to a url? Or there is a function like get or post that simply does that?
Thanks
The text was updated successfully, but these errors were encountered: