Minicom/Modem Questions From A Perl Programmer

Hal Vaughan hal at thresholddigital.com
Wed Dec 14 23:05:25 UTC 2005


I do not know C.  I've tried to learn it a few times, but have had to stop 
because of time constraints.  I have a program, in Perl, that communicates 
with a remote system that can only be reached by modem.  My Perl program 
seems unable to properly initialize and setup the modem and serial port 
connections.  Minicom, however, never fails at doing this.  So, while I don't 
know C, I have been studying Minicom's source code to try to understand what 
it is doing that either I'm not doing (I use Perl's Device::SerialPort to try 
to control the modem -- I'm working on Linux -- Debian Sarge), or am unable 
to do in Perl.

I'm having trouble understanding the code.  (I'm focusing on m_setparms in 
sysdep1.c.)  While I know termios and ioctl are important in C, and can find 
many references to them on Google, I cannot find anything that specifically 
tells me how they work.

While my questions are not all strictly about Minicom, this is the first 
mailing list or forum I've found where there would be a number of people who 
actually understand how to control and configure a serial port and modem.  
I've been working, literally, for days on this and have run out of resources, 
so it would help me greatly if I could get some answers to a few questions.

I've broken down my questions so they're easy to answer, and any answers at 
all will be a big help to me:

1) Are there more routines other than m_setparms (in sysdep1.c) that directly 
control modem settings?  If so, what are they?

2) How hard would it be to take m_setparms and turn it into a stand alone C 
program so I could call it from the command line like this: "setmodem 115200 
8N1" or "setmodem speed=115200 parity=none" or something similar?

3) Are there other forums or mailing lists anyone can suggest where my 
questions about controlling a modem from Perl would be more appropriate?

4) I've looked at the parameters for m_setparms, and see 3 I'm not clear 
about.  What are "fd", "hwf", and "swf"?  What do they do?

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.

Thank you!

Hal



More information about the minicom-devel mailing list