I'm trying to access a USB serial port, using a CLI PHP script in an XP machine.

I thought I'd got it sussed using fopen, however I have since discovered that the script on works if I have previously run Hyperteminal to connect to the com port. I've even tried setting the baud rate etc. from mode before I run the script, but no luck, the only way I can get the script to work is to run hyperterminal first.

Note I don't get any errors, it just hangs when I try to read from the port, but if I open the port in hyperterminal, then close hyperterminal and run my script it works till I reboot the PC.

Anybody any ideas?

I've got the same problem, what code are you using?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.