Garayed.com  

Go Back   Garayed.com > Linux
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-11-2007, 06:19 AM
Bill Marcum
 
Posts: n/a
Default Re: Serial port TTYS1 dropping characters ...

On Sat, 10 Mar 2007 20:30:37 +0100, gb
<gb@dd.com> wrote:
>
> 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
>

Try adding crtscts (hardware flow control) to the settings. Minicom
uses its own settings.


--
There is a great discovery still to be made in Literature: that of
paying literary men by the quantity they do NOT write.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:58 PM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.