View Single Post
  #1 (permalink)  
Old 03-10-2007, 06:30 PM
gb
 
Posts: n/a
Default Serial port TTYS1 dropping characters ...

Hello,

I got a little problem trying to communicate with my GSM with serial port
(AT Modem Commands) on Mandriva linux 2007.
I can communicate without any problem with the GSM when using minicom using
default configuration (9600bps 8N1 handshaking disables).

But when I try to communicate with the gsm through a PERL or bash script, I
got a problem.
I use this kind of command to send a command to the GSM (here, to prepare
the sending of a SMS):

[root@localhost ~]# echo $'AT+CMGS="+33683485943"\r' > /dev/ttyS1

But I can't send a single line with more than 17 characters !
The previous example will only send "'AT+CMGS="+3368348" dropping the lasts
characters and the \r ... So it will not be understandable by the GSM ...

When communicating with minicom, all the string can be send without any
problem with no size limit ...
I tried using the perl module Device::SerialPort but still got the same
problem ( characters > #17 are droped).
The problem also appears on ttyS0 ...

Strange : when sending 20 ou 30 time the same command with bash very fast,
it finaly work at the 30th try. The GSM receive the full command ...

For information (these settings works with minicom)
[root@localhost ~]# stty < /dev/ttyS1
speed 9600 baud; line = 0;
min = 1; time = 5;
ignbrk -brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

Thanks for your help ...

Guillaume

Reply With Quote