-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MsDos attempt: it doesn't work (yet..) #17
Comments
...no idea? It seems quite weird that that the esp_slip_router doesn't work in a msdos environment thanks for reading |
Sorry, I have no experience with MSDOS networking. If you can ping to the outside, but not telnet, it seems to be a problem with MSDOS TCP, IP and routing seems to work. Could you perhaps try a wireshark on a local client to see, whether the TCP SYN requests reach the outside? |
I believe you need to set NAMESERVER 192.168.0.1 in you mtcp.cfg file to something like the default NAMESERVER 8.8.8.8 to use google's name server, unless you have your own nameserver forwareded from your router. Thats why you can ping outside ip addresses but not resolve the names. EDIT: The above does not make any change. Odd that linux has no issues resolving but mTCP does. ms-dos using mTCP name server look up connects fine through a shared serial port on linux just not thru esp8266_slip_router when using ms-dos. must be a formatting issue. I haven't used wire shark, perhaps I can get a copy of the traffic both from linux and from esp over the serial port when running "ping" command from mtcp. |
I ran some wireshark on the connection request from dos --> esp8266 --> windows shared wifi running wireshark --> internet Appreciate any help. it is pretty cool using microweb to view a webpage on an 8088 machine. |
So the issue seem to be that esp8266-slip-router isn't completely transparent, changing ip and nat connection. Request can make it out but the path back is not found. The esp8266 is not looking for the mac address of mTCP/etherslip contained in the packet Below is my connection to pi zero, the last part would be nice to somehow include in esp8266-slip-router but it may fit into the "zimodem" program better, zimodem already does some internet lookup dns stuff a little more directly. Web addresses can be "dialed up" with modem commands.
|
I am having the exact same problem and I would be thrilled to find the solution. I'm connecting an esp to my DOS computer over serial. I can do all the same stuff described above except for DNS. I am trying to use microweb, a web browser for dos. I've been using this successfully over a wired serial connection to a pi. Now I am trying to use your software to get wifi ethernet. The goal is to not have to have a man in the middle such as a pi doing anything. I would like to be able to plug an ESP8266 into my DOS computer serial port, connect to my wireless AP and then use the ethersl.com driver to get internet access. Anyone know what needs to be done to get over this hurdle? Thanks! |
Following up here. I think @martin-ger's assessment the "If you can ping to the outside, but not telnet,.." was incorrect. I believe the OP is able to do everything but DNS resolution. I believe he could telnet to the outside world by IP. This is the same issue I have too. I can do anything by IP. I can PING IRC, FTP, Telnet, and HTTP by IP. I cannot do anything by domain name. On the same DOS computer instead of using ETHERSL (SLIP serial ethernet) to connect to the ESP8266 I am using ETHERSL to connect to a raspberry pi over serial. When I connect this way DNS works fine. So I think it's fair to rule out an issue with the DOS configuration or software. One thing I've observed is that when I telnet to esp_slip_router and type SHOW it always says my DNS server is my gateway (10.0.0.1 in this case). If I issue a set DNS 8.8.8.8, save and reset, when I type SHOW again it still shows 10.0.0.1. I have tried multiple DNS servers in my mtcp.cfg in DOS. I've tried my local DNS of 10.0.0.1, I've tried 8.8.8.8, 9.9.9.9 and 192.168.240.1 The IP address of my DOS system is 192.168.240.2. Why wouldn't the UDP (I assume) packets for the DNS look up being resolved? |
Hi everyone! |
Following! |
I've been digging through the source code trying to get familiar with the code base. So far it's far out of my comfort zone but I'm interested to learn how to fix this! |
thanks ssshake ! :) |
This looks suspiciously like a one byte offset error when processing the IP packets. If you look at the layout of an IPv4 packet header it has the source address (4 bytes) followed by destination address (4 bytes). With this error: |
Hi jhhoward! |
@ssshake does the checksum failure error appear consistently for you? It doesn't trigger any checksum errors in my setup, although still fails to perform the DNS resolve |
@jhhoward No sorry I should have updated my comment. I only saw that on occasion and I don't know how to force it to throw that error. |
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 |
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. |
Hey it's @mbbrutman the author of mTCP himself! If you want to contact me offline I can mail you a wifi device to load up this firmware on. You can reach me at web master at the old net dot com. Can you give me instructions on how to provide the trace that you want? I have no idea where to begin on that. @martin-ger thanks for this input. I understand you didn't create this firmware to be used in DOS so I appreciate the extra effort helping us out. For context we are vintage computer enthusiasts and we are trying to get network connectivity on old dos computers. I will try to make some time to try the changes you proposed but if anyone else gets to it before me please let know. |
Wireshark would probably work for the tracing unless @mbbrutman has another utility! |
mTCP has it's own equivalent tracing facility. Before running mTCP set the following environment variables: set logfile=tcp.log Then do whatever you were going to do that fails. Every packet will be dumped into the trace file, so don't send passwords or sensitive data. On a low machine this can really hurt performance, so use something faster with a hard drive if you can. (The full instructions are in the mTCP PDF documentation in the debugging section.) |
ssshake sent me a device, and after trashing the device with a bad config and trashing my Ubuntu 16 machine trying to install the flash tools, I eventually got to debugging it. :) (Wow, I hate Python.) The mTCP DNS resolver code uses UDP port 57 as the source port. The SLIP router probably views 57 as a privileged port and is sending back an ICMP message saying the port is unreachable. I tested with port 1057 as the source port instead and then DNS resolving started working. I will have a test version of mTCP available for people to try this weekend, but I've been making lots of other changes so I'm a little worried about people grabbing it and then forgetting to get the next release. On a related note: My DOS machine can ping the outside world, resolve DNS addresses, and do useful work (telnet, ftp) through the device. All is good. However, if I ping the device on it's public address (the one that my router handed out) no echos are received. And my DOS machine can ping my home router, but it can't ping anything else on my home network. If I move the device back to a Linux machine I have the same problem, so DOS is not the issue here. And it's not just PING either; I can't make socket connections to machines on my network. Am I missing a configuration step? |
That's good to know that there is a solution for DNS resolution for mTCP! It might be worth investigating adding a setting for the SLIP router to allow for forwarding packets on privileged ports. Something that I was able to do was telnet into a Raspberry Pi on my network from my DOS machine using the SLIP router. The Pi was connected to the router via an Ethernet cable rather than connected by WiFi though. I think that there can be problems with routing packets via WiFi as I experienced problems in the past when using a Raspberry Pi as a SLIP router. |
I opened another issue for the connectivity problems, as they are not related to this issue. (They seem to be caused by the esp_slip_router device not sending ARP requests or responding to ARP. But it is caching hardware addresses, which is why it can ping the home router and the outside world, but not anything on the internal network. The work around is to prime the ARP cache on the other machine, then have it ping the esp_slip_router device, which allows the esp_slip_router device to cache the hardware address.) For this issue (DNS resolving) I went back through the specs again. Using port 57 as a source port for UDP should be perfectly legal. Ports below 1024 are only sensitive when used as target ports for services, and that is really only by convention. A NAT device should be transparent and should not be enforcing restrictions like this. (It's a policy, not a technical requirement. Which is why it works everywhere else.) I have a work around that uses a higher number source port, but really I think this is a but in the NAT code in Lwip that should be fixed there. |
As said above, feel free to adapt this here in the code: |
Both checks look to be incorrect as per my description. But I was hoping to get your opinion on if you think I am correct or if I am missing something. If it is incorrect it really should be fixed upstream, as it is affecting every other lwip NAT implementation, unless this is a local change. |
I would merge a pull request for that, but for the moment I don't have the time to go into testing. |
Hi, is it possible to use mTCP nameserver with port specified for example local dns with port 5353? It Would be a good solution for now.. |
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. |
Great! I added a link to the repo in the Readme. |
Maybe one of you guys tried it using Win9x ? https://support.dynabook.com/support/viewContentDetail?contentId=108228 |
@e1z0 |
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:
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:
TCP software
MTCP with this configuration file:
and with this settings in the autoexec.bat:
Wattcp with this configuration file (c:\WATTCP.CFG):
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)
-----pkttool (mtcp)
I also tried different net masks
but no way.
Does anyone have a good idea? :)
The text was updated successfully, but these errors were encountered: