Jump to content

Photo

Using ESP8266 WiFi microcontroller as Serial Internet Modem


18 replies to this topic

#1 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • 1,119 posts
  • Location:Beaverton, OR

Posted Mon Oct 26, 2015 1:33 AM

I have, after a false start, succeeded in getting my TI to telnet into heatwavebbs.com using a little wifi adapter I've built out of two basic components:

 

1) An Adafruit Huzzah ESP8266 breakout board  ~ $10 - https://www.adafruit.com/products/2471

2) A Female Serial MAX232 adapter   ~ $3 $10 - http://www.amazon.co...duct/B00OPTOKI0

 

https://goo.gl/photo...BiFAQg3hute4ma6  ( I can't seem to attach photos this weekend... but here is the google album. )

 

The MAX232 board is a simple serial to ttl converter. 

 

The ESP8266 chip is a growingly popular SoC that has an available firmware that lets you simply communicate to the internet with AT+ commands. To use like a modem, you have to update the firmware to the latest, and then use the 'transparent' mode, which lets all received data through to the chips serial out, and passes all input from serial to the other end. 

 

The cheaper raw ESP8266 chips can be had for less than $5. But the first one of those I bought had defective ram. And then to make it come close to working, I still had to build a little board with some pull up resisters to control the boot mode. And to update the firmware I would would have had to build out even more.  By going with the Adafruit breakout board, it is easily flashed to the latest firmware with an FTDI USB cable. You can test it with that cable on a PC to get a feel for it, and configure a sufficiently slow bps for connecting to the TI.  

 

Then I wired up the TX, RX, and power for the MAX232. Conveniently, the Adafruit board regulates voltage, and makes 3.3v available. So I simply have a USB cord connected to provide power, and the MAX232 borrowing power off the Adafruit, and TX and RX wired up between the boards.  The Adafruit board duplicates the VIN, and TX and RX for the FTDI cable, so I can still tinker with it on the PC if I need to flash it again or whatever.

 

I had to configure it down to 2400 bps to work well on the TI. Later I'll try hooking up the RTS & CTS for hardware flow control, and then maybe I can do 9600 bps.

 

AT Commands are interesting.  ( I'm using firmware version 0.50 for the ESP8266 )

 

AT+UART_DEF=2400,8,1,0,0

  Sets the serial mode to 2400 bps, 8n1, and no flow control.

 

AT+CWMODE=1   

  Puts the thing in client or 'station' mode, instead of access point mode.

 

AT+CWJAP="myssid","mypassword"

  join an access point. Use AT+CWJAP_DEF="myssid","mypassword" to store it for default power state.

 

AT+CIPMODE=1

  sets up transparent mode, otherwise everything comming back gets prefixed with +IPD

 

AT+CIPMUX=0 

  turns off multiplexing. required for transparent mode.  

 

AT+CIPSTART="TCP","heatwavebbs.com",9640

  opens the connection, and stuff you receive starts to show up. :)

 

AT+CIPSEND

  Opens up your outgoing communication so you can interact with the BBS.

 

Theoretically, you can press "+++" to get out of CIPSEND mode, and back to the AT mode... but I haven't been able to yet.. the reset button on the board works well enough instead.  If you can get back to AT mode, then you'd close the connection with AT+CIPCLOSE

 

