We have a script that connects a Web Call to USB device.
The main scenario is, we have a tablet application, which is on WiFi,
It sends a URL call via local Wifi to some Lighting Hardware connected via USB to a RaspberryPi, which is running Apache/PHP etc.
It will go to the script, and send a message to the USB device.
The issue is, that when we send many of these URL calls, once in a while it freezes randomly with no apparent pattern, it seems the USB port or connection is left open or something, that does not allow the next call in.
... We have tried sending the code twice, or with a usleep delay, or via calling a redirected script twice. We have tried with fopen(), fwrite(), fclose();
But it has no effect... sometimes there is still a Pause.
If we run the same script on Windows, WAMP setup, it works fine, it does not seem to have the delay as on Linux / RaspberryPi, The script on Windows is: