Reading and writing to/from serial device via USB on Linux with perl or PHP
问题 I'm having a problem reading from a serial device on Linux. The problem is rather weird, and I wasn't able to nail down the causes. I'm opening the /dev/ttyUSB0 file with PHP and beginning to communicate with the device according to the device's protocol. Many times I encountered a situation where the PHP script waits for the device to respond. When I ran a Perl script in parallel which supposed to do the same it sent a request to the same device, and quit supposedly without getting a