Git Product home page Git Product logo

esp8266_modem's Introduction

Virtual modem for ESP8266

Copyright (C) 2015 Jussi Salin [email protected] under GPLv3 license.

Overview

ESP8266 is a tiny MCU module with WIFI. It already contains a virtual modem firmware by factory but I wanted to make one myself to support a wider range of baud rates. For example Commodore 64 requires 2400 or lower. Now it is also possible to add additional features in the future because this is open source. For example, translation tables for different character sets or file transfer protocol conversions on the fly with help of a buffer in MCU memory.

AT command examples

  • Change baud rate: AT115200
  • Connect to WIFI: ATWIFIMyAccessPoint,MyPassword1234
  • Connect by TCP: ATDTsome.bbs.com:23
  • Disable telnet command handling: ATNET0
  • Get my IP: ATIP
  • Make a HTTP GET request: ATGEThttp://host:80/path
  • Answer a RING: ATA
  • Disconnect: +++ (following a delay of a second)

Note that the key and port are optional parameters. Port defaults to 23. All parameters are case sensitive, the command itself not. You must always connect to an access point before dialing, otherwise you get an error. When you connect to WIFI you get either OK or ERROR after a while, depending on if it succeeded. If you get ERROR the connection might still occur by itself some time later, in case you had a slow AP or slow DHCP server in the network. When dialing, you get either CONNECT when successfully connected or ERROR if the connection couldn't be made. Reasons can be that the remote service is down or the host name is mistyped.

Default Baud rate is defined in the code. 2400 is safe for C64 and 19200 for any PC and Amiga. 115200 for PC's with "new" 16550 UART. You must always have that default rate on the terminal when powering on. After giving a command for a higher rate nothing is replied, just switch to the new baud rate in your terminal as well. Then you can give next command in the new baud rate. Note that the first command after switching baud rate might fail because the serial port hardware is not fully synchronized yet, so it might be good idea to simply give "AT" command and wait for "ERROR" or "OK" before giving an actual command.

Example communication

OK
ATWIFIMyAccessPoint,MyPassword
Connecting to MyAccessPoint/MyPassword
OK
ATDTbat.org
Connecting to bat.org:23
CONNECT


    __|\/|__             __|\/|__           __|\/|__       __|\/|__  Logo
     \<..>/               \<..>/             \<..>/         \<..>/    by:
             |\_/|                                      |\_/|          Gar
       ______|0 0|______   /////// //\\ \\\\\\\   ______|0 0|______
        \| | |   |  | |/  //   // //  \\    \\     \| | |   |  | |/
          \|..\./...|/   /////// ////\\\\    \\      \|..\./...|/

A more detailed example can be seen on my YouTube video at: https://youtu.be/oiP5Clx3D_s

Hints

The module can also be used for other than telnet connections, for example you can connect to HTTP port, send a HTTP request and receive a response.

I made a 3D printable case for the C64: http://www.thingiverse.com/thing:1545605 If you build it for any other device you can use any generic case because you need room for a RS232 level converter such as MAX232, and you do not need holes for any rare connectors.

Future plans and status

  • It seems quite complete for me but please send ideas.
  • I tested huge transfers with ZModem, seems to be working. Remember to use -e parameter with sz and rz if using over a telnetd.
  • Serial multiplayer game of Doom (sersetup.exe) seems to be also working. Remember to use ATNET0 when playing serial games, also on DosBox emulator if it's the other host.

esp8266_modem's People

Contributors

ksalin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266_modem's Issues

Cannot connect WiFi

I know I am typing everything in correctly. Is there a way to list available SSIDs?

Suggestion: Raw IP mode

Just a suggestion.. to save us from needing a pppd to use this could we have a ATDT type command that drops us to raw routed IP?

WDT kicks in at low baudrates

Hi, I am trying to get your virtual modem to work on some older computer which can handle baudrates up to 9600, in Basic however 300 baud is about the max I can do. Alas with those lower baudrates (tried 300 and 1200) after some data has been received, the message 'St WDT reset >stack etc...' appears and the modem is reset, losing its connection.
Any ideas ?
Regards,

Gert

DB25 part number? Surface mount only?

I was hoping you could tell me what part # you designed the DB25 connector for. I'm having trouble finding a DB-25 that's SMD, especially one without through-hole mounting pins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.