Menu

ttystream

Help
2000-07-15
2000-07-30
  • Raphael Alla

    Raphael Alla - 2000-07-15

    Is there any example of code using ttystream available?

    I am trying to use this class to send commands to my modem, but I have no experience at all with this.

    Something like
    ttystream modem("/dev/ttyS1")
    modem << "ATZ\010\013";
    does not do anthing !

     
    • David Sugar

      David Sugar - 2000-07-17

      In C++ "streams" you need to "flush" the stream before output is actually sent.  Hence, you could do modem << "ATZ\010\013" << flush;  or use a "endl" operator at the end of the stream statement.

       
    • Eric Schendel

      Eric Schendel - 2000-07-30

      I could not get something like that to work either even with using flush or using Interative mode.  But I did make a patch which I put on sourceforge for version 1.1 that seems to make everything work properly.  Try it out and see if that fixes your problem and let me know if it works or not.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.