0

I've tried to connect the NV200 smart payout device to my php project using php_serial.class.php, but got this error:

Specified serial port is not valid in D:\xampp-7\htdocs\testsocket\php_serial.class.php on line 145

II'm using windows 7 and checked into device manager, the device is connected to COM3. This is my code:

include "php_serial.class.php";
$serial = new PhpSerial;

$serial->deviceSet("COM3");

$serial->confBaudRate(2400);
$serial->confParity("none");
$serial->confCharacterLength(8);
$serial->confStopBits(1);
$serial->confFlowControl("none");

$serial->deviceOpen();

$serial->sendMessage("Hello !");

What have gone wrong? What is the proper way to connect to serial port? Please help.

0

1 Answer 1

1

Sorry guys. I opened a software that also connect to COM3. It appears that serial port cannot connect to more than one software.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.