From: Henk Kortstra on 27 Aug 2007 02:46 Hi All, I have a question about sending messages to a rs232 port. I'm sending messagest to a device that gives me info about registered persons. The problem is, that I can't initialise the device from VO. But after I used the demo app, VO also can read the device. It is just like the demo app initialises the device, and after that VO can als send/read from the device. I'm using portmon to track what kind of codes are send to the device, but I can't see what I'm missing, or how I can solve (initialise) the device with VO. Below this message I have put results from Portmon: 1) First try with VO, before the demo app has started. The VO-app doens't work. 2) First try with the Demo App, what does work 3) Second try with VO, what now also does work I'm using the serial class. The code i'm using is: oSer := Serial{} IF ! oSer:Open("COM5",9600,"N",8,1) ErrorBox{,"Promag:(1) cannot open COM5"}:show() exit Endif //LOGIN oSer:Write(CHR(2)) oSer:Write("L") oSer:Write("0000") oSer:Write(CHR(13)) dwDummy := Asc(oSer:Read(1)) if dwDummy==0 ErrorBox{self,"Login failed"}:show() exit endif Can anyone see, what I have to do, to initialise the device with VO, so that the first try with VO also works, without using the demo-app first? Regards Henk Kortstra. 1) First try with VO: 0 0.13356838 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS InSize: 4096 OutSize: 4096 2 0.00000268 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS RI:-1 RM:500 RC:1000 WM:0 WC:1000 4 0.00000067 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 5 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 7 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 8 0.00000065 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 9 0.00000045 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 10 0.00000038 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 11 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 12 0.05350680 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS Rate: 9600 13 0.00298947 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 14 0.00297631 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 15 0.00000078 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 16 0.00000072 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 17 0.00000064 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 19 0.00000051 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 20 0.05447063 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS Rate: 1200 21 0.00242558 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 22 0.00297565 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 23 0.00398295 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS StopBits: 1 Parity: NONE WordLength: 7 24 0.00000114 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 25 0.00696934 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 26 0.00091875 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . 27 0.00093789 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L 28 0.00093976 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 29 0.00093980 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . 30 1.50002063 Partner.DBG IRP_MJ_READ Serial3 TIMEOUT Length 0: 31 0.00000414 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR 32 0.00270768 Partner.DBG IOCTL_SERIAL_CLR_DTR Serial3 SUCCESS 33 0.00294357 Partner.DBG IOCTL_SERIAL_CLR_RTS Serial3 SUCCESS 34 0.00000119 Partner.DBG IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS 35 0.00000206 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR 36 0.03006611 Partner.DBG IRP_MJ_CLEANUP Serial3 SUCCESS 37 0.08773053 Partner.DBG IRP_MJ_CLOSE Serial3 SUCCESS 2) First try with the demo-app: 0 0.13308018 MSR120.exe IRP_MJ_CREATE Serial3 SUCCESS Options: Open 1 0.00000239 MSR120.exe IRP_MJ_FLUSH_BUFFERS Serial3 SUCCESS 2 0.00000136 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 3 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 4 0.00000066 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 5 0.00000064 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 6 0.00000068 MSR120.exe IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS RI:-1 RM:0 RC:0 WM:0 WC:0 7 0.00000064 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 8 0.00000060 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 9 0.00000057 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 10 0.00000053 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 11 0.00000063 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 12 0.00000058 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 13 0.00000056 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 14 0.00000052 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 15 0.05348187 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS Rate: 9600 16 0.00257213 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 17 0.00297741 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 18 0.00000075 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS StopBits: 1 Parity: NONE WordLength: 7 19 0.00000087 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 20 0.00695588 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 21 0.00000148 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 22 0.00000054 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 23 0.00000051 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 24 0.00000046 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 25 0.05375837 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS Rate: 9600 26 0.00215867 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 27 0.00297495 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 28 0.00000070 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS StopBits: 1 Parity: NONE WordLength: 7 29 0.00000083 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 30 0.00695350 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 31 0.00000078 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 32 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 33 0.00000060 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 34 0.00000057 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 35 0.05416480 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS Rate: 9600 36 0.00271702 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 37 0.00297862 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 38 0.00398937 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS StopBits: 1 Parity: NONE WordLength: 8 39 0.00000124 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 40 0.00695856 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 41 0.00000100 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 42 0.00000066 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 43 0.00000059 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 44 0.00000060 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 45 0.00000102 MSR120.exe IOCTL_SERIAL_SET_WAIT_MASK Serial3 SUCCESS Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BRK RING 46 0.00000037 MSR120.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS InSize: 1024 OutSize: 256 47 0.00000103 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: TXABORT TXCLEAR 48 0.00000082 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: RXABORT RXCLEAR 49 0.00000039 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS 50 0.00000034 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS 51 0.00286683 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 52 0.00297183 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 53 0.00291440 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 54 0.00690560 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 55 0.00298020 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 56 0.00094354 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 57 0.00098412 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 58 0.00096501 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 59 0.00098642 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 60 0.00096843 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 61 0.00098604 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 62 0.00096879 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 63 0.00098561 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 64 0.00096857 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 65 0.00098422 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 66 0.00096828 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 67 0.00098851 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 68 0.00097018 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 69 0.00098516 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 70 0.00096742 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 71 0.00098716 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 72 0.00096774 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 73 0.00098673 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 74 0.00096929 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 75 0.00098290 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 76 0.00096711 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 77 0.00098835 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 78 0.00097126 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 79 0.00098652 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 80 0.00097014 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 81 0.00098546 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 82 0.00096915 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 83 0.00098654 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 84 0.00096919 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 85 0.00098689 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 86 0.00096960 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 87 0.00098720 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 88 0.00097034 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 89 0.00098509 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 90 0.00096888 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 91 0.00098498 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 92 0.00096786 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 93 0.00098678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 94 0.00096822 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 95 0.00098731 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 96 0.00096981 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 97 0.00099082 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 98 0.00097378 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 99 0.00098137 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 100 0.00097086 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 101 0.00097074 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 102 0.00095348 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 103 0.00098126 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 104 0.00096880 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 105 0.00097121 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 106 0.00094678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 107 0.00098237 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 108 0.00096766 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 109 0.00098791 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 110 0.00097027 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 111 0.00098557 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 112 0.00096850 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 113 0.00097090 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 114 0.00094687 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 115 0.00098532 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 116 0.00096972 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 117 0.00098683 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 118 0.00096923 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 119 0.00098165 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 120 0.00097080 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. 121 0.04099233 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 122 0.00000153 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 123 0.00000204 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . 124 0.00090323 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 125 0.00000107 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 126 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N 127 0.00088289 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 128 0.00000077 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 129 0.00000124 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 130 0.00095234 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 131 0.00000097 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 132 0.00000127 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 133 0.00087157 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 134 0.00000082 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 135 0.00000126 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . 136 0.11098306 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 137 0.00000276 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 138 0.00000202 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . 139 0.00062712 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 140 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 141 0.00000138 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N 142 0.00093919 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 143 0.00000078 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 144 0.00000122 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 145 0.00094818 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 146 0.00000099 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 147 0.00000134 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 148 0.00096052 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS 149 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 SUCCESS 150 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . 151 0.00000000 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 3) Second try with VO, now succesful 0 0.13302574 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS InSize: 4096 OutSize: 4096 2 0.00000267 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS RI:-1 RM:500 RC:1000 WM:0 WC:1000 4 0.00000076 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 5 0.00000041 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 7 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 8 0.00000066 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 9 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 10 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 11 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 12 0.05460763 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS Rate: 9600 13 0.00230041 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 14 0.00298118 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 15 0.00000091 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 16 0.00000064 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS 17 0.00000072 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 SUCCESS 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS 19 0.00000060 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS 20 0.05416702 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS Rate: 9600 21 0.00272547 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS 22 0.00297768 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS 23 0.00398864 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS StopBits: 1 Parity: NONE WordLength: 8 24 0.00000109 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 25 0.00696641 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 26 0.00090581 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . 27 0.00092436 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L 28 0.00093736 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 29 0.00095309 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . 30 0.06796323 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . 31 0.00090810 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A 32 0.00095601 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . 33 0.00093294 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . 34 0.00095755 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: N 35 0.00096111 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . 36 0.11092513 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . 37 0.00088118 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A 38 0.00092209 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 39 0.00054886 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 40 0.00092590 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 41 0.00093440 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 4 42 0.00093624 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 43 0.00093655 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 5
From: Ginny Caughey on 27 Aug 2007 07:07 Henk, It looks to me like you're trying to read from the serial port before there may be any data to read. You need to wait until there is data and then read it. Also make sure the device you're sending to is expecting just a carriage return and not a carriage return/line feed pair. -- Ginny "Henk Kortstra" <henk75(a)gmail.com> wrote in message news:1188197216.236746.326980(a)d55g2000hsg.googlegroups.com... > Hi All, > > I have a question about sending messages to a rs232 port. > I'm sending messagest to a device that gives me info about registered > persons. > The problem is, that I can't initialise the device from VO. > But after I used the demo app, VO also can read the device. > It is just like the demo app initialises the device, and after that VO > can als send/read from the device. > > I'm using portmon to track what kind of codes are send to the device, > but I can't see what I'm missing, or how I can solve (initialise) the > device with VO. > > Below this message I have put results from Portmon: > > 1) First try with VO, before the demo app has started. > The VO-app doens't work. > > 2) First try with the Demo App, what does work > > 3) Second try with VO, what now also does work > > I'm using the serial class. > The code i'm using is: > > oSer := Serial{} > IF ! oSer:Open("COM5",9600,"N",8,1) > ErrorBox{,"Promag:(1) cannot open COM5"}:show() > exit > Endif > > //LOGIN > oSer:Write(CHR(2)) > oSer:Write("L") > oSer:Write("0000") > oSer:Write(CHR(13)) > > dwDummy := Asc(oSer:Read(1)) > if dwDummy==0 > ErrorBox{self,"Login failed"}:show() > exit > endif > > Can anyone see, what I have to do, to initialise the device with VO, > so that the first try with VO also works, without using the demo-app > first? > > Regards > Henk Kortstra. > > 1) First try with VO: > > 0 0.13356838 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 4096 OutSize: 4096 > 2 0.00000268 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:500 RC:1000 WM:0 WC:1000 > 4 0.00000067 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 5 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 7 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 8 0.00000065 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 9 0.00000045 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 10 0.00000038 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 11 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 12 0.05350680 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 13 0.00298947 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 14 0.00297631 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 15 0.00000078 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 > 16 0.00000072 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 17 0.00000064 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 19 0.00000051 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 20 0.05447063 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 1200 > 21 0.00242558 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 22 0.00297565 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 23 0.00398295 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > SUCCESS StopBits: 1 Parity: NONE WordLength: 7 > 24 0.00000114 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 25 0.00696934 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 26 0.00091875 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 27 0.00093789 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L > 28 0.00093976 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 > 29 0.00093980 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 30 1.50002063 Partner.DBG IRP_MJ_READ Serial3 TIMEOUT Length 0: > 31 0.00000414 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 32 0.00270768 Partner.DBG IOCTL_SERIAL_CLR_DTR Serial3 SUCCESS > 33 0.00294357 Partner.DBG IOCTL_SERIAL_CLR_RTS Serial3 SUCCESS > 34 0.00000119 Partner.DBG IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 35 0.00000206 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 36 0.03006611 Partner.DBG IRP_MJ_CLEANUP Serial3 SUCCESS > 37 0.08773053 Partner.DBG IRP_MJ_CLOSE Serial3 SUCCESS > > 2) First try with the demo-app: > > 0 0.13308018 MSR120.exe IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000239 MSR120.exe IRP_MJ_FLUSH_BUFFERS Serial3 SUCCESS > 2 0.00000136 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 3 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 4 0.00000066 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 5 0.00000064 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 6 0.00000068 MSR120.exe IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:0 RC:0 WM:0 WC:0 > 7 0.00000064 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 8 0.00000060 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 9 0.00000057 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 10 0.00000053 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 11 0.00000063 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 12 0.00000058 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 13 0.00000056 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 14 0.00000052 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 15 0.05348187 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 16 0.00257213 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 17 0.00297741 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 18 0.00000075 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 7 > 19 0.00000087 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 20 0.00695588 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 21 0.00000148 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 22 0.00000054 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 23 0.00000051 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 24 0.00000046 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 25 0.05375837 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 26 0.00215867 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 27 0.00297495 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 28 0.00000070 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 7 > 29 0.00000083 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 30 0.00695350 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 31 0.00000078 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 32 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 33 0.00000060 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 34 0.00000057 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 35 0.05416480 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 36 0.00271702 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 37 0.00297862 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 38 0.00398937 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 8 > 39 0.00000124 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 40 0.00695856 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 41 0.00000100 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 42 0.00000066 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 43 0.00000059 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 44 0.00000060 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 45 0.00000102 MSR120.exe IOCTL_SERIAL_SET_WAIT_MASK Serial3 SUCCESS > Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BRK RING > 46 0.00000037 MSR120.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 1024 OutSize: 256 > 47 0.00000103 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT TXCLEAR > 48 0.00000082 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > RXABORT RXCLEAR > 49 0.00000039 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 50 0.00000034 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 51 0.00286683 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 52 0.00297183 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 53 0.00291440 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 54 0.00690560 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 55 0.00298020 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 56 0.00094354 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 57 0.00098412 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 58 0.00096501 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 59 0.00098642 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 60 0.00096843 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 61 0.00098604 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 62 0.00096879 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 63 0.00098561 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 64 0.00096857 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 65 0.00098422 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 66 0.00096828 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 67 0.00098851 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 68 0.00097018 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 69 0.00098516 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 70 0.00096742 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 71 0.00098716 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 72 0.00096774 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 73 0.00098673 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 74 0.00096929 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 75 0.00098290 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 76 0.00096711 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 77 0.00098835 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 78 0.00097126 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 79 0.00098652 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 80 0.00097014 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 81 0.00098546 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 82 0.00096915 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 83 0.00098654 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 84 0.00096919 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 85 0.00098689 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 86 0.00096960 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 87 0.00098720 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 88 0.00097034 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 89 0.00098509 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 90 0.00096888 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 91 0.00098498 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 92 0.00096786 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 93 0.00098678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 94 0.00096822 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 95 0.00098731 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 96 0.00096981 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 97 0.00099082 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 98 0.00097378 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 99 0.00098137 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 100 0.00097086 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 101 0.00097074 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 102 0.00095348 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 103 0.00098126 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 104 0.00096880 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 105 0.00097121 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 106 0.00094678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 107 0.00098237 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 108 0.00096766 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 109 0.00098791 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 110 0.00097027 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 111 0.00098557 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 112 0.00096850 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 113 0.00097090 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 114 0.00094687 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 115 0.00098532 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 116 0.00096972 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 117 0.00098683 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 118 0.00096923 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 119 0.00098165 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 120 0.00097080 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 121 0.04099233 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 122 0.00000153 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 123 0.00000204 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 124 0.00090323 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 125 0.00000107 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 126 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N > 127 0.00088289 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 128 0.00000077 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 129 0.00000124 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 130 0.00095234 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 131 0.00000097 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 132 0.00000127 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 133 0.00087157 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 134 0.00000082 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 135 0.00000126 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 136 0.11098306 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 137 0.00000276 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 138 0.00000202 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 139 0.00062712 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 140 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 141 0.00000138 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N > 142 0.00093919 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 143 0.00000078 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 144 0.00000122 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 145 0.00094818 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 146 0.00000099 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 147 0.00000134 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 148 0.00096052 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 149 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 150 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 151 0.00000000 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 > > 3) Second try with VO, now succesful > > 0 0.13302574 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 4096 OutSize: 4096 > 2 0.00000267 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:500 RC:1000 WM:0 WC:1000 > 4 0.00000076 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 5 0.00000041 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 7 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 8 0.00000066 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 9 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 10 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 11 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 12 0.05460763 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 13 0.00230041 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 14 0.00298118 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 15 0.00000091 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 > 16 0.00000064 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 17 0.00000072 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 19 0.00000060 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 20 0.05416702 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 21 0.00272547 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 22 0.00297768 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 23 0.00398864 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > SUCCESS StopBits: 1 Parity: NONE WordLength: 8 > 24 0.00000109 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 25 0.00696641 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 26 0.00090581 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 27 0.00092436 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L > 28 0.00093736 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 > 29 0.00095309 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 30 0.06796323 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 31 0.00090810 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A > 32 0.00095601 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 33 0.00093294 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 34 0.00095755 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: N > 35 0.00096111 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 36 0.11092513 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 37 0.00088118 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A > 38 0.00092209 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 39 0.00054886 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 40 0.00092590 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 41 0.00093440 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 4 > 42 0.00093624 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 43 0.00093655 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 5 >
From: Dave Francis on 27 Aug 2007 07:24 Henk, I have never used this but it is where I would start... http://www.microsoft.com/technet/sysinternals/utilities/portmon.mspx HTH Dave Francis "Henk Kortstra" <henk75(a)gmail.com> wrote in message news:1188197216.236746.326980(a)d55g2000hsg.googlegroups.com... > Hi All, > > I have a question about sending messages to a rs232 port. > I'm sending messagest to a device that gives me info about registered > persons. > The problem is, that I can't initialise the device from VO. > But after I used the demo app, VO also can read the device. > It is just like the demo app initialises the device, and after that VO > can als send/read from the device. > > I'm using portmon to track what kind of codes are send to the device, > but I can't see what I'm missing, or how I can solve (initialise) the > device with VO. > > Below this message I have put results from Portmon: > > 1) First try with VO, before the demo app has started. > The VO-app doens't work. > > 2) First try with the Demo App, what does work > > 3) Second try with VO, what now also does work > > I'm using the serial class. > The code i'm using is: > > oSer := Serial{} > IF ! oSer:Open("COM5",9600,"N",8,1) > ErrorBox{,"Promag:(1) cannot open COM5"}:show() > exit > Endif > > //LOGIN > oSer:Write(CHR(2)) > oSer:Write("L") > oSer:Write("0000") > oSer:Write(CHR(13)) > > dwDummy := Asc(oSer:Read(1)) > if dwDummy==0 > ErrorBox{self,"Login failed"}:show() > exit > endif > > Can anyone see, what I have to do, to initialise the device with VO, > so that the first try with VO also works, without using the demo-app > first? > > Regards > Henk Kortstra. > > 1) First try with VO: > > 0 0.13356838 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 4096 OutSize: 4096 > 2 0.00000268 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:500 RC:1000 WM:0 WC:1000 > 4 0.00000067 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 5 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 7 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 8 0.00000065 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 9 0.00000045 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 10 0.00000038 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 11 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 12 0.05350680 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 13 0.00298947 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 14 0.00297631 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 15 0.00000078 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 > 16 0.00000072 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 17 0.00000064 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 19 0.00000051 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 20 0.05447063 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 1200 > 21 0.00242558 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 22 0.00297565 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 23 0.00398295 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > SUCCESS StopBits: 1 Parity: NONE WordLength: 7 > 24 0.00000114 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 25 0.00696934 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 26 0.00091875 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 27 0.00093789 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L > 28 0.00093976 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 > 29 0.00093980 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 30 1.50002063 Partner.DBG IRP_MJ_READ Serial3 TIMEOUT Length 0: > 31 0.00000414 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 32 0.00270768 Partner.DBG IOCTL_SERIAL_CLR_DTR Serial3 SUCCESS > 33 0.00294357 Partner.DBG IOCTL_SERIAL_CLR_RTS Serial3 SUCCESS > 34 0.00000119 Partner.DBG IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 35 0.00000206 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 36 0.03006611 Partner.DBG IRP_MJ_CLEANUP Serial3 SUCCESS > 37 0.08773053 Partner.DBG IRP_MJ_CLOSE Serial3 SUCCESS > > 2) First try with the demo-app: > > 0 0.13308018 MSR120.exe IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000239 MSR120.exe IRP_MJ_FLUSH_BUFFERS Serial3 SUCCESS > 2 0.00000136 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 3 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 4 0.00000066 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 5 0.00000064 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 6 0.00000068 MSR120.exe IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:0 RC:0 WM:0 WC:0 > 7 0.00000064 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 8 0.00000060 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 9 0.00000057 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 10 0.00000053 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 11 0.00000063 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 12 0.00000058 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 13 0.00000056 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 14 0.00000052 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 15 0.05348187 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 16 0.00257213 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 17 0.00297741 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 18 0.00000075 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 7 > 19 0.00000087 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 20 0.00695588 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 21 0.00000148 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 22 0.00000054 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 23 0.00000051 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 24 0.00000046 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 25 0.05375837 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 26 0.00215867 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 27 0.00297495 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 28 0.00000070 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 7 > 29 0.00000083 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 30 0.00695350 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 31 0.00000078 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 32 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 33 0.00000060 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 34 0.00000057 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 35 0.05416480 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 36 0.00271702 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 37 0.00297862 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 38 0.00398937 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 8 > 39 0.00000124 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 40 0.00695856 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 41 0.00000100 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 42 0.00000066 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 43 0.00000059 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 44 0.00000060 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 45 0.00000102 MSR120.exe IOCTL_SERIAL_SET_WAIT_MASK Serial3 SUCCESS > Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BRK RING > 46 0.00000037 MSR120.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 1024 OutSize: 256 > 47 0.00000103 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT TXCLEAR > 48 0.00000082 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > RXABORT RXCLEAR > 49 0.00000039 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 50 0.00000034 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 51 0.00286683 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 52 0.00297183 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 53 0.00291440 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 54 0.00690560 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 55 0.00298020 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 56 0.00094354 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 57 0.00098412 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 58 0.00096501 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 59 0.00098642 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 60 0.00096843 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 61 0.00098604 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 62 0.00096879 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 63 0.00098561 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 64 0.00096857 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 65 0.00098422 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 66 0.00096828 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 67 0.00098851 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 68 0.00097018 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 69 0.00098516 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 70 0.00096742 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 71 0.00098716 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 72 0.00096774 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 73 0.00098673 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 74 0.00096929 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 75 0.00098290 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 76 0.00096711 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 77 0.00098835 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 78 0.00097126 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 79 0.00098652 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 80 0.00097014 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 81 0.00098546 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 82 0.00096915 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 83 0.00098654 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 84 0.00096919 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 85 0.00098689 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 86 0.00096960 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 87 0.00098720 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 88 0.00097034 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 89 0.00098509 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 90 0.00096888 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 91 0.00098498 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 92 0.00096786 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 93 0.00098678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 94 0.00096822 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 95 0.00098731 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 96 0.00096981 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 97 0.00099082 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 98 0.00097378 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 99 0.00098137 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 100 0.00097086 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 101 0.00097074 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 102 0.00095348 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 103 0.00098126 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 104 0.00096880 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 105 0.00097121 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 106 0.00094678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 107 0.00098237 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 108 0.00096766 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 109 0.00098791 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 110 0.00097027 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 111 0.00098557 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 112 0.00096850 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 113 0.00097090 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 114 0.00094687 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 115 0.00098532 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 116 0.00096972 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 117 0.00098683 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 118 0.00096923 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 119 0.00098165 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 120 0.00097080 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 121 0.04099233 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 122 0.00000153 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 123 0.00000204 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 124 0.00090323 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 125 0.00000107 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 126 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N > 127 0.00088289 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 128 0.00000077 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 129 0.00000124 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 130 0.00095234 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 131 0.00000097 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 132 0.00000127 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 133 0.00087157 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 134 0.00000082 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 135 0.00000126 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 136 0.11098306 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 137 0.00000276 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 138 0.00000202 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 139 0.00062712 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 140 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 141 0.00000138 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N > 142 0.00093919 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 143 0.00000078 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 144 0.00000122 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 145 0.00094818 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 146 0.00000099 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 147 0.00000134 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 148 0.00096052 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 149 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 150 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 151 0.00000000 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 > > 3) Second try with VO, now succesful > > 0 0.13302574 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 4096 OutSize: 4096 > 2 0.00000267 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:500 RC:1000 WM:0 WC:1000 > 4 0.00000076 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 5 0.00000041 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 7 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 8 0.00000066 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 9 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 10 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 11 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 12 0.05460763 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 13 0.00230041 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 14 0.00298118 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 15 0.00000091 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 > 16 0.00000064 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 17 0.00000072 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 19 0.00000060 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 20 0.05416702 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 21 0.00272547 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 22 0.00297768 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 23 0.00398864 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > SUCCESS StopBits: 1 Parity: NONE WordLength: 8 > 24 0.00000109 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 25 0.00696641 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 26 0.00090581 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 27 0.00092436 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L > 28 0.00093736 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 > 29 0.00095309 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 30 0.06796323 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 31 0.00090810 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A > 32 0.00095601 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 33 0.00093294 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 34 0.00095755 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: N > 35 0.00096111 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 36 0.11092513 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 37 0.00088118 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A > 38 0.00092209 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 39 0.00054886 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 40 0.00092590 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 41 0.00093440 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 4 > 42 0.00093624 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 43 0.00093655 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 5 >
From: Karl Faller on 27 Aug 2007 07:15 On Mon, 27 Aug 2007 07:07:06 -0400, "Ginny Caughey" FWIW, some time ago i added your class to my Vo app as well as making a submini <g> Vulcan test app like USING System.IO.Ports //REFERENCES "System.dll" FUNCTION Start() AS VOID LOCAL oPort AS SerialPort oPort:=SerialPort{"COM1", 2400} oPort:Open() oPort:Write("ATDT01019961206") oPort:Write( Environment.NewLine) oPort:Close() RETURN to phone via my ascom phone. Interestingly, both show the same as Henk's experience, either has to run once (doing "nothing") - from then on up to the next cold boot both versions work flawlessly. HAND Karl >Henk, > >It looks to me like you're trying to read from the serial port before there >may be any data to read. You need to wait until there is data and then read >it. Also make sure the device you're sending to is expecting just a carriage >return and not a carriage return/line feed pair.
From: Ginny Caughey on 27 Aug 2007 07:36 Karl, That makes it sound like there is something strange about the device then, although I must say I've encountered a fair number of serial devices that work strangely myself. In particular I've worked with scales that you have to read several "records" before you get anything useful since the first data coming from the scale has garbage data in it. It would be nice to know exactly what is going on with these devices, but I generally take a pragmatic approach to software development and just do what works and move on. ;-) By the way I have a C# app in production for some time now that works with the same serial devices as my VO apps, but since my algorithm for reading from these devices in both cases involves looping for a while until I get something useful, I never noticed that the .NET one behaved the same. -- Ginny "Karl Faller" <k.faller_withoutthat_(a)onlinehome.de> wrote in message news:t8c5d3t50tt9imnohkvfd3916lf37trnds(a)4ax.com... > On Mon, 27 Aug 2007 07:07:06 -0400, "Ginny Caughey" > > FWIW, some time ago i added your class to my Vo app as well as making > a submini <g> Vulcan test app like > USING System.IO.Ports > //REFERENCES "System.dll" > FUNCTION Start() AS VOID > LOCAL oPort AS SerialPort > oPort:=SerialPort{"COM1", 2400} > oPort:Open() > oPort:Write("ATDT01019961206") > oPort:Write( Environment.NewLine) > oPort:Close() > RETURN > > to phone via my ascom phone. > > Interestingly, both show the same as Henk's experience, either has to > run once (doing "nothing") - from then on up to the next cold boot > both versions work flawlessly. > > HAND > Karl > > >>Henk, >> >>It looks to me like you're trying to read from the serial port before >>there >>may be any data to read. You need to wait until there is data and then >>read >>it. Also make sure the device you're sending to is expecting just a >>carriage >>return and not a carriage return/line feed pair.
|
Next
|
Last
Pages: 1 2 3 Prev: New xHarbour Builder demo Next: Error 5333 Using bBrowser and AdoServer |