esp_slip_router: MsDos attempt: it doesn't work (yet..)

First of all: what a great idea, Martin! Thanks for this project.

Now I’d like to share the problems I faced. I’ve installed the precompiled binary firmware on a AZDelivery D1 Mini NodeMcu ESP8266-12F. I connected a RS232 DB9 adapter with a 3 wire cabling (TX,RX,GND,3.3V). I set the bitrate conservatively to 19200 (telnet gateway 7777, set bitrate 19200) I installed Linux on an old thin client and I followed the instructions Martin provided in the README.MD IT WORKED flawlessly, great! Configuration of the esp_slip_router:

CMD> show
ESP SLIP Router V1.1.1 (build: Sun Feb 23 23:34:52 20202)
SLIP: IP: 192.168.240.1 PeerIP: 192.168.240.2
STA: SSID: XXXXXXXX PW: XXXXXXXXXXXXX [Autoconnect:1]
External IP: 192.168.0.175
DNS server: 192.168.0.1
Clock speed: 160
Serial bit rate: 19200
CMD>

Once I turned to DOS with packet driver the problem arised… I tried with MsDos 5 and FreeDos 1.2, but the problem is the same: I can telnet the gateway at port 7777 , I can ping the gateway, I can ping the router and other devices on the wifi network 192.168.x.x, and even the “outside world”, e.g. 9.9.9.9 and 8.8.8.8. That’s all. I cannot resolve any address on internet (even google.com) or ftp or telnet (I also tried to set the DNS to 9.9.9.9 and 8.8.8.8, no way).

This is the software configuration: DOS

mode COM2: BAUD=19200 PARITY=n DATA=8 STOP=1

Packet Driver:

EtherSLIP (ethersl.com) on COM2 (ethersl 0x60 3 0x2f8 19200) (but also tried slipper: Slipper COM2 19200 ether nohwhs) this is the ouput:

Packet driver for ETHERSLIP, version 11.7
Portions Copyright 1988 Phil Karn
Packet driver skeleton copyright 1988-93, Crynwr Software.
This program is freely copyable; source must be available; NO WARRANTY.
See the file COPYING.DOC for details; send FAX to +1-315-268-9201 for a copy.

16550 Uart detected, FIFO will be used
System: [345]86 processor, ISA bus, Two 8259s
Packet driver software interrupt is 0x60 (96)
Interface class 0x1 (1)
Interrupt number 0x3 (3)
I/O port 0x2F8 (760)
Baud rate 0x4B00 (19200)
Receive buffer size 0xBB8 (3000)
My Ethernet address is 00:02:12:00:56:34

TCP software

MTCP with this configuration file:

PACKETINT 0x60
MTU 1500

IPADDR 192.168.240.2
NETMASK 255.255.255.0
GATEWAY 192.168.240.1
NAMESERVER 192.168.0.1

and with this settings in the autoexec.bat:

SET MTCPSLIP=true
SET MTCPCFG=C:\MTCP.CFG

Wattcp with this configuration file (c:\WATTCP.CFG):

my_ip = 192.168.240.2
netmask = 255.255.255.0
gateway = 192.168.240.1
nameserver = 192.168.0.1

and with this settings in the autoexec.bat:

SET WATTCP.CFG=C:\

Here you can find the output of some commands that, maybe, can help…

The most interesting output are from th ping command of mtcp suite, the ping command of the wattcp suite, the dnstest command of mtcp suite and the pakttool command of mtcp suite.

ping (wattcp)

-----tcpinfo (attcp)

Reading Waterloo TCP configuration file.

Ethernet Address : 0:2:12:0:56:34

IP Address       : 192.168.240.2
Network Mask     : 255.255.255.0

Gateways         : GATEWAY'S IP     SUBNET           SUBNET MASK
                 : 192.168.240.1    DEFAULT


Cookieserver     : NONE DEFINED

Nameserver       : 192.168.0.1
Domain           : "(null)"

BOOTP            : NOT USED
BOOTP Server     : BROADCAST
BOOTP Timeout    : 30 seconds

Default Timeout  : 30 seconds
Max Seg Size MSS : 1400 bytes

tcp_Socket : 4206 bytes 
udp_Socket : 2097 bytes 

-----pkttool (mtcp)

mTCP pkttool by M Brutman (mbbrutman@gmail.com) (C)opyright 2012-2020
Version: Mar  7 2020

Details for driver at software interrupt: 0x60
  Name: ETHERSLIP
  Entry point: 0366:03CE
  Version: 11   Class: 1   Type: 0  Interface Number: 0
  Function flag: 2  (basic and extended functions)
  Current receive mode: packets for this MAC and broadcast packets
  MAC address: 00:02:12:00:56:34

All statistics are from when the packet driver was loaded.

Packets in:           26  Packets received
Packets out:          31  Packets sent
Bytes in:           1852  Bytes received (includes Ethernet headers)
Bytes out:          2224  Bytes sent (includes Ethernet headers)
Errors in:             0  Receive errors
Errors out:            0  Sending errors
Packets lost:          0  Lost due to no packet handler, out of buffers, etc.

I also tried different net masks

255.255.255.0
255.255.255.252
255.255.255.254
255.255.0.0

but no way.

Does anyone have a good idea? 😃

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 32 (5 by maintainers)

Most upvoted comments

I have updated esp-open-lwip, also made new firmware utilising these fixes, now dns are fully working on DOS environment. Also i’ve made simpler build environment using docker, you no longer need to setup complex build tools to build this firmware or esp-open-lwip lib.

IMG_5213

Can somebody provide a packet capture or run the mTCP trace and send me the trace file? There is a bug in mTCP that makes it insist on UDP packets having valid checksums, even though they are optional for UDP in IPv4. You may be hitting this and I’d like to confirm it or rule it out.

I am not fully following this discussion due to many other things, but perhaps the problem comes from the fact, that the NAT lib doesn’t rewrite low ports (<1024)?

You might try to change this here for TCP https://github.com/martin-ger/esp-open-lwip/blob/5157a11da89c2ae8aeca0653c5a44fed7377fde8/lwip/core/ipv4/ip.c#L879 anf here for UDP https://github.com/martin-ger/esp-open-lwip/blob/5157a11da89c2ae8aeca0653c5a44fed7377fde8/lwip/core/ipv4/ip.c#L923