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

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.

Reply to
Ramakrishnaprasad.A
Loading thread data ...

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 
http://www.epanorama.net/
Reply to
Tomi Holger Engdahl

ma.net/

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?

Reply to
Ramakrishnaprasad.A

at

formatting link

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

--

Tauno Voipio
Reply to
Tauno Voipio

rama.net/

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?

Reply to
Ramakrishnaprasad.A

y

norama.net/

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

Reply to
Ramakrishnaprasad.A

my

panorama.net/

Will the minicom runs on cygwin?Thanks

Reply to
Ramakrishnaprasad.A

at

formatting link

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
Reply to
Tauno Voipio

at

formatting link

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

--

Tauno Voipio
Reply to
Tauno Voipio

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

Reply to
John McCallum

)

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

Reply to
Ramakrishnaprasad.A

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

Reply to
ramkey

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.