Read system call is reading what is being writtein instead of OK whencommunicating with modem - Embedded

This is a discussion on Read system call is reading what is being writtein instead of OK whencommunicating with modem - Embedded ; 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 Thread
Results 1 to 12 of 12

Thread: Read system call is reading what is being writtein instead of OK whencommunicating with modem

  1. Read system call is reading what is being writtein instead of OK whencommunicating 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.

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

    "Ramakrishnaprasad.A" writes:

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


    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/

  3. Re: Read system call is reading what is being writtein instead of OKwhen communicating with modem

    On May 29, 1:47*pm, Tomi Holger Engdahl
    wrote:
    > "Ramakrishnaprasad.A" writes:
    > > 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.

    >
    > 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 athttp://www.epanorama.net/


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

  4. Re: Read system call is reading what is being writtein instead ofOK when communicating with modem

    Ramakrishnaprasad.A wrote:
    > On May 29, 1:47 pm, Tomi Holger Engdahl
    > wrote:
    >
    >>"Ramakrishnaprasad.A" writes:
    >>
    >>>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.

    >>
    >>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 athttp://www.epanorama.net/

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



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

    --

    Tauno Voipio

  5. Re: Read system call is reading what is being writtein instead of OKwhen communicating with modem

    On May 30, 1:17*am, Tauno Voipio wrote:
    > Ramakrishnaprasad.A wrote:
    > > On May 29, 1:47 pm, Tomi Holger Engdahl
    > > wrote:

    >
    > >>"Ramakrishnaprasad.A" writes:

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

    >
    > >>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 athttp://www.epanorama.net/

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

    >
    > The echo is probably in your modem. Please
    > check it forst with minicom.
    >
    > --
    >
    > Tauno Voipio- Hide quoted text -
    >
    > - Show quoted text -


    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?

  6. Re: Read system call is reading what is being writtein instead of OKwhen communicating with modem

    On May 30, 1:23*pm, "Ramakrishnaprasad.A"
    wrote:
    > On May 30, 1:17*am, Tauno Voipio wrote:
    >
    >
    >
    >
    >
    > > Ramakrishnaprasad.A wrote:
    > > > On May 29, 1:47 pm, Tomi Holger Engdahl
    > > > wrote:

    >
    > > >>"Ramakrishnaprasad.A" writes:

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

    >
    > > >>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 athttp://www.epanorama.net/

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

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

    >
    > > --

    >
    > > Tauno Voipio- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > 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?- Hide quoted text -
    >
    > - Show quoted text -


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

  7. Re: Read system call is reading what is being writtein instead of OKwhen communicating with modem

    On May 30, 4:33*pm, "Ramakrishnaprasad.A"
    wrote:
    > On May 30, 1:23*pm, "Ramakrishnaprasad.A"
    >
    >
    >
    >
    >
    > wrote:
    > > On May 30, 1:17*am, Tauno Voipio wrote:

    >
    > > > Ramakrishnaprasad.A wrote:
    > > > > On May 29, 1:47 pm, Tomi Holger Engdahl
    > > > > wrote:

    >
    > > > >>"Ramakrishnaprasad.A" writes:

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

    >
    > > > >>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 athttp://www.epanorama.net/

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

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

    >
    > > > --

    >
    > > > Tauno Voipio- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > 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?- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > What should I do if my modem has echo in it?I have source code for
    > minicom.Does that helps?Thanks.- Hide quoted text -
    >
    > - Show quoted text -


    Will the minicom runs on cygwin?Thanks

  8. Re: Read system call is reading what is being writtein instead ofOK when communicating with modem

    Ramakrishnaprasad.A wrote:
    > On May 30, 1:17 am, Tauno Voipio wrote:
    >
    >>Ramakrishnaprasad.A wrote:
    >>
    >>>On May 29, 1:47 pm, Tomi Holger Engdahl
    >>>wrote:

    >>
    >>>>"Ramakrishnaprasad.A" writes:

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

    >>
    >>>>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 athttp://www.epanorama.net/

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

    >>
    >>The echo is probably in your modem. Please
    >>check it forst with minicom.
    >>
    >>--
    >>
    >>Tauno Voipio- Hide quoted text -
    >>
    >>- Show quoted text -

    >
    >
    > 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?


    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

  9. Re: Read system call is reading what is being writtein instead ofOK when communicating with modem

    Ramakrishnaprasad.A wrote:
    > On May 30, 4:33 pm, "Ramakrishnaprasad.A"
    > wrote:
    >
    >>On May 30, 1:23 pm, "Ramakrishnaprasad.A"
    >>
    >>
    >>
    >>
    >>
    >> wrote:
    >>
    >>>On May 30, 1:17 am, Tauno Voipio wrote:

    >>
    >>>>Ramakrishnaprasad.A wrote:
    >>>>
    >>>>>On May 29, 1:47 pm, Tomi Holger Engdahl
    >>>>>wrote:

    >>
    >>>>>>"Ramakrishnaprasad.A" writes:

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

    >>
    >>>>>>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 athttp://www.epanorama.net/

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

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

    >>
    >>>>--

    >>
    >>>>Tauno Voipio- Hide quoted text -

    >>
    >>>>- Show quoted text -

    >>
    >>>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?- Hide quoted text -

    >>
    >>>- Show quoted text -

    >>
    >>What should I do if my modem has echo in it?I have source code for
    >>minicom.Does that helps?Thanks.- Hide quoted text -
    >>
    >>- Show quoted text -

    >
    >
    > Will the minicom runs on cygwin?Thanks



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

    --

    Tauno Voipio

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

    Hi,

    Ramakrishnaprasad.A wrote:

    > I am using cygwin.When I start hyperterminal,I am getting OK response
    > correctly.
    > [snip]
    > The thing is hyperterminal is doing something which is
    > setting the things right.How can I know what the hyperterminal is
    > doing?


    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



  11. Re: Read system call is reading what is being writtein instead of OKwhen communicating with modem

    On Jun 2, 4:45*pm, John McCallum
    wrote:
    > Hi,
    >
    > Ramakrishnaprasad.A wrote:
    > > I am using cygwin.When I start hyperterminal,I am getting OK response
    > > correctly.
    > > [snip]
    > > The thing is hyperterminal is doing something which is
    > > setting the things right.How can I know what the hyperterminal is
    > > doing?

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


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

  12. Re: Read system call is reading what is being writtein instead of OKwhen communicating with modem

    On Jun 5, 1:04 pm, "Ramakrishnaprasad.A"
    wrote:
    > On Jun 2, 4:45 pm, John McCallum
    > wrote:
    >
    >
    >
    > > Hi,

    >
    > >Ramakrishnaprasad.A wrote:
    > > > I am using cygwin.When I start hyperterminal,I am getting OK response
    > > > correctly.
    > > > [snip]
    > > > The thing is hyperterminal is doing something which is
    > > > setting the things right.How can I know what the hyperterminal is
    > > > doing?

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

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


    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 Thread