it turns out that I believe the device X is waiting for DTR to go to -5 volts. I had a chance to use my ancient 25 pin signal indicator for serial. I saw that during hardware handshake with hyperterminal, DTR was -5V, but with liberty basic it was positive voltage.
i tried snipping the following code in, to no effect . It could be because i am using 2 serial ports for this project but only want it for com2. I am limited on this because i know only basic BASIC
(also i tried resetting DTR and setting it as well. I have also tried to do the code snippet before and after the other com port setup )
could my problem be because i am using 2 serial ports, port2 and 10? If so, how can i fix that with this code?
lpFileName$ = "Com2"
dwCreationDistribution = _OPEN_EXISTING
hTemplateFile = _NULL
calldll #kernel32, "CreateFileA", _
lpFileName$ as ptr, _
dwDesiredAccess as ulong, _
dwShareMode as ulong, _
lpSecurityAttributes as ulong, _
dwCreationDistribution as ulong, _
dwFlagsAndAttributes as ulong, _
hTemplateFile as ulong, _
hFileHandle as ulong
calldll #kernel32, "CloseHandle", _
hFileHandle as ulong, _
result as long
'hFileHandle now contains
'the #handle, a number, that identifies the port
'Create a struct to receive the incoming handshaking data
'this data contains CTS DSR RI and RLSD info.
'For more detail go to
'http://msdn.microsoft.com/en-us/library/aa363258(VS.85).aspx
struct modem,DSRCTS as long
'Now open the com port in Liberty and use the hFileHandle value in API calls
open lpFileName$;":9600,n,8,1,ds0,cs0,rs" for random as #com
'now set reset and read the handshake lines like this
print "setting DTR"
CALLDLL #kernel32, "EscapeCommFunction", hFileHandle as ulong, _SETDTR as long,_
result as long