Anyone interested in controlling the serial ports directly via kernel32 functions?
You need the following file "cfx.ini" with the settings of the used comm port
[Comm]
CommPort=1
CommBaud=9600
CommParity=0;0=none, 1=odd, 2=even, 3=mark, 4=space
CommBits=8;4-8
CommStop=1;0=0, 1=1,5, 2=2
CommCtrl=0x0011
LogDir=""
Debug=1
I spent much time to find an alternative to mscomm32 or other udfs using a dll.
The test script sends a reset to a modem and shows the response.
Sending chr(0) is possible, but I have to find a solution to receive chr(0).
With the settings above (CommCtrl) the serial port is able to receive chr(0), the "BytesReceived" value shows that a character was received.
The problem is, that chr(0) marks the end of a string.
Questions: Does it works with Win98 or Vista?
Any comments are welcome.
Uwe cfxtest0.au3 cfx.au3