Answer the question
In order to leave comments, you need to log in
Why is the com port blocked when reading from under php and how to enable the dio extension?
It is necessary to work directly with the com port (cashcode bill acceptor), ubuntu 16.04 & php7.1
When you turn on the PC, the first time you access the com port, the com port hangs when you try to read the response. I temporarily fly by launching a third-party program (which works fine with com ports), after it everything works as it should.
or to work with the com port
Helper for the bill acceptor
The controller itself
I read that you can try to read and write to the port through dio, they say, a lower level one.
Installed via pear sudo pear install channel://pecl.php.net/dio-0.1.0
Registered in the config /etc/php/7.1/fpm/php.ini
extension=dio.so
Call to undefined function dio_open()
Answer the question
In order to leave comments, you need to log in
Compared through the service the output of the working port config and no, it turned out
stty -F /dev/ttyS0 min 0 -hupcl -icrnl -ixon -isig -icanon -iexten -echo ignbrk noflsh -opost
everything worked
extension=dio.so
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question