I need to get a little case for it, add a power switch, and add the hardware flow control ( that's just hooking up two more wires, and reconfiguring the UART on the ESP8266 )

 

TELCO worked ok. I just saw a thread with the TELCO manual today, so I'll have to look and see if the auto-dialing can be made to work.  It is nice that this chip's firmware does DNS lookup. Oh, you have to configure your terminal program to send CR/LF when you press enter, or else the chip will ignore you. 

 

I hope someone else finds this useful...

 

-M@


Edited by jedimatt42, Tue Oct 27, 2015 11:03 PM.


#2 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Mon Oct 26, 2015 6:38 AM

Very cool! I don't have a true landline anymore as my home phone is now via my cable provider, and I have had very little luck getting a reliable modem connection to any BBS. So I'm stuck using telnet only with my PCjr.

Check out Dave Brown's Term80 terminal program for the TI though instead of Telco. It gives you pseudo 80 columns as well as full color ANSI graphics, so it would be perfect for the heatwave bbs. I can send you disk images or real disks if you'd like (PM me).



#3 ti99iuc OFFLINE  

ti99iuc

    Stargunner

  • 1,123 posts
  • Location:Italy

Posted Mon Oct 26, 2015 6:41 AM

WOW !  :lust:



#4 --- Ω --- OFFLINE  

--- Ω ---

    --- Ω ---

  • 9,940 posts
  • Location:Virgo Supercluster, Gould Belt in the Orion arm of Milky Way galaxy.

Posted Mon Oct 26, 2015 6:49 AM

Oh that is so cool.... and tiny too!

gallery_35324_1027_78678.jpg



#5 Shift838 OFFLINE  

Shift838

    Stargunner

  • 1,808 posts
  • SHIFT838
  • Location:Texas

Posted Mon Oct 26, 2015 10:46 AM

Let us know how the 9600 bps works with you get your RTS and CTS pins hooked up.

 

also will it AutoAnswer ? 



#6 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,119 posts
  • Location:Beaverton, OR

Posted Mon Oct 26, 2015 12:10 PM

Let us know how the 9600 bps works with you get your RTS and CTS pins hooked up.


will do!

also will it AutoAnswer ?


It does have some 'server' connection modes. But it doesn't generate 'RING' and I don't think it responds to ATA. Server mode might act more like auto answer... I'll experiment with that and see. I can hear you thinking about using it for the hosting side of the BBS.

An interesting aspect of it, is that it supports multiplexing multiple connections over the one serial port. For a BBS client, I'm obviously taking steps to turn that off. But theoretically, you could rewrite some BBS hosting software to understand the indicators for data coming from different client channels, and sending packets of data out directed at those specific client channels again. In this mode, everything coming in starts with +IPD and some connection number, and meta data about the data, then the data. The outgoing data is sent with AT+CIPSEND=<channel>,<length>,<data>.... It would require very differently designed BBS hosting software, but you could service multiple callers with one serial port.

These chips are also completely reprogrammable. They have extensions to the Arduino dev SDK to target them if you want to replace the firmware completely.

#7 slinkeey OFFLINE  

slinkeey

    Moonsweeper

  • 492 posts
  • Not a Gamer
  • Location:Racine, WI

Posted Tue Oct 27, 2015 7:12 PM

I have, after a false start, succeeded in getting my TI to telnet into heatwavebbs.com using a little wifi adapter I've built out of two basic components:

 

1) An Adafruit Huzzah ESP8266 breakout board  ~ $10

2) A Female Serial MAX232 adapter   ~ $3

 

https://goo.gl/photo...BiFAQg3hute4ma6  ( I can't seem to attach photos this weekend... but here is the google album. )

 

The MAX232 board is a simple serial to ttl converter. 

...

 

By any chance is that a MAX3232?

 

I only ask because the MAX3232 is a new design that will accommodate 3.3v correctly, according to the spec sheets.



#8 slinkeey OFFLINE  

slinkeey

    Moonsweeper

  • 492 posts
  • Not a Gamer
  • Location:Racine, WI

Posted Tue Oct 27, 2015 10:38 PM

Awesome though! :thumbsup:



#9 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,119 posts
  • Location:Beaverton, OR

Posted Tue Oct 27, 2015 10:59 PM

 

By any chance is that a MAX3232?

 

I only ask because the MAX3232 is a new design that will accommodate 3.3v correctly, according to the spec sheets.

 

I believe it is that design... SP3232EE.  Ridiculously difficult to read. And I was wrong, this wasn't the $3 item of DX.com, but a $10 item I got from Amazon: http://www.amazon.co...duct/B00OPTOKI0

 

I had purchased a similar item from DX.com but it was less convenient to integrate. 



#10 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,119 posts
  • Location:Beaverton, OR

Posted Mon Nov 2, 2015 7:55 PM

I took a stab at enabling hardware flow control and had no luck. More research needed. It looks like hardware flow control is sharing a pin with a boot mode control. I may need a switch to only connect that after power on. Or more...

Wiring it the way I had also screws with the ftdi programming cable. So you don't want to lock it in with the serial port attached. But you can put the tx rx on the ftdi header instead.

But it worked really well at 2400, so still cool.
I'll keep at it.

-M@

#11 mamejay OFFLINE  

mamejay

    Chopper Commander

  • 159 posts
  • Location:Melbourne, Australia

Posted Thu Mar 2, 2017 4:40 PM

