You are not logged in.
I am trying to get php to access the serial port /dev/ttyACM0 using the php serial class "http://code.google.com/p/php-serial/sou … .class.php"
I am new to Arch but not linux.
I have PHP Version 5.3.8 installed and working on i686-pc-linux-gnu
I can access the serial port from the terminal using:
echo "some_text" > /dev/ttyACM0
but not with the serial class.
I have added http as a user to the uucp group, which did not work so I changed the permissions using:
chmod 777 /dev/ttyACM0
When running the php files from either the website or the terminal (even as sudo) I get the same error from the
"php_serial.class.php" >> "Unable to open device ......" and "Device most be opened ......".
I have been trying to figure this out for a few days now with no luck, so I tried the same files on my ubuntu server and everything worked fine.
I would like to try figure this out as I am keen to learn arch linux. I want to learn ARM CPU friendly OS for when the raspberry PI is launched.
Thanks in advance for any help.
Last edited by mawmillar (2012-01-22 13:26:07)
Offline
Offline
Maybe a hint - the author commented:
//
// OPEN/CLOSE DEVICE SECTION -- {START}
//
/**
* Device set function : used to set the device name/address.
* -> linux : use the device address, like /dev/ttyS0 ...
I would try to change "ttyS" to "ttyACM" in the code line following this comment.
Offline
pyther Thanks for your help, as you suspected the problem was with the open_basedir option in /etc/php/php.ini
I can now access the serial port with no issues.
Offline