ESP8266 not connecting to remote server

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have an esp8266 wifi module which works fine except it doesn't connect to an external ip . the command i use is:

AT+CIPSTART=4,"TCP","184.106.153.149",80

ERROR
4,CLOSED

it connects with a private ip only. I have checked port 80 and it's open.

also the reset command gives INVALID and strange characters instead of ready:

AT+RST

 

OK

¿ôf¸ÿ)é\Bâ("pf–näæ…`H(                                                                                     Ì

Ý«F

Ai-Thinker Technology Co. Ltd.

 

invalid

 

I have looked everywhere for this BUT found nothing. So any help would be greatly appreciated

Last Edited: Fri. Oct 16, 2015 - 12:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you connecting this to an Arduino, and AVR, or are you working on something else?

 

JIm

 

EDIT:

Take a look here too:

http://www.esp8266.com/

 

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Fri. Sep 25, 2015 - 12:50 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Re the scrambled characters after a RST: Are you running the serial communications at the default speed (9600?) of the ESP?

 

If not, does it get better if you DO run at default speed? 

 

If "yes" to the latter then I might have a hypothesis: After the reset the ESP falls down/up to the default speed. But your terminal/AVR is still at the custom speed you have chosen. The data from the ESP is erroneously received (and you are not checking for e.g. parity errors). When the AVR sends data to the ESP then it "auto-bauds" and things go back to what looks normal. Only a hypothesis.

 

If the default speed works for you, then stay on that until you have enough experience, reading of data sheets and other experiments under the belt to deal with changing the baud rate.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am using an arduino ... 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have been using 9600 baud rate so that's probably not it

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After a reset, the module sends data in 115200 then switches to the baud rate you've configured. I use this module at 9600 and the garbage caracters before Ai-Thinker(...) are normal.

 

Can you post all the AT commands that you send to the module ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am also facing same issue. Please help me regarding this.  The server is running fine but can't able to connect.

Here is the  command sequence that i have followed: ( 

(Time in milli Sec) (Command)
14487--> AT

14488--> 

14489--> OK

29891--> AT+CWQAP

29892--> 

29892--> OK

38195--> AT+CIPMODE?

38196--> +CIPMODE:0

38196--> 

38197--> OK

170120--> AT+CWJAP="KreakEmp","kkpkkp123"

173322--> WIFI CONNECTED

174123--> WIFI GOT IP

175223--> 

175224--> OK

183226--> AT+CIPMUX=0

183227--> 

183228--> OK

188529--> AT+CIPMUX=1

188530--> 

188530--> OK

213635--> WIFI DISCONNECT

219237--> WIFI CONNECTED

220238--> WIFI GOT IP

227940--> AT+CIFSR

227942--> +CIFSR:STAIP,"192.168.43.116"

227944--> +CIFSR:STAMAC,"ec:fa:bc:27:67:58"

227989--> 

228003--> OK

256025--> AT+CIPSTART=1,"TCP","52.66.148.290",61234

259227--> 

259227--> ERROR

259228--> 1,CLOSED

260630--> WIFI DISCONNECT

264032--> WIFI CONNECTED

266733--> WIFI GOT IP
 

Kishan