I'm transferring a binary file to an embedded device using a custom AT command set.

I'm running Lubuntu Linux on a virtual machine (Windows 7 host) and the virtual linux guest controls the physical serial port.

On Windows I have proprietary software to do that, on Linux I use the bash console.

I set the speed to 115200 baud with

stty -F /dev/ttyS0 115200

I check before and after and the speed goes from 9600 to 115200.

I send commands with

echo -ne "AT\r" > /dev/ttyS0

And I read the responses in another terminal where I launched

cat /dev/ttyS0

The problem is that when I need to flash a binary file in the device, I send the specific AT command and the device waits for a stream. Then I type

cat $myFile > /dev/ttyS0

And everything works, but it takes way more than it should. Almost 10 minutes for a 600k file when at 115200baud it should take around one minute.

What could be the bottleneck? Is it VirtualBox or is it the "cat" command? Is the speed stuck to default 9600 for some reason?


  • 1
    How does the guest control the physical serial port? Is it a USB to serial adapter you pass with VB's USB pass through? Or is it a virtual serial device provided by VB? – Stéphane Chazelas Jun 21 '16 at 9:02
  • is the embedded device configured for software flow control (XON/XOFF)? does it have zmodem receive capability? – cas Jun 22 '16 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.