ESP8266 doesn't accept AT Commands anymore - arduino

So recently I've been working on some kind of project that uses arduino and esp8266 to make an HTTP get request from a basic website that I created. But somehow I messed things up while sending AT commands using the arduino Serial monitor. Now I doesn't accept any AT command and as soon as I open the Serial monitor I always get this message :
220---------- Welcome to Pure-FTPd [privsep] ----------
220-You are user number 19 of 500 allowed.
220-Local time is now 13:29. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 3 minutes of inactivity.
I'm just want to be able to communicate with it using its AT commands again .
Any help would be much appreciated :)

Related

Failed to make requests to ESP8266 Webserver from an android app

So I have an ESP device that is connected to my WiFi network. It runs a web server and now I want to make requests to this webserver from my android app. So I tried a couple of things and none got satisfied.
Things I tried and why not suitable for me.
Setting up mDNS:
Can't use it since android doesn't really do mDNS it fails in the lookup.
Setting a Static IP:
This approach will fail if the routers' gateway is changed. (at least that's what I believe).
(Can anyone elaborate on this ^. AFAIK if you want to make a static IP you need to match the given gateway with your router's gateway, So if I configured esp board for my router, it might not work with someone else's router.)
Setting a WebSocket connection:
To do this also need the hostname which is IP again.
Asking IP from user:
Since this is going to be a product I can't ask the user to provide the IP address in the mobile application. It leads to a lack of user experience.
I still hope that there should be another way of handling this case which I'm not aware of. I'm actually dying to get this done and I need you guys to help me with this.
It sounds like you are over complicating stuff here.
Step 1. Connect esp board to your wifi (i guess you have figured this out)
step 2. check what lan address your board has connected to, for this is usually just use
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
step 3. start your wifiserver at port 80
WiFiServer(80);
step 4. in your android app, or any other platform(i recommend using browser in computer while simply testing if it works or not) type url: local_ip_address_that_you_got_above/mygetrequest?value1=1
step 5. Listen for incoming clients and intercept the get value that you will recieve in the header in fashion of "GET /mygetrequest?value1=1"
step 6. done :)
If you want to skip the process of implementing all of it from scratch you can get full source code of my example server described above at: https://spacerival.com/lounge/2614/arduino-server but i do highly suggest you to implement it on your own and not just copy paste that source code, since you wont learn much at all to be fair
So after trying all day long, I came with a solution. This is a bit of a workaround as I was lost. So What I did was I created a Soft AP with a small web server that returns the LocalIP. So my esp is working on both AP and STA modes right now.
How it works is simple
ESP runs with a small webserver with /getLocalIP endpoint.
ESP opens a SoftAP for the user to connect. The user connects with the
SoftAP.
The user will be asked to enter credentials for the desired
WiFi.
After connecting to the desired WiFi mobile app will request a
for 192.168.4.1/getLocalIP (AP's IP Address).
Since ESP is already connected to the WiFi this endpoint will send the WiFi.localIP() to the app.
So now the app has the LocalIP.

SIM5360A - HTTP bad request

I'm developing a device with an ESP32 connected through a level shifter to a SIM5360A.
The system is supposed to make a periodic HTTP post with it's sensor readings.
Even though I have a working setup with a SIM5360E breakout board, when I shifted to a custom PCB with a SIM5360A (because of carrier frequency), I'm not able of making an HTTP post/get.
Using a server hosted in AWS and doing a TCPDump, I detected that before the GET payload the SIM5360A inserts two spurious characters (0x01 0xF0).
The commands I'm sending to the modem are:
AT+CIPOPEN=0,"TCP","XX.XXX.XXX.XXX",80
AT+CIPSEND=0,39
GET /login HTTP/1.1<CR><LF>
Host: XX.XXX.XXX.XXX:80<CR><LF>
<CR><LF>
<CR><LF>
Using Wireshark to analyze the query on the server side, the data received is:
{0x01} {0xF0} GET ....
Those two characters confuse the apache server (and Wireshark) which doesn't interpret this as a HTTP message driving a 400: Bad Request.
I verified using PostMan that the query is correct. I also use the exact same firmware on my SIM5360E breakout successfully.
Using a scope I verified that the two characters are dumped into the UART channel by the SIM5360A and not by the level shifter or the ESP32.
I wanted to do a firmware upgrade on the SIM5360A but SIMCOM only has the 'E' firmware update available on it's website (just including this consideration for if someone has the firmware update for this version).
Any thoughts?
Thanks in advance
Bests

Flashed the ESP-01S to new firmware, now can't send any AT commands

I've have been trying to flash the ESP-01S to the 1.5.1 from the official website. I am also using their own flash tool. The tool detects the component and completes the update all the time, this is what it detects:
5Eh : N/A
flash devID:
4014h
QUAD;8Mbit
crystal:
26 Mhz
AP: CA-2B-96-03-59-AF STA: C8-2B-96-03-59-AF
Now when I try connect everything up with my arduino and try some AT commands through the serial port, nothing happens. When the ESP is first switched on it spits out the normal gibberish however, it now doesn't say "READY" and every time i send an AT command it sends no reply.
I can still reflash the device but, no matter what I try no AT command work.

SNMP custom made device ESP8266

my company uses the application PRTG from paessler.com to monitor several SNMP sensors, I need to monitor the voltage of some devices and transmit it to the manager.
I was going to use an ESP8266 programmed via arduino to do it.
So far I've been able to send data to the ESP via UDP, and I configured it in the manager so it can retrieve the information from it and ping it.
The ping tests are successful however the monitoring does not work, by using the serial interface I can see that the ESP is receiving the data from the manager, with the OID that was set up. But the monitor shows it as inactive, I set up the ESP to send a simple string in the response.
When using a program called Packet Sender I am able to send the udp packets and receive the response as well, and everything works fine.
The ports I am using is 161 to receive in the ESP and I made it send to the 161, 123, 1023 as i saw specified in the prtg site
I may be sending the packets trough a port that is not the right one, or maybe I have to put a header before the message so the controller can Interpret it. I am not sure what the error can be. Any help will be apreciated
pretty easy - simply use the http push sensor from PRTG:
https://www.paessler.com/manuals/prtg/http_push_data_sensor
All best
Christian

How to make a http 'GET' request with esp8266 and arduino?

I have arduino mega2560 which is connected to a WiFi network using esp8266. and I have a server running on https://taub-ramym.c9.io (IP 126.128.47.440)
which has thees functions (that changes a flag value in my DB...):
taub-ramym.c9.io/empty
taub-ramym.c9.io/girls
taub-ramym.c9.io/boys
when I put thees http calls in a regular internet browser (chrome...), the flag changes succesfully. the same happens when I call for it from an android app.
but when I call for it from the arduino, it returns "OK", but nothing happens to the flag!
I uses this code (after connecting to the WiFi):
AT+CIPSTART="TCP","126.128.47.440",80 (returns OK)
AT+CIPSEND=121
GET taub-ramym.c9.io/girls HTTP/1.1\r\nHost: taub-ramym.c9.io\r\nUser-Agent: ESP8266_HTTP_Client\r\nConnection: keep-alive\r\n
returns OK but nothing happens in the DB...!
can you please help? I has spend more than a weak on it!!
thanks alot

Resources