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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 !
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.
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.