Answer the question
In order to leave comments, you need to log in
How to send data to Serial connection using php exec()?
I want to send the number 1 to a device with a Serial connection from php without unnecessary troubles.
Problem in the following:
From under Windows the following functions: exec('echo 1 >> COM5;');
Started linux mint.
Slightly rewrote the code: exec('echo 1 > /dev/ttyACM0;');
Does not work, I found out that this is due to lack of access to the device. Therefore, after $ sudo chmod 777 /dev/ttyACM0
Everything starts working, until you reconnect the device. After the right stray again.
I want everything to work right away when the device is connected, and preferably without extra crutches.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question