-
Notifications
You must be signed in to change notification settings - Fork 93
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
Problem uploading files #140
Comments
Try using ATD to connect to the BBS instead of ATDT. Upcoming/later versions will not have this confusing issue by default. |
THanks for your reply Bozimmerman. I always use ATD . And i have a connection in the connection book configured, and telnet translation is off. File uploads always fail me. I have tried several types of files, in case it is something specific to syncronet for Linux (it is the amstrad.simulant.uk:464 BBS). It's as if the chain it sends is either not complete, or has too much... I don't know. I have uploaded a small video of the climb: https://www.youtube.com/watch?v=5TZz6gAz1u0 |
Thanks, I'll try that BBS and see if I can reproduce. |
Not to pile on, but I have also had this issue with the Zimodem firmware for a few years now. Bo, this file transfer problem is what I mentioned to you that day of your talk at VCF Southwest 2023 if you recall. it just seems to either drop characters or somehow corrupt the data stream when the data starts flowing fast. Jim Drew mentioned that he thought it was an underlying problem with the espressif library code, but not sure how much, if any, of that you have implemented in Zimodem. |
Well, it's definitely not an always-everywhere-broken type thing, as I was uploading files to my BBS just last night using Novaterm and X-Modem w/o issues. Maybe it's a baud rate issue, or flow control, or the size of the packets. shrug Won't know until I can reliably recreate it over and over again. |
I don't know if it can help debug this error. |
HI, If it can help, i have take a new video trying to upload with my PPC and telix sofware with the modem set at 2400 Bauds (8n1). |
Thanks. I'm writing a bunch of local tests today that might hopefully reproduce the issue. |
Well, I added a test script (test.py) that does various upload and download simulations between the modem and a local socket server. For the most part, it seems reliable, but there are indeed times when the network packets are either slow to be sent or slow to arrive (always < 1 sec delay). This might be normal behavior, but I'll see if I can affect it, as it's the only issue I found. Our BBS file transfer protocols were intended to go over phonelines where both sides are sending/receiving at the same speed, so that when, e.g. the 5th byte in a data grouping arrives, the receiver is guaranteed that the 6th will be immediately available right after it. TCP/IP packets are more -- irregular, and can split data up in different ways. I suspect that if the network protocols on online BBSes were coded in such a way as to assume more flexibility in timeouts, this would make them more reliable over the internet. Anyway, I'll experiment and see if I can do anything to influence how the packets are assembled and/or split apart. P.S. Most of my testing is being done on ESP8266 modems. What chip do yall use? |
ESP8266, this (Lolin V3 ESP8266 ESP-12F): |
Bo, I had reported a similar issue with being unable to upload binary files a few months back. I wonder if this is related. I was unable to do any tracking at the time and the issue expired. Is there any update on the testing you were going to do in your post in this thread on July 8? |
Hello! First, thanks for Zimodem -- it is fantastic! Next, I am encountering this issue as well. I suspect it may be related to flow control or buffer size, exacerbated by slow upload performance. I have been experimenting with Kermit, because it gives me a ton of control over all these things. I'll note that Xmodem has a very small packet (128 bytes) and doesn't use sliding windows, so in general there is never data flowing in both directions at once (unlike ZModem or the more modern versions of kermit). So let's look at my testcase. I am running a kermit server over TCP, without any customizations:
Then, connecting to the Zimodem:
The default here starts with a small packet length (90 bytes, which grows up to 9K with successes) and a window size of 30 (so 30 packets can be in flight). This has the same symptoms described above -- occasionally some bytes make it, but things bog down and stop. I'll first try no sliding windows: It let 5 packets through, but as Kermit's slow-start algorithm started raising packet sizes, by the time it got to 2K packets, 100% of them failed. I wonder.... that happens to be just above the 1500 MTU / 1460 MSS. Perhaps there is a problem with splitting into fragments? Let's set that theory. First, packets of 1400 bytes with window size of 1 should work:
Nope, still failed after about 5 packets. Let's try a smaller packet size:
This works perfectly! Kermit reports a sending packet length of 1011 for some reason (not sure exactly why it's bigger than 1000 but it is). Oddly, watching the lights on the modem, there is considerable delay between the time the SD light is on (for packet transmission) and the ACK is received by the RD side). By looking at a tcpdump on the receiving end, I have arrived at what I suspect is behind the very slow upload speed: Every single byte of upload goes in its own TCP/IP packet. That's a lot of processing overhead, network overhead, and size overhead (every byte uploaded sends 41 bytes of data across the network) Probably Zimodem needs a sort of buffer to add stuff too when it's receiving it at line rate. However, this doesn't explain the reliability problem. My guess is that Zimodem is failing to exert flow control on upload, so some internal (perhaps 1K?) buffer is being overflowed by protocols that will send more than 1K of data at once (that includes pretty much anything supporting sliding windows, including Zmodem, and modern Kermit in its default configuration) It is also possible that the underlying buffer is smaller (say, 256 bytes) and Zimodem is able to keep up until the 1K barrier because the line rate of even 1-byte packets across my LAN is fast enough that 57600bps doesn't overwhelm it immediately. Let me just see if I can rule out sliding windows as the problem. I should be able to reduce the packet size and increase the window size to make sure we still have less than 1K in the buffer. Let me try:
And yes, that still works. One approach to solving this one-byte-per-packet problem is taken in ser2net; see the chardelay options beginning at https://github.com/cminyard/ser2net/blob/90e35f79bf811bf9b361b555f3decaea42456786/ser2net.yaml.5#L414 . So I think there are two problems here:
This also implies that Zimodem isn't going to work with PPP, because transmits will almost always exceed that 1K limit. Thanks! |
Hello bozimmerman
First, congratulations on the "invention". It has been wonderful to be able to follow your project and create a modem for the Amstrad PPC (and the 486), and to be able to connect to an endless number of BBS.
I am writing to you because I have been trying many times to upload a file to the Amstrad BBS (amstrad.simulant.uk), but I am not able to.
I have tried two applications (Kermit and Telix), and in the first I saw that the upload protocol was not supported by the BBS. But in the second application (telix) I have seen the possibility of uploading via 4 protocols: zmodem, xmodem, ymodem and ymodem-g. I have tried all 4, but there is no way to upload a binary file. In all of them the upload starts, but suddenly, randomly, it is cut off, it remains blocked, and after a few seconds it gives an error. I have tried multiple configurations and even changing the FLOW, but nothing, there is no way.
I thought I read that there is some problem with uploading files.
The board is "Lolin V3 ESP8266 ESP-12F". As I say, I connect and navigate the BBS well (many of them). I even download files well, but the upload, no matter how many times I have tried, I can never finish it successfully.
I thought I read something similar in other forums with your firmware, but I'm not 100% sure.
Does it occur to you what I might be doing wrong and/or what I can try?
Thank you!
The text was updated successfully, but these errors were encountered: