Communicating serial port on windows with php

后端 未结 1 462
轻奢々
轻奢々 2021-02-06 10:13

I\'m working with an application which connects to Huawei 3G Modem using COM ports in php. Here is my code:



        
相关标签:
1条回答
  • 2021-02-06 10:40

    You need to determinate COM port number of your USB device via some external command called trough PHP's shell_exec().

    For Windows you can try this small tool:

    http://todbot.com/blog/2012/03/02/listcomports-windows-command-line-tool-for-usb-to-serial/

    https://github.com/todbot/usbSearch/

    After you call this tool via shell_exec(), you need to parse it's output (RegExp) and look for exact COM port number based on company/device name.

    0 讨论(0)
提交回复
热议问题