Read system call is reading what is being writtein instead of OK when communicating with ...

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
I wrote a serial driver to communicate with modem.When I am reading my
read is reading what is being written instead of OK.what can be
thereason.Any suggestions are appreciaated.Thank you.

Re: Read system call is reading what is being writtein instead of OK when communicating with modem

Quoted text here. Click to load it

There is echo functionality somewhere on the system.
This means that either the modem or some other part on
the communications chain echoes back the sent characters.


--
Tomi Engdahl (http://www.iki.fi/then /)
Take a look at my electronics web links and documents at
We've slightly trimmed the long signature. Click to see the full one.
Re: Read system call is reading what is being writtein instead of OK when communicating with modem
Quoted text here. Click to load it

I have done options.c_lflag &3D%~(ICANON | ECHO | ECHOE | ISIG);But
still I am getting the error.Should I put tcflush() after read and
write system calls?

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
Quoted text here. Click to load it
athttp://www.epanorama.net /
Quoted text here. Click to load it


The echo is probably in your modem. Please
check it forst with minicom.

--

Tauno Voipio

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
Quoted text here. Click to load it

I am using cygwin.When I start hyperterminal,I am getting OK response
correctly.Moreover after checking through hyperterminal,my program is
giving OK as expected.But after 2 hours of testing it is again
printing the written input.Disconnecting and connecting also giving
this problem.The thing is hyperterminal is doing something which is
setting the things right.How can I know what the hyperterminal is
doing?

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
On May 30, 1:23A0%pm, "Ramakrishnaprasad.A"
Quoted text here. Click to load it

What should I do if my modem has echo in it?I have source code for
minicom.Does that helps?Thanks.

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
On May 30, 4:33A0%pm, "Ramakrishnaprasad.A"
Quoted text here. Click to load it

Will the minicom runs on cygwin?Thanks

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
Quoted text here. Click to load it
athttp://www.epanorama.net /
Quoted text here. Click to load it


This point is moot here - you're not using
a Linux system.

--

Tauno Voipio

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
Quoted text here. Click to load it
athttp://www.epanorama.net /
Quoted text here. Click to load it

OK.

The problem in then in the host OS layer (Windows).
The Windows-emulated Unix system call may be different
from the one running on a Unix-like system.

It is off-topic in a Linux newsgroup.

--

Tauno Voipio

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
Hi,


Quoted text here. Click to load it

Do any other cygwin apps (like minicom) work? If so, you could use strace()
to see what ioctl()s are being sent.

Unfortunately I've no idea what the 'doze equivalent is to trace
hyperterminal .exe would be (or even if there is one).

Cheers,
John McCallum



Re: Read system call is reading what is being writtein instead of OK when communicating with modem
Quoted text here. Click to load it

No.I am unable to configure minicom.So we decided to strap cygwin
altogether and shifted development to a linux machine.

Re: Read system call is reading what is being writtein instead of OK when communicating with modem
On Jun 5, 1:04 pm, "Ramakrishnaprasad.A"
Quoted text here. Click to load it

I am getting the same problem also on a linux machine.We are getting
the input that is written as well as ok.We connected an N95 to the usb
port for the purpose of serial communication.Please help.Thanks

Site Timeline