Moin Moin!
habe das hier gefunden:
mein stick ist am com port 5 zu hause :)
<?php
mode com5: BAUD=9600 Parity=n data=8 stop=1 xon=off
;
Das sollte eigentlich unnötig sein.
$fp = fopen("COM5:", "w+");
Der Doppelpunkt dürfte überflüssig bis störend sein. Ab COM10 bräuchtest Du die etwas gewöhnungsbedürftigere Notation \.\COM10, die müßte notfalls aber auch mit COM1 bis COM9 funktionieren -- also fopen("\\.\com5","w+").
if($fp)
{
echo "port geöffnet";
}
?>Jedoch kommt eine FehlerMeldung:
failed to open stream: Invalid argument on line 4 ($fp = fopen("COM5:", "w+");)
Vermutlich denkt fopen, COM5: sei ein Protokoll (wegen des Doppelpunktes).
Such doch mal eine Library speziell für den Zugriff auf COM-Ports.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so".
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so".