Table of Contents
In short it's wifi adapter for your old computer that connects to the serial port.
This is an implementation of a SLIP (Serial Line IP - RFC1055) router on the ESP8266. It can be used as simple (and slow) network interface to get WiFi connectivity. It transparently forwards any IP traffic through it. As it uses NAT no routing entries are required on the other side.
Serial wifi adapter project combines:
- Wemos D1 Mini esp8266 Microcontroller
- MAX3232 RS232 to TTL Serial Port Converter
- 4 x Dupont cables
- EtherSL packet driver
- esptool for flashing
All required tools you are able to buy from aliexpress or ebay, it's very cheap and it will cost no more than 10USD.
Prepare hardware
You should connect max3232 adapter to wemos d1 mini using Dupont cables in this way:
Wemos D1 Mini | Max3232 |
---|---|
5V | VCC |
GND | GND |
RX | RXD |
TX | TXD |
You can crearly see connection details on this photo:
NOTE! On other esp8266 based microcontrollers you should connect max3232 VCC pin to wemos 3v3 port, but on wemos d1 it does not work, so you must connect it to the 5V instead.
Connect wemos d1 mini to computer
Install esptool.py on your computer
Esptool is required to flash wemos d1 microcontroller, you can install it easily.
Windows
Use esp home flasher or Read here.
Linux
apt install esptool
macOS
brew install esptool
Flashing Wemos D1 mini
It's never been that easy, the firmware is already pre-compiled and ready to flash, no need any complex ways to do it. It's easy as piss on two fingers.
git clone https://github.com/e1z0/esp_slip_router.git cd esp_slip_router esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash -fs 4m -fm dio 0x00000 firmware/0x00000.bin 0x10000 firmware/0x10000.bin
/dev/ttyUSB0 is the device name, on different operating systems the naming scheme is different:
- Linux /dev/ttyUSB<number> ex.: /dev/ttyUSB0
- Windows com<number> ex.: com1
- macOS /dev/cu.usbserial-<number> ex.: /dev/cu.usbserial-14330
Also if you need to compile or run it on different microcontrollers such as esp8266 based NodeMCU you will need to read the project README details on it.
Prepare DOS Computer
Download this archive
Unzip it to C:\oldnet and execute C:\oldnet\start.bat, you can also include it to autoexec.bat to start automatically with system. You now will be able to connect to the wemos d1 mini device and set the wifi access point to connect to, but first check if you can ping it.
ping 192.168.240.1
If you were able to ping this ip, you can continue, otherwise please contact us for assistance.
telnet 192.168.240.1 7777
Once connected to telnet press ALT + E and then ALT + N
Next setup wifi:
CMD>set ssid <your_ssid> CMD>set password <your_pw> CMD>set use_ap 0 CMD>save CMD>reset
Once you have filled details, which access point to use and password of that AP, you should be able to access internet, you can check it by pinging cloudflare dns:
ping 1.1.1.1
Thats all, you can see bunch of other utilities in that directory:
- dhcp.exe - dhcp client
- ftp.exe - ftp client
- dnstest.exe - dns test tool
- EtherSL.exe - ethernet over serial line packet driver
- ftpsrv.exe - ftp server
- htget.exe - a nice wget alternative
- httpserv.exe - http server daemon
- ircjr.exe - small irc client
- microweb.exe - small footprint web browser, manual can be found here
- nc.exe - netcat like tool for debugging network protocols
- ping.exe - icmp ping network host
- pkttool.exe - A packet sniffer and diagnostic tool for packet drivers
- sntp.exe - SNTP client for getting the current date and time from public servers on the Internet.
- spdtest.exe - Internet speed test
- telnet.exe - telnet client
Windows 3.1 or 9x
Winpkt
If you want to use internet with windows also, you will need to make few things more, first of all you need to download these packet drivers (mirror here) and extract winpkt.com to C:\oldnet
Then edit start.bat in your C:\oldnet, add line with winpkt, so it will look like
ETHERSL -u ETHERSL 0x60 4 0x3F8 115200 WINPKT 0x60 SET MTCPSLIP=TRUE SET MTCPCFG=C:\OLDNET\MTCP.CFG
Also note, that file must be run before windows, so better put these lines in C:\autoexec.bat if you plan not to run this manually. It will bridge ethernet slip (ethernet over serial connection) driver to the windows, it works from windows 3.1 to windows 98 (millennium not tested). Please read how to setup internet on windows in further section.
Trumpet Winsock
The standard windows winsock does not support such type of connection (ethernet slip) AFAIK. Maybe there will occur smart people who will manage to make it work in the native way… But today I have only one chance is to use trumpet winsock, it's the replacement for the standard Windows winsock and the only one implementation in Windows 3.1, because it does not have native winsock at all. You can download it from there. This method works on Windows 3.1/95/98. Also on the internet there are newer version like 4-5 or so, but i didn't tested it yet. So we will use version 3, as it works on the most 3.1 and Win9x releases. After downloading, install it and edit C:\trumpet\trumpwsk.ini to look like this:
[Trumpet Winsock] netmask=255.255.255.252 gateway=192.168.240.1 dns=1.1.1.1 time= domain= ip=192.168.240.2 vector=60 mtu=576 rwin=2048 mss=512 rtomax=60 ip-buffers=32 slip-enabled=0 slip-port=2 slip-baudrate=57600 slip-handshake=1 slip-compressed=0 dial-option=1 online-check=0 inactivity-timeout=5 slip-timeout=0 slip-redial=0 dial-parity=0 font=Courier,9 registration-name="" registration-password="" use-socks=0 socks-host=0.0.0.0 socks-port=1080 socks-id= socks-local1=0.0.0.0 0.0.0.0 socks-local2=0.0.0.0 0.0.0.0 socks-local3=0.0.0.0 0.0.0.0 socks-local4=0.0.0.0 0.0.0.0 ppp-enabled=0 ppp-usepap=0 ppp-username="" ppp-password="" win-posn=42 220 867 686 -1 -1 -4 -4 1 trace-options=16392 [default vars]
Then you can start C:\trumpet\tcpman.exe (Trumpet Winsock) and use your favorite windows internet enabled applications such as Netscape Communicator, mIRC and so on..
Links
- mTCP always check for updates/new versions
You may ask whats the difference between original esp slip router repo and mine, i can answer instantly, mine includes fixes in lwip library implementation to pass privileged ports (< 1024), this fixes dns resolution and any other related issues when accessing privileged ports from client machine, as in original implementation it does not work. Also it has nice dockerized build environment prepared for building your custom firmware and library implementations.