Minicom/Modem Questions From A Perl Programmer

Adam Lackorzynski adam at os.inf.tu-dresden.de
Sat Dec 17 17:07:58 UTC 2005


On Sat Dec 17, 2005 at 11:22:57 -0500, Hal Vaughan wrote:
> On Saturday 17 December 2005 10:53 am, Adam Lackorzynski wrote:
> > Hi,
> >
> > On Wed Dec 14, 2005 at 18:05:25 -0500, Hal Vaughan wrote:
> > > Any answers, suggestions, or help will be greatly appreciated.  If I knew
> > > C, I'd just rip out the routine m_setparms and set it up as a stand alone
> > > program, but it would also help to understand what is going on so I can
> > > do, in Perl, everything it does.
> >
> > Hmm, isn't 'stty' what you're looking for?
> 
> That hadn't come up in my searches.  I remember another program showed up that 
> didn't do half that (can't remember it now, I'd have to dig through notes).
> 
> According to the man page, it just might do what I need.
> 
> As I go through the Minicom code, though, I still find a few things in it 
> where I'm not sure what it is doing, and I'd like to do the same thing.  For 
> example, I've found CTRL-A then X from Minicom tends to reset the modem from 
> just about anything.  I found the code it uses:
> 
> void modemreset()
> {
> 	WIN *w;
> 
> 	if (P_MRESET[0] == '\0') return;
> 
> 	w = mc_tell(_("Resetting Modem"));
> 	mputs(P_MRESET, 0);
> 	sleep(1);
> 	wclose(w, 1);
> }
> 
> As I understand it, this is writing to the modem, but I can't find a 
> definition of P_MRESET anywhere.  So what is being written to the modem?  Is 
> it just a reset string like ATZ or the init string?

P_MRESET is the string from the configuration. Grep for mreset in
rwconf.c to get the default string.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



More information about the minicom-devel mailing list