FTDI and ESP 8266 wifi issues

Electronics Computer Programming Q&A
User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

FTDI and ESP 8266 wifi issues

Post by dacflyer » Tue Dec 29, 2015 8:05 pm

i am trying to set up a wifi module ( ESP 8266 )
i have the 2 items connected correctly, and i am using a program called "Termite" this is a program to talk to the wifi via via serial. i have the right voltage set 3.3v and if i try to send, the TX and RX lights blink,,but all i get on the serial screen is garbage
i have 2 of these modules, and they both do the same thing. i have a goof FTDI and i even have tried it with the Arduino Uno
and i get the same results all the time. and yes i did also have the 10K resistor connected as well as it describes to do.
i do not know what else to do to get any good comm.
once i get into it then i can set things up to get my wifi based clock to talk.
anyone have any tips or tell me i do not know what i am doing..lol
thanks.

dyarker
Posts: 1631
Joined: Fri Aug 22, 2003 12:01 am
Location: (somewhere), Afghanistan; from Rochester, NY
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dyarker » Wed Dec 30, 2015 8:13 am

I had to lookup ESP8266 specs and Termite on Google, but I'm pretty sure you've got a data inversion problem.

Logic level serial voltages are a little above 0V for a logical "0" to a little below Vcc for a logical "1"; where Vcc (the supply) is often +5.0V or +3.3V (depending on ICs being powered).

Logic level signals don't travel very without corruption, so most equipment (like PCs) converts the signal to RS232. RS232 is bipolar and lower impedence, so signals can be reliaby cabled with-in a room.

In RS232 a logical "0" is +6V to +25V; and a logical "1" is -6V to -25V. You shift the voltages with a resistor (or a resistor and diode), but the logic inversion remains. 0V (logic "0") from ESP8266 from is read as logic "1" by RS232 input; Vcc (logic "1") from ESP8266 is read as logic "0" by RS232 port. Same sort of thing in the other direction. Both sides see garbage.

You can add a 3.3V 7404, or 2 transistors to invert, or better yet a 3.3V equivalent of MAX232 chip to properly convert signaling to RS232.

Another alternative would be a USB-to-serial (not RS232) module. Then path would be Termite to virtual COM port on USB, USB cable to module, jumper wires from module to ESP.

Cheers,
Dale Y

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Wed Dec 30, 2015 9:02 am

ok, i am a lil confuzzeled.. but here is how i have it..

ESP8266 to the ( Tx-Rx ) FTDI 3.3v setup and then the FTDI has USB to the laptop, then the Termite.
..................( Rx-Tx )

i set the baud rate etc like it recommends 115???K i even tried other baud rates, and still get garbage.

here is a picture of how i have the FTDI and the ESP8266 connected.

https://petestechprojects.files.wordpre ... agram1.jpg
only difference is that i am not using the arduino for the 3.3 volts, i am getting my 3.3 volts from the FTDI, but all the other connections are the same..

what happened to the ability to post fotos here ?

dyarker
Posts: 1631
Joined: Fri Aug 22, 2003 12:01 am
Location: (somewhere), Afghanistan; from Rochester, NY
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dyarker » Wed Dec 30, 2015 10:42 am

