ESP8266 WiFi touch screen thermostat

8 years 2 months ago #2906 by madis
i have tried everything but i still cannot get esp8266 to work with mega. firmware is correct, mega is working. but cannot get esp8266 to work:

Response->timeout
hwReset
E_CWMODE
Send cmd:AT+CWMODE=1


Response->timeout
E_CWMODE
Send cmd:AT+CWMODE=1




what can be wrong? i have 2x checked wires, tried different esp8266 modules, tried dfferent mega and tried with uno... same error.

Please Log in or Create an account to join the conversation.

8 years 2 months ago - 8 years 2 months ago #2908 by Nico
Try read the serial data from the ESP and the mega from the 2 TX and TX pins connection.
Maybe is just a matter of serial speed that usually is 115200baud

Please Log in or Create an account to join the conversation.

8 years 2 months ago #2910 by madis
finally got it to work.. changed Serial1.begin(115200); and then it started to communicate.

now i have time problem, i think i have broken timekeeper module but i will go and buy new one. will see then

Please Log in or Create an account to join the conversation.

8 years 1 month ago - 8 years 1 month ago #3111 by Wojciechowski
Hi everyone,
As madis said before ESP8266 starts to communicate with Serial1.begin(115200). For me everything is perfectly fine with one exception, namely:

Response->OK
Send cmd:AT+CWJAP="ASUS","password"
AT+CWJAP="ASUS","password"
WIFI DISCONNECT
[òéÖçŒÐ‚ ....bushes ...

I tried to change:
executeCommand("AT+CWMODE=1", 2000); in Esp8266EasyIot.cpp library into AT+CWMODE=2 and AT+CWMODE=3.
First response is OK but than I get an ERROR.

Funny thing about this is that my router does see ESP module in both cases. It has its own ip adress, but I can't add Node in ESP8266 EasyIoT driver settings as timeout error appears.
Maybe there is an issue of unsufficient current using only Arduino, I will try to use lm2596 converter. The same thing happened when I tried to power SIM800l module without external PSU.

Little edit:
After connecting via USB to TTLand using AT commands there is no problem at all to connect to my router using AT+CWMODE=1. Using AT+GMR:

AT version:0.40.0.0(Aug 8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04

Which version should I use?

Please Log in or Create an account to join the conversation.

7 years 6 months ago - 7 years 6 months ago #3518 by Wojciechowski
Hi, after some time I managed to try again with thermostat. I have done everything step by step from the beginning: updated ESP to correct version, wired everything up (for ESP using level converter), changed Serial1.begin to 115200 (only then ESP connects to AP), changed ip adress, ssid, password and port to 37602 in ESP8266EasyIoTConfig.h, installed an image of EasyIoT server using Win32DiskImager on my Raspberry, started server, opened IoT in a browser and still can't add node because of a timeout error... I have run out of ideas.
This is from my serial monitor:
nodeid:-1
hwReset
E_START
E_CWMODE
Send cmd:AT+CWMODE=1

þAT+CWMODE=1


OK

Response->OK
Send cmd:AT+CWJAP="Tomato24","mypassword"

AT+CWJAP="Tomato24","mypassword"


OK

Response->OK
Send cmd:AT+CWJAP?

AT+CWJAP?

+CWJAP:"Tomato24"

OK

Response->OK
Send cmd:AT+CIPSTART="TCP","192.168.1.15",37602

AT+CIPSTART="TCP","192.168.1.15",37602

CONNECT

OK

Response->OK
Request Node id


write: command: 3, type: 0, len: 0, sender: -1, crc:160
Send cmd:AT+CIPSEND=9

AT+CIPSEND=9


OK
> Sending len:9
hÿÿ
SEND OK

Response->OK
CLOSED


It seems like it connects to AP but then sometimes gives an error connecting TCP. Maybe someone tell me what could possibly be wrong. Thank you very much in advance :)

Please Log in or Create an account to join the conversation.

7 years 6 months ago #3523 by EasyIoT

Wojciechowski wrote: Hi, after some time I managed to try again with thermostat. I have done everything step by step from the beginning: updated ESP to correct version, wired everything up (for ESP using level converter), changed Serial1.begin to 115200 (only then ESP connects to AP), changed ip adress, ssid, password and port to 37602 in ESP8266EasyIoTConfig.h, installed an image of EasyIoT server using Win32DiskImager on my Raspberry, started server, opened IoT in a browser and still can't add node because of a timeout error... I have run out of ideas.
This is from my serial monitor:
nodeid:-1
hwReset
E_START
E_CWMODE
Send cmd:AT+CWMODE=1

þAT+CWMODE=1


OK

Response->OK
Send cmd:AT+CWJAP="Tomato24","mypassword"

AT+CWJAP="Tomato24","mypassword"


OK

Response->OK
Send cmd:AT+CWJAP?

AT+CWJAP?

+CWJAP:"Tomato24"

OK

Response->OK
Send cmd:AT+CIPSTART="TCP","192.168.1.15",37602

AT+CIPSTART="TCP","192.168.1.15",37602

CONNECT

OK

Response->OK
Request Node id


write: command: 3, type: 0, len: 0, sender: -1, crc:160
Send cmd:AT+CIPSEND=9

AT+CIPSEND=9


OK
> Sending len:9
hÿÿ
SEND OK

Response->OK
CLOSED


It seems like it connects to AP but then sometimes gives an error connecting TCP. Maybe someone tell me what could possibly be wrong. Thank you very much in advance :)



Try to run EasyIoT server in terminal mode and check debug output in terminal window.

Please Log in or Create an account to join the conversation.

Time to create page: 0.228 seconds

Forum latest

  • No posts to display.