Best way to transmit a file over one-way serial line?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Best way to transmit a file over one-way serial line?
Hi.
Suppose you have two embedded linux devices that are connected with a one-way serial line i.e. a USB-to-UART device like /dev/ttyUSB0 on each end with only one wire (besides the GND wire) going from a TX pin on device 1 to a RX pin on device 2. This means the traffic can travel only one way (this is often called a data diode).
What is the best way to transmit a file over this line? Preferably with some error checking to see whether the contents on the receiving end are intact.
No, I was wondering, if there are any existing linux tools available for this task (i.e. transmit a data size, hash and payload) or do I have to write my own python script?
Just asking because I was about to start writing the program, and I don't want to finish the program only to discover an existing tool for the job.
you can use whatever you want but if there is no way to report back what is the goal?
You can transfer file[s], checksums ...., you can run some tools to validate, but what would be the result?
No, I was wondering, if there are any existing linux tools available for this task (i.e. transmit a data size, hash and payload) or do I have to write my own python script?
Just asking because I was about to start writing the program, and I don't want to finish the program only to discover an existing tool for the job.
That looks like the Dallas semiconductor 1 wire bus which uses different hardware and is actually bidirectional. I don't think you can do the same thing over a serial port.
That looks like the Dallas semiconductor 1 wire bus which uses different hardware and is actually bidirectional. I don't think you can do the same thing over a serial port.
Dallas 1-wire is precisely what the OP described. This seems to be custom hardware nonetheless.
Not saying it is any more palatable option than just writing their own driver, but I feel that nothing exactly matching exists and they'd be best to use existing references to attain their goal.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.