I have plugged in a serial-USB, and run the command:
stty -F /dev/ttyUSB0 38400
Then I am using PHP to send calls to the serial-USB like:
And the call sends ok, and works, but the question is:
- If I send multiple calls to the serial-USB sometimes (rarely) the call is missed and the action its meant to do is not initiated, is there a way to solve this?
As I think there is block while the serial-USB is being used - if I send many calls at once, if I add usleep(50000); this helps, but does not solve it.
Can I setup the stty so that it puts all calls to it in a Queue or kills the previous call allowing the new one to come, or is there another config other than stty or can do something in the PHP to fix the blocked and unused call?
Thanks for any help.