Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-31-2011, 12:56 PM   #1
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Rep: Reputation: 41
Unhappy 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!
Old 07-01-2011, 08:44 PM   #2
Registered: Sep 2003
Location: USA
Distribution: Fedora 23
Posts: 72

Rep: Reputation: 19
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.



expect, minicom, suse

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /usr/bin/expect : Script to check server load using both expect and bash Soji Antony Programming 1 07-28-2010 12:27 AM
Problem sending files trough minicom, cutecom pmil Linux - Software 2 07-22-2008 06:43 AM
Minicom via ttyS0: Please help with $TERM, $MINICOM, colors, mouse/gpm. GrapefruiTgirl Linux - Software 2 07-19-2008 08:01 AM
telnet backspaces eastsuse Linux - Newbie 2 12-02-2004 06:38 PM
Sending ascii codes with minicom ganninu Linux - Software 0 08-27-2003 09:01 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration