-
Notifications
You must be signed in to change notification settings - Fork 127
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
enhancement to support adjustable TX delay #96
Comments
Interesting feature... I will certainly think about it! |
A couple of question to help me better understand the requested feature:
|
I thought the same thing, and I've tried the lower baud rate (9600) before but it doesn't seem to help. Couple of things to note:
Heres some examples of what I'm seeing btw:
Cut & paste (@9600):
using ascii-xfr with -l 10 -c 10:
|
So I guess there are cases where a "delay between chars" would be useful, and lowering the baudrate cannot be a substitute. At 9600 bps, that you mentioned, a delay between chars is approx. 1ms which could (conceivably) be not enough, depending on what the program does at the time, how it handles interrupts, how it does buffering, and so on. Not very likely... but not inconceivable. So, when I find some free time, I will add such a feature. I will limit the range to something reasonable, like: from 500us to 50000us (= 50ms), which, I think, will make the implementation a bit easier... Anyway, we 'll see! Tanks for the info! |
Great, thanks for the consideration! |
I've added an option "--cdelay milliseconds" to achieve this by conditionally inserting a Is there any interest in this patch? It was the result of a very cursory understanding of the codebase, however works when tested on macOS and Raspbian. For background, I need to paste large sections of text to an embedded device where I can't lower the baud rate and the target device has no flow control, a tiny FIFO (guessing it's < 8 bytes from empirical evidence), and apparently the UART driver is polled rather than being interrupt driven. |
@octetta Did you submit a pull request for this? This is a feature I need, for the exact situation you described... Thanks! |
related PR: #131 |
Using '-T' we add the specified delay (in ns) after each character. This helps when you have no flow control and lose characters because of overflowing buffers. This has been requested with issue npat-efault#96 and ithe first version was sent with PR npat-efault#131 by Heinrich Schuchardt. This code is based on it. Signed-off-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
I have now a refactored version in a branch in my repo. PR is here: wsakernel#3 I'd appreciate testing and/or comments. |
Many IoT devices have neither flow control nor do they allow to alter the baud rate but they have size limited console buffers. This is why this change is needed to be able to paste to the serial console of such devices. |
Merged the above PR into my repo now. Thanks to xypron for testing! |
Using '-T' we add the specified delay (in ns) after each character. This helps when you have no flow control and lose characters because of overflowing buffers. This has been requested with issue npat-efault#96 and ithe first version was sent with PR npat-efault#131 by Heinrich Schuchardt. This code is based on it. Signed-off-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Using '-T' we add the specified delay (in ns) after each character. This helps when you have no flow control and lose characters because of overflowing buffers. This has been requested with issue npat-efault#96 and ithe first version was sent with PR npat-efault#131 by Heinrich Schuchardt. This code is based on it. Signed-off-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
On a number of embedded devices I use, the UART interfaces do not have flow control lines hooked up. This means various longer cut &paste commands pasted into picocom often get garbled. It would be great if picocom had a way to insert some adjustable delay between bytes to easy usage on limited hardware.
BTW, love picocom :)
The text was updated successfully, but these errors were encountered: