[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

KAddressBook Dialer

I'm trying to build this missing piece: something to cause my modem to dial
a telephone number input as a command parameter from KAddressBook.

dial 5551212

I tried echo ATDT5551212 > /dev/ttyS0

Result: modem lights flash briefly, short burst of dialtone from speaker, no

Booted DOS and found that echo ATDT5551212 > COM1: dials just fine.

Back to linux, wrote a little c program:

#include <stdio.h>

#ifdef __linux__
    #define COMPORT  "/dev/ttyS0"
    #define COMPORT  "COM1:"

int main( void )
FILE *Port;

if( ( Port =fopen( COMPORT, "a+t" ) ) == NULL )
        printf( "Can't open %s for writing.\n", COMPORT );
        return( 1 );

fprintf( Port, "ATZ\nATDT5551212\n" );
fclose( Port );
return( 0 );

and tried it.  Under linux, all that happens is der blinkenlites but no
dialtone, no dialing.  Same source compiled and run under DOS fails at

I can send ATDT5551212 from minicom and linux dials as desired, but I need a
little program that accepts the number as an input param.

What magic is missing here?


Reply to: