Jump to content
IGNORED

Using ESP8266 WiFi microcontroller as Serial Internet Modem


jedimatt42

Recommended Posts

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.com/gp/product/B00OPTOKI0

 

https://goo.gl/photos/o8BiFAQg3hute4ma6 ( 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
  • Like 7
Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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/photos/o8BiFAQg3hute4ma6 ( 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.

Link to comment
Share on other sites

 

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.com/gp/product/B00OPTOKI0

 

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

Link to comment
Share on other sites

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@

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

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?

Link to comment
Share on other sites

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@

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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@

Link to comment
Share on other sites

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
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...