Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
July 6, 2017, 7:44 am

Maybe this question should be posted in a linux development group,
however the use of a serial port is more typical in an embedded
environment, so I try to post here.
I have an embedded Linux box (based on a Raspberry) with a serial port
converted to a USB port through a UART-USB transceiver from Microchip.
This USB port is seen as a COM port under Windows OS.
I need to do simple operations on the filesystem through the serial
port, mainly:
- list files in a directory
- download files
- upload files
- remove files
The user on the Windows PC should launch a simple script (it will be
written in Python) that make all the operations in sequence.
Do you know of some technology/protocol that could be used in a simple way?
I have two ideas, maybe there's another one that is better.
The first is to configure a PPP over serial line and use classic FTP
server for filesystem operations. However this solution implies that the
user should configure the PPP link, but she will not have so much knowledge.
The second is to run the classical console on the serial port, with
login and prompt. The python script should type/send commands at the
prompt (ls, rm, ...). The download could be done with hexdump command
(the python script could convert to binary again).
The upload should be done with echo command, writing a ASCII hex file
and launching a simple script to convert from ASCII to binary on the
embedded Linux.
Do you have other better solutions?
however the use of a serial port is more typical in an embedded
environment, so I try to post here.
I have an embedded Linux box (based on a Raspberry) with a serial port
converted to a USB port through a UART-USB transceiver from Microchip.
This USB port is seen as a COM port under Windows OS.
I need to do simple operations on the filesystem through the serial
port, mainly:
- list files in a directory
- download files
- upload files
- remove files
The user on the Windows PC should launch a simple script (it will be
written in Python) that make all the operations in sequence.
Do you know of some technology/protocol that could be used in a simple way?
I have two ideas, maybe there's another one that is better.
The first is to configure a PPP over serial line and use classic FTP
server for filesystem operations. However this solution implies that the
user should configure the PPP link, but she will not have so much knowledge.
The second is to run the classical console on the serial port, with
login and prompt. The python script should type/send commands at the
prompt (ls, rm, ...). The download could be done with hexdump command
(the python script could convert to binary again).
The upload should be done with echo command, writing a ASCII hex file
and launching a simple script to convert from ASCII to binary on the
embedded Linux.
Do you have other better solutions?

Re: FTP (or similar) over serial port of an embedded linux system

They use zmodem - I've done similar things in the past, also with uuencode.
(zmodem was a lot faster than xmodem/ymodem back in the day, due to the
larger block size).
I'm not sure what would be a good tool to automate listing files, beyond
parsing the output of 'ls' and friends.
Theo

Re: FTP (or similar) over serial port of an embedded linux system

Kermit? I will say that any classic console based plan will probably be
easier to implement in the modern age than PPP over serial; ESPECIALLY
if you're having to deal with Windows.
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.

Re: FTP (or similar) over serial port of an embedded linux system
On 7/6/2017 12:44 AM, pozz wrote:

Don't they all have an ethernet port? If so, support TELNET or SSH as
the "console" (throw away the silly USB-to-serial converter) and
SMB shares to access the file system "directly" -- without having
to use a script (that you'll have to maintain) and install Python,
etc.
Far more intuitive and probably less total effort, in the long run.


Don't they all have an ethernet port? If so, support TELNET or SSH as
the "console" (throw away the silly USB-to-serial converter) and
SMB shares to access the file system "directly" -- without having
to use a script (that you'll have to maintain) and install Python,
etc.
Far more intuitive and probably less total effort, in the long run.


Re: FTP (or similar) over serial port of an embedded linux system

Actually, the newer rPi has WiFi. It would be hard to find a window PC without WiFi anyway. You can config the rPi as WiFi access point and forget about any wires, usb or ethernet.
Site Timeline
- » Camera I/F's
- — Next thread in » Embedded Programming
-
- » Customizable Embedded 3D Surround View Turn-Key Solution on Apalis iMX6 SoM
- — Previous thread in » Embedded Programming
-
- » Is there such thing as a 4 bit CRC ?
- — Newest thread in » Embedded Programming
-
- » TLV431 obudowa przewlekana TO-92, poszukiwane
- — The site's Newest Thread. Posted in » Electronics (Polish)
-
- » Recherché : Schéma du circuit du Metrix MX 528
- — The site's Last Updated Thread. Posted in » Electronics (French)
-