I need advice on setting up a web server on a Raspberry Pi that can communicate with the serial port. Im leaning towards doing this i php/python/nodejs or c if necessary. Requirements: 1. Incoming data on serial port => update webpage through web sockets 2. Some event on webpage => send data to serial port A continuous loop to check for serial data will be heavy on the cpu.

For

Is there any way to get an event on incoming serial data and then read it? Torrent for mac. Found that has an on data event. Is that a good option? Can the serial communication be handled by the web server or will i have to create a service?

PHP USB serial port call from Windows to Linux. Up vote 1 down vote favorite. Now I need it to work via Linux, on a Raspberry Pi, so I have just installed standard Raspberry Linux, and Apache with PHP. Then attached the USB cable, and it appears as /dev/ttyUSB0 I have then CHMOD 777 /dev/ttyUSB0. Try composer require hyperthese/php-serial.