Networking Forums

Networking Forums > Computer Networking > Linux Networking > problem with data reception through serial port

Reply
Thread Tools Display Modes

problem with data reception through serial port

 
 
Pilatus
Guest
Posts: n/a

 
      11-25-2003, 08:46 AM
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
 
 
 
 
Leon.
Guest
Posts: n/a

 
      11-26-2003, 02:24 PM

"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

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Port Problem Fedora Core 6 bricherg@lanecc.edu Linux Networking 2 04-08-2007 07:23 PM
problem with serial data transmission Ulrich Ölmann Linux Networking 3 10-25-2006 02:28 PM
Possible to receive 8O1 data on serial port? Killans - First And Last And Always Linux Networking 4 08-19-2004 08:55 PM
Problem using USB to Serial adapter(GUC232A) for a serial modem Shanthi Paladugu Linux Networking 1 05-21-2004 04:28 PM
Problem With Serial Port John Linux Networking 5 09-29-2003 09:15 AM



1 2 3 4 5 6 7 8 9 10 11