M1306B and Perl


#1

Hi all,
have someone experiance with M1306B in Perl using Device::SerialPort?
I dont;know why the AT command are ignored.

Example:
use Device::SerialPort;

$PortObj = new Device::SerialPort (’/dev/ttyS0’) || die "error ";
$PortObj->baudrate(9600);
$PortObj->databits(8);
$PortObj->stopbits(1);
$PortObj->handshake(‘rts’);
$PortObj->parity(“none”);
$PortObj->write(“AT+cclk?\r”);
$result = $PortObj->input;
print “Result: $result \n” if ($result);

Thanks.


#2

How do you know that they are being ignoerd?

Maybe the the modem is repsonding, but your script is not receiving the response…


#3

I recived response but incorrect. The serial port is configured via manual - databit 8,stop bit1,parity none, RTS. When i send some AT command i allways gett a response 0x00H. I don’t know where is the problem.


#4

Are you sure that the modem is on 9600 bps? The default speed is 115200 bps.

Do you mean you have also tried a terminal program without success?

perl forum?

Cheers,
tom