Chat freely about anything...

User avatar
By ericmaicon
#40098 Hello,

sorry if I am repeating an old thread, but I didn't find one with an answer that solved my issue.

I am using an ESP8266 + usbserial connected directly (without any resistor in the middle), as I saw in several tutorials at internet.

I refresh its firmware. I tried one from here, but after the refresh, it does not let me send any AT command (I am on MAC):

Code: Select all./esptool.py --port=/dev/cu.usbserial write_flash  -fm=dio -fs=32m 0xfc000 at/esp_init_data_default.bin 0xfe000 at/blank.bin 0x00000 at/boot_v1.5.bin 0x01000 at/user1.1024.new.2.bin


I am not sure if the line above is right, but it run without errors.

I found one tutorial in portuguese, with a link to one firmware:
http://www.mediafire.com/download/bn1wp ... Lua%29.rar

I refresh my ESP with the following command:

Code: Select all./esptool.py --port=/dev/cu.usbserial write_flash  -fm=dio -fs=32m 0x00000 v0.9.2.2\ AT\ Firmware.bin


After that, I remove the pin from the ground and restart the usbserial (I did it previously every time that I wanted to get out of the update mode and go to the dev one).

I did:
AT+RST


OK
"ʃ
.ÿ.Mƒ ;Ì;!Gú.‰Rl×..£
[System Ready, Vendor:www.ai-thinker.com]
AT+CWMODE=1

no change
AT+CWJAP="xxx","xxxx"


OK
AT+CIPSTART="TCP","192.168.25.70",3000


OK
Linked
AT+CIPSEND=74

> GET /?device_id=1&flow=100&time=10 HTTP/1.0\r\nHost: 192.168.25.70\r\n\r\n
SEND OK

OK
Unlink


I am having two issues, first of all, if I open from any machine in the network the following link:
http://192.168.25.70:3000/?device_id=1&flow=100&time=10

It registers on my node server what I want. From the AT+ command it does not register, meaning that it didn't arrive there. Why?

My second error is that after some time suddenly I start to receive the following message and after that I can't send any AT command anymore, so I need to refresh the firmware again

Am1rþà;Ì;!Gú.ˆRl¡..£
[System Ready, Vendor:www.ai-thinker.com]


Thanks.
User avatar
By martinayotte
#40804 First thing I see is the length mismatch, you seems to count \r\n as 4 characters instead of 2.
So, I presume you are literally typing those in a terminal, which is not good, \r\n mean CR+LF, not those actual characters.
That the main reason why nothing is sent ! Actually, they are sent, but never parsed by the server ...
Instead of typing those command manually, I suggest you to use scripts, such python, which will also ease the length calculation.

Also, I see that you provide HTTP/1.0, but you are providing "Host: 192.168.25.70", which should be the format for HTTP/1.1.
User avatar
By ericmaicon
#40810 Hello martinayotte,

thank you for your answer.

I was looking for this today earlier and I have tested this tutorial with thingspeak and it worked:

http://mcuoneclipse.com/2014/12/14/tuto ... rdm-kl25z/

so I have changed to:

Code: Select allAT+CIPSEND=4,32
GET /?device_id=1&flow=100&time=10


So I did some tests:
1. Try different port on my server, it didn't work.
2. Try different server (online), it didn't work.
3. Try to enable CORS on my server api, it didn't work.

Seems that the problem is in my server, but I can't find, though.