"Pilatus" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
|