Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

problem with data reception through serial port

Reply
 
Thread Tools Display Modes
  #1  
Old 11-25-2003, 09:46 AM
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




Pilatus
Reply With Quote
  #2  
Old 11-26-2003, 03:24 PM
Leon.
Guest
 
Posts: n/a
Default Re: problem with data reception through serial port


"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.



Reply With Quote
Reply

Tags
data, port, problem, reception, serial

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:54 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.