[PLUG] minicom scripting?

Kyle Accardi sandbox at pacifier.com
Thu Dec 11 00:07:02 UTC 2003


Bill Barry wrote:
> On Wed, Dec 10, 2003 at 10:12:27PM -0800, Bill Barry wrote:
> 
>>On Wed, Dec 10, 2003 at 09:38:36PM -0800, Russell Senior wrote:
>>
>>>A neighbor asked me to help him push a text file from Linux over a
>>>serial port to a 3D milling machine.  First I try to sell him on using
>>>the print spooler (which I think would be kind of cool).  No dice,
>>>besides he's still using sneaker net.  So I fire up minicom, set the
>>>comm parameters and save it to a special configuration.  He just wants
>>>to send a file as ASCII, so in conventional-interface minicom there is
>>>a lot clicky-click to get to the right spot to enter the filename.
>>>I'd like to script that for him.  I noticed that minicom has some
>>>scripting capability, but it wasn't documented in the man page.  Does
>>>anyone know how to script sending a file in minicom, or a more direct
>>>way to stuff a file out the serial port (at 2400 baud 7E1)?
>>>
>>
>>How about 
>>cat foo > /dev/ttyS0
>>
> 
> 
> I forgot about the 2400 baud 7e1
> stty cs7 -parodd 2400 < /dev/ttyS0
> 
> Is there any other reason this will not work?

There's no handshaking this way, right?  You'd never know if the other 
machine was even awake before you crammed the file up its hoohaw.

I have seen the print spool used in such a way and even posted the story to 
plug a while back.  Can't seem to find it at the moment.

--
Kyle Accardi





More information about the PLUG mailing list