What are my settings?
cbutcher
Posts: 16
I'm currious to know if there is a command to find out what a serial ports current settings are?
Example: I know I can do a send_command [5001:1:1],'SET BAUD 9600,N,8,1'
But can I ask what the current setting are later? Something like:
send_command [5001:1:1],'?SET'
The reason I ask is because I have run into an issue where I issue a set baud command and everything is moving along nicely and then a device stops working. When I query what is being returned from the device I get junk. Which led me to believe it was a baud issue. I reissued the set baud command and the device started working again.
Thoughts here are something was sent to change the baud rate, but don't see where it could have happened in my code(baud is set a startup and never touched again). The device changed it or changed what it was listening at. Someone hacked my system and changed it(really reaching here).
So I'd like to query it and then change it back to what it is supposed to be if I see it is different.
Example: I know I can do a send_command [5001:1:1],'SET BAUD 9600,N,8,1'
But can I ask what the current setting are later? Something like:
send_command [5001:1:1],'?SET'
The reason I ask is because I have run into an issue where I issue a set baud command and everything is moving along nicely and then a device stops working. When I query what is being returned from the device I get junk. Which led me to believe it was a baud issue. I reissued the set baud command and the device started working again.
Thoughts here are something was sent to change the baud rate, but don't see where it could have happened in my code(baud is set a startup and never touched again). The device changed it or changed what it was listening at. Someone hacked my system and changed it(really reaching here).
So I'd like to query it and then change it back to what it is supposed to be if I see it is different.
0
Comments
For most people, Google is their best friend - for us, it's AMX-PI.
That did it. Thanks.