Okay, already you're doing USB. So that's what the FTDI is, my miss. Now the big question is which FTDI model are you using (FTDI is a company, they make many models. Does the module you have do logic level serial or RS232 level serial?

My bet now is RS232 and that gives the inverted data problem I described before. That fits the symptom you gave the best. Bit rate and bits per character errors will do it too, but I think you double checked those.

Which FTDI module?
Dale Y

dyarker
Posts: 1631
Joined: Fri Aug 22, 2003 12:01 am
Location: (somewhere), Afghanistan; from Rochester, NY
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dyarker » Wed Dec 30, 2015 10:48 am

opps
Dale Y

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Thu Dec 31, 2015 7:45 am

it is a FT232RL
http://www.digchip.com/datasheets/parts ... L-REEL.php

UPDATE >> the old laptop i was happening to use at work yesterday crashed while i was trying to load Termite onto it, and i had the FTDI and the wifi module connected, i think it spiked them. i can't get them to do anything now, and the wifi module just gets hot, and the FTDI is not seen by the laptop now :( so i went and ordered new ones. i ordered..

wifi module --> http://www.ebay.com/itm/ESP8266-Serial- ... 1980350958

newer better model of what i had.. FTDI module ---> http://www.ebay.com/itm/FT232RL-3-3V-5- ... 1724029351

i hope you can see the links.
so i am waiting to get these in and try things again..any suggestions ?


:P

dyarker
Posts: 1631
Joined: Fri Aug 22, 2003 12:01 am
Location: (somewhere), Afghanistan; from Rochester, NY
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dyarker » Thu Dec 31, 2015 9:08 am

USB to TTL serial should do the trick 'cuz it's not RS-232. It should communicate with the WiFi module.

Something just occured me. Is the Arduino board wireless?
Dale Y

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Sat Jan 02, 2016 5:31 am

i am not using arduino, but the project uses the chip.. but the module is wireless, it will connect to internet to get time for another clock i am working on.. wifi time.. using HDSP-2534 smart display. displays time and then scrolls the date.
supposed to be able to get temp etc later on also...

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Tue Jan 05, 2016 6:15 pm

UPDATE >>> ok, i got in my new parts, and i had been reading up on another site that seems to be easier to work with as far as programming the ESP8266.

in this link --- >>> http://benlo.com/esp8266/esp8266QuickStart.html it show how to flash the ESP 8266 and how to program it.
well i downloaded the programs to do the job.. i successfully flashed the ESP8266 or at least it says it was successful.
but when i try to use the "LuaLoader" program and connect, all i get is garbage. i have even tried changing baud rate etc.
when i do got the right baud rate "74880" ( test that is readable ) i get this information,,,
Fatal exception (0): epc1=0x4021058c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

can anyone tell me what i am doing wrong ? did i not flash correctly ? i did set things as shown in the link...

dyarker
Posts: 1631
Joined: Fri Aug 22, 2003 12:01 am
Location: (somewhere), Afghanistan; from Rochester, NY
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dyarker » Wed Jan 06, 2016 6:02 am

The manual you linked says 74880 is the correct bit rate. You get readable error mesages. Looks like serial comm problems are fixed. So this is where I sign off.

((Did you flash while bit rate set different?))

[[P.S. FYI - "baud" does not apply, even if the manuals use it. The correct term is "bit rate" or "data rate".
"baud" stands for "bit of audio data" on the phone line side. In low speed MODEMs (like 300 and 1200 bps) the bit rate equals the baud rate. In high speed MODEMs, the baud rate stays low but by using using cominations of tone phase, multiple data bits are carried by each baud. That makes the bit rate faster than the baud rate.]]
Dale Y

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Wed Jan 06, 2016 10:21 am

the more i think about it, i think i might have flashed the wifi without the bin files :P or i did not do something right in that case.. i have to try and see if i can find a different program that gives me more functions...but so far the few i see do not tell much instructions for newbies to programming...

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Mon Jan 18, 2016 6:54 pm

ok, i been doing a lot of stuff here lately and have learned a bit as well, and some stuff i cannot explain..lol
but anyway i still cannot get the clock to communicate yet..
but when i am in a com terminal and run some AT commands, everything checks out..
then i got to a command to test connect to the wifi.. and the return comes back as a fail.
i discovered that when i enter the information in the wifi set up page, i enter my SSID information.
my SSID has spaces in the name. ex. "My WiFI Not Yours" i enter this info and submit it, and it comes back as
"My+WiFi+Not+Yours" and for some reason when i try to connect it in com terminal it fails to connect.
so what to do i do not know.. i sent a message to the maker of the clock and i am seeing what he says..
only other thing i could do is change my SSID name.. Hmmmm

dyarker
Posts: 1631
Joined: Fri Aug 22, 2003 12:01 am
Location: (somewhere), Afghanistan; from Rochester, NY
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dyarker » Tue Jan 19, 2016 7:43 am

An obvious solution is don't use spaces.
Change (for example) "My WiFI Not Yours" to "My_WiFI_Not_Yours" or "MyWiFINotYours". That is replace spaces with underscores, or leave the spaces out and mark words with capitol first letter.

I don't even use spaces in file names. MS fixed that problem long ago, but following that self imposed rule still helps out occasionaly. And compared to your computer, the processor in the WiFi device is the brain of a flee!
Dale Y

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Tue Jan 19, 2016 12:41 pm

ya, i am guessing that may be the easier solution..

another question.. it was said to use "pool.ntp.org" to get the time..
the clock has been connected to the net all day now ( at work on another router ) and it has not updated yet.. i am guessing that the clock should be able to get time from this site or do i need to add more to the line to get the time ?
i looked at the pool.ntp site and i have no clue what to do..
in a line i saw there is a command of AT+CIPSTART=4,"UDP","pool.ntp.org",123
am i supposed to add that line in the fill in space for set up?
see pic. sample..see 2nd pic.. ( wifi set up page - SNTP server )


http://timewitharduino.blogspot.com/201 ... t-for.html


..

User avatar
dacflyer
Posts: 4295
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: FTDI and ESP 8266 wifi issues

Post by dacflyer » Tue Jan 19, 2016 3:26 pm

update >>
ok, i have gotten another step closer now.. i am able to connect now, issue was spaces in the SSID name, the spaces are now filled in with underscores. my_wifi_name
if left blank the clock inserts plus signs "+" and it would never connect.
no now i changed router name and filled in the info into the clock,, it connects but it has not updated yet.
i am connected to the clock right now with serial monitor and i get this information..
is anyone able to decipher the information ?
I deciphered some of the info, but the rest i do not know..



AT+CIFSR ( Get local IP address )
ATE0 ( turn echo off ) what is echo ?
AT+CIPSTART=3,"TCP","w1.weather.gov",80 ( Establish TCP connection or register UDP port and start a connection )
AT+CIPSTATUS ( Information about connection )
AT+CIPSEND=3,83 ( Send data )
GET /xml/current_obs/KFAY.rss HTTP/1.1 ( KFAY is my local weather identifier )
Host: w1.weather.gov
Connection: close

AT+CIPSTART=4,"UDP","pool.ntp.org",123
AT+CIPSEND=4,48
[1B][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00] (UNKNOWN)
AT+CIPCLOSE=4

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest