Thanks,
Shane Crowe
Perl script:
#! /usr/bin/perl
$endSlip = pack("H18", "C0E70000000000FFC0"); #Here are the 9 bytes to send
open( PORT, "+>/dev/cua0" ); #Open the serial port
print PORT $endSlip; #Send packet to the port
close( PORT ); #Close the port
rc.serial file:
~#!/bin/sh
cd /dev
SETSERIAL="/bin/setserial -b"
PORTS=`echo cua? cua??`
${SETSERIAL} /dev/cua0 uart 16450 port 0x3F8 irq 4
${SETSERIAL} /dev/cua1 uart 16450 port 0x2F8 irq 3
${SETSERIAL} /dev/cua2 uart 16450 port 0x3E8 irq 5
echo "done."
${SETSERIAL} -bg ${PORTS}
I tried out your little script sending it to a file and it worked, my
thought is that you are trying to end the slip connection by sending
that bytestream to your modem. Well, if you are connected then your
device is locked yes? That means no other program will be able to use
the modem... So your script is denied access to sending that packet
to your modem.. When you open the cua0, check to see if the open was
succesful. open (port, /dev/cua0) ||die ("Couldn't open device");
See if that is your problem...
--
From Lifes little instruction book II
# 870 Remember that great love and
great achievements involve great risk.
Richard Nairn ren...@acs.ucalgary.ca WWW: www.ucalgary.ca/~renairn/home.html