LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   SUSE 11.2 minicom and expect not sending backspaces (https://www.linuxquestions.org/questions/linux-server-73/suse-11-2-minicom-and-expect-not-sending-backspaces-883762/)

Lantzvillian 05-31-2011 11:56 AM

SUSE 11.2 minicom and expect not sending backspaces
 
Hi all,

I am writing an expect script that will automate flashing an embedded device through minicom using a serial connection and am running into problems sending backspaces.

The script catches the configuration prompt on startup and can flash the device, but setting the MAC addresses in the fconfig are being problematic.

For example, when I run the script, I can set the variables that are defaults by just pressing enter or enter new directives when prompted.. the problem arrises when I need to enter a new MAC address and there is already one set - I need to overwrite it somehow.

If I manually go through fconfig using minicom (minicom version 2.3 (compiled Dec 3 2008)), I can use backspace on my keyboard to remove the old MAC address and enter a new one - no problem.. but with expect.. I am having issues.

I tried sending \b, \^H, \010 \177... These do not work. Minicom has BS set for the backspace key though... I tried setting it to DEL - no luck.

On the other hand, I can send control-C with send "send \003"...

Any help would be great.. thanks!

dannybpng 07-01-2011 07:44 PM

Try adding delays
 
I'm no expert, but it could be that the embedded device needs time to process the backspace or has very little type-ahead buffer space. Either try using the sleep command between each backspace or maybe use 'send -h'

-h flag forces output to be sent (somewhat) like a human actually typing

Just a thought.

Dan


All times are GMT -5. The time now is 09:35 AM.