php serial communication in linux

前端 未结 4 2068
时光说笑
时光说笑 2021-01-12 07:02

I have installed xampp in fedora 13.I am trying to communicate with microcontroller through serial port using php serial class. My code is example.php

inclu         


        
4条回答
  •  孤独总比滥情好
    2021-01-12 07:37

    First test a hello world type php script to testyour basic installation.

    Then verify the web server / php engine is running as a user which is in a group allowed to access the applicable /dev/ttyWHATEVER device file corresponding to the serial port. It would be surprising if that were true by default - you'll probably have to add it to the 'dialout' or similar group.

    Add some fault checking / reporting to your code.

提交回复
热议问题