problem with data reception through serial port

This is a discussion on problem with data reception through serial port within the Linux Networking forums, part of the Linux Forums category; Hello, I try to 'catch' a message send by a remote PC. Using minicom I don't have problem : the ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-25-2003
Pilatus
 
Posts: n/a
Default problem with data reception through serial port

Hello,

I try to 'catch' a message send by a remote PC. Using minicom I don't have
problem : the modem is setting to wait a call with ats0=2 and I see RING
RING CONNECT and MY MESSAGE .
But I don't have to use minicom and I would like to write a script, so I
try it but it don't work properly: can somebody help me ?
I set the serial port with stty and use chat command to set the modem in
wait call (that seem ok) and the cat command to catch my message :
(
stty ispeed 9600
stty cs8
stty -parenb
stty -parodd
stty -clocal
stty -crtscts
)
chat -v '' 'ats0=2' connect </dev/cua0>/dev/cua0
cat /dev/ttyS0 > /home/test

please who can help me or give me a script to understand, I am linux
beginner.
Or is it possible to store the message received in the minicom window in a
personal folder?

thanks for your answers and excuse me for my bad english


Reply With Quote
  #2 (permalink)  
Old 11-26-2003
Leon.
 
Posts: n/a
Default Re: problem with data reception through serial port


"Pilatus" <radio.mnt@freesurf.fr> wrote in message
news:1069753538.35845.0@demeter.uk.clara.net...
> Hello,
>
> I try to 'catch' a message send by a remote PC. Using minicom I don't have
> problem : the modem is setting to wait a call with ats0=2 and I see RING
> RING CONNECT and MY MESSAGE .
> But I don't have to use minicom and I would like to write a script, so I
> try it but it don't work properly: can somebody help me ?
> I set the serial port with stty and use chat command to set the modem in
> wait call (that seem ok) and the cat command to catch my message :
> (
> stty ispeed 9600
> stty cs8
> stty -parenb
> stty -parodd
> stty -clocal
> stty -crtscts
> )


Why did you turn OFF crtscts ?? Isnt that a good thing to have ON ?
It does depend on your modem, but hey,what sort of modem are you using that
doesnt support RTSCTS flow control?

> chat -v '' 'ats0=2' connect </dev/cua0>/dev/cua0
> cat /dev/ttyS0 > /home/test


>
> please who can help me or give me a script to understand, I am linux
> beginner.


What you have is a good start.
You want to make the chat script more complex. it should try to wake up the
modem, with
send "AT", expect "OK". It should have TIMEOUT variable set.
Also, you might like to check the modem settings, and send a command like
ATV1 to turn on verbal messages (eg CONNECT), and others to turn on rtscts
flow control. However you can do this once off and store it with AT&W, and
dont worry.. (trust the modem can remember - but many dont , so good
software always sends a comprehensive setup. )

Also you have little idea of how to debug this system.
You havent said what is actually occuring , or what you think could be
wrong.



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

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




All times are GMT +1. The time now is 08:55 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0