I took a stab at enabling hardware flow control and had no luck. More research needed. It looks like hardware flow control is sharing a pin with a boot mode control. I may need a switch to only connect that after power on. Or more...

Wiring it the way I had also screws with the ftdi programming cable. So you don't want to lock it in with the serial port attached. But you can put the tx rx on the ftdi header instead.

But it worked really well at 2400, so still cool.
I'll keep at it.

-M@

I know this is an old thread but wanted to see how progress went on this one.

i am looking at making a universal type ESP modem that can be used on Amiga, Ti etc.  How did you go with the CTS and RTS signals?



#12 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,119 posts
  • Location:Beaverton, OR

Posted Thu Mar 2, 2017 8:08 PM

I actually gave up on this. The high level chip breakout boards like the Adafruit Huzzah, and the original uber cheap thing have programming circuitry that appeared to be in the way of enabling RTS/CTS on the ESP chip.

The chip looked promising, but to go faster on something as slow as the TI, it seems you really need hardware flow control. And to access that, you'd need to build your own breakout board, or to move the buffering into an intermediate microprocessor.

TI <- Serial Driver <- ArduinoSomethingSomthing <- ESP8266

---

If I were to strike again at this, I'd try one of my Particle / spark.io chips that just have wifi, and write a software stack between them and a Serial driver.

If you search github, I believe there is an Arduino recipe for serial to ethernet already. I think this was focused on the C64 ? Been a while since I've looked...

-M@

#13 InsaneMultitasker ONLINE  

InsaneMultitasker

    Stargunner

  • 1,611 posts

Posted Thu Mar 2, 2017 9:15 PM

I actually gave up on this. The high level chip breakout boards like the Adafruit Huzzah, and the original uber cheap thing have programming circuitry that appeared to be in the way of enabling RTS/CTS on the ESP chip.

The chip looked promising, but to go faster on something as slow as the TI, it seems you really need hardware flow control. And to access that, you'd need to build your own breakout board, or to move the buffering into an intermediate microprocessor.

I missed this thread back in 2015.... flow control is not required.  TIMXT can handle 38.4K with just standard TX/RX connections.  This looks like a nice option to pursue..



#14 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,119 posts
  • Location:Beaverton, OR

Posted Fri Mar 3, 2017 12:14 AM

That's true, you made great advances in TIMXT, and I wasn't even using the earlier TIMXT when I was playing with this.

-M@

#15 InsaneMultitasker ONLINE  

InsaneMultitasker

    Stargunner

  • 1,611 posts

Posted Sun Mar 5, 2017 3:01 AM

That's true, you made great advances in TIMXT, and I wasn't even using the earlier TIMXT when I was playing with this.

-M@

Time sure flies!

 

Do you still have the project hardware in mothballs somewhere?  :)



#16 Shift838 OFFLINE  

Shift838

    Stargunner

  • 1,808 posts
  • SHIFT838
  • Location:Texas

Posted Sun Mar 5, 2017 10:05 AM

i can see I will be purchasing a couple of more parts to play with for this thing too!



#17 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,119 posts
  • Location:Beaverton, OR

Posted Sun Mar 5, 2017 10:45 AM

Time sure flies!
 
Do you still have the project hardware in mothballs somewhere?  :)


I don't think I have the original ESP breakout board I used. I still have a replacement/different board from adafruit, but it isn't 5v tolerant. So it needs a 3.3v power supply.
and then logic level shifter like a 74LVC245 powered at 3.3v to buffer the TX/RX signals down to 3.3v from the MAX3232 breakout / board.

-M@

#18 Shift838 OFFLINE  

Shift838

    Stargunner

  • 1,808 posts
  • SHIFT838
  • Location:Texas

Posted Thu Mar 9, 2017 8:51 PM

I got my esp8266 and max232 in today.  I thought I ordered the USB Console cable to program it, but apparently I forgot to hit BUY!

 

so I ordered one.  now I need to wait until Saturday...  As Doc Brown would say....

 

 

DAMN!

 

DAMN!  DAMN!


Edited by Shift838, Thu Mar 9, 2017 9:01 PM.


#19 --- Ω --- OFFLINE  

--- Ω ---

    --- Ω ---

  • 9,940 posts
  • Location:Virgo Supercluster, Gould Belt in the Orion arm of Milky Way galaxy.

Posted Thu Mar 9, 2017 9:10 PM

 

DAMN!  DAMN!  DAMN!

 






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users