[purejavacomm] PureJavaComm no response received after error 997

  • From: ant elder <ant.elder@xxxxxxxxx>
  • To: purejavacomm@xxxxxxxxxxxxx
  • Date: Fri, 23 May 2014 10:57:16 +0100

I've been using PureJavaComm 0.0.21 for a while now and its working really
well talking to lots of different types of Arduino and compatible mcu's, so
thank you for it.

I've just got a new device today (
http://www.dfrobot.com/wiki/index.php/Bluno_SKU:DFR0267) and this one does
not work. It is working ok talking to other Windows Terminal programs and
with the Arduino serial monitor which use RXTX, so the board itself seems
to be working ok.

I've a debug log from PureJavaComm which i've attached here. I don't
completely understand all the debug output but i do see there is an error
997 which sounds suspicious. Does this indicate anything to you?

Thanks for any help.

   ...ant

log: 705295,class jtermios.windows.JTermiosImpl line 264, thread id 1,
main, instantiating jtermios.windows.JTermiosImpl
log: 705829,class jtermios.windows.WinAPI line 763, thread id 1, main, >
QueryDosDeviceW(null,[C@a894af68,16384)
log: 705833,class jtermios.windows.WinAPI line 765, thread id 1, main, <
QueryDosDeviceW(null,[C@a894af68,16384) => 14155
log: 705843,class jtermios.JTermios line 390, thread id 1, main, >
open('COM15',00020006)
log: 705856,class jtermios.windows.WinAPI line 533, thread id 1, main, >
CreateFileW(\\.\COM15, 0xC0000000, 0x00000000, null, 0x00000003,
0x40000000,null)
log: 705859,class jtermios.windows.WinAPI line 535, thread id 1, main, <
CreateFileW(\\.\COM15, 0xC0000000, 0x00000000, null, 0x00000003,
0x40000000,null) => native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8)
log: 705860,class jtermios.windows.WinAPI line 642, thread id 1, main, >
SetCommTimeouts(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), 2048,
2048)
log: 705862,class jtermios.windows.WinAPI line 644, thread id 1, main, <
SetCommTimeouts(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), 2048,
2048) => true
log: 705863,class jtermios.windows.WinAPI line 621, thread id 1, main, >
GetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate 0
fFlags 0000 wReserved 0 XonLim 0 XoffLim 0 ByteSize 0 Parity 0 StopBits 0
XonChar 00 XoffChar 00 ErrorChar 00 EofChar 00 EvtChar 00 wReserved1 0])
log: 705869,class jtermios.windows.WinAPI line 623, thread id 1, main, <
GetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
1000000 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 11 XoffChar 13 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0]) => true
log: 705872,class jtermios.windows.WinAPI line 628, thread id 1, main, >
SetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 00 XoffChar 00 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0])
log: 705878,class jtermios.windows.WinAPI line 630, thread id 1, main, <
SetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 00 XoffChar 00 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0]) => true
log: 705879,class jtermios.windows.WinAPI line 635, thread id 1, main, >
SetCommTimeouts(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8),
[ReadIntervalTimeout -1 ReadTotalTimeoutMultiplier 0
ReadTotalTimeoutConstant 0 WriteTotalTimeoutMultiplier 0
WriteTotalTimeoutConstant 0])
log: 705880,class jtermios.windows.WinAPI line 637, thread id 1, main, <
SetCommTimeouts(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8),
[ReadIntervalTimeout -1 ReadTotalTimeoutMultiplier 0
ReadTotalTimeoutConstant 0 WriteTotalTimeoutMultiplier 0
WriteTotalTimeoutConstant 0]) => true
log: 705881,class jtermios.windows.JTermiosImpl line 752, thread id 1,
main, vmin 0 vtime 0 ReadIntervalTimeout -1 ReadTotalTimeoutConstant 0
ReadTotalTimeoutMultiplier 0
log: 705882,class jtermios.windows.WinAPI line 684, thread id 1, main, >
CreateEventA(null, false, false, null)
log: 705883,class jtermios.windows.WinAPI line 686, thread id 1, main, <
CreateEventA(null, false, false, null) =>
native@0x5ac(jtermios.windows.WinAPI$HANDLE@5ac
)
log: 705884,class jtermios.windows.WinAPI line 684, thread id 1, main, >
CreateEventA(null, true, false, null)
log: 705884,class jtermios.windows.WinAPI line 686, thread id 1, main, <
CreateEventA(null, true, false, null) =>
native@0x5b0(jtermios.windows.WinAPI$HANDLE@5b0
)
log: 705885,class jtermios.windows.WinAPI line 684, thread id 1, main, >
CreateEventA(null, true, false, null)
log: 705885,class jtermios.windows.WinAPI line 686, thread id 1, main, <
CreateEventA(null, true, false, null) =>
native@0x5b4(jtermios.windows.WinAPI$HANDLE@5b4
)
log: 705886,class jtermios.windows.WinAPI line 684, thread id 1, main, >
CreateEventA(null, true, false, null)
log: 705887,class jtermios.windows.WinAPI line 686, thread id 1, main, <
CreateEventA(null, true, false, null) =>
native@0x5b8(jtermios.windows.WinAPI$HANDLE@5b8
)
log: 705888,class jtermios.windows.WinAPI line 684, thread id 1, main, >
CreateEventA(null, true, false, null)
log: 705889,class jtermios.windows.WinAPI line 686, thread id 1, main, <
CreateEventA(null, true, false, null) =>
native@0x5bc(jtermios.windows.WinAPI$HANDLE@5bc
)
log: 705889,class jtermios.windows.WinAPI line 684, thread id 1, main, >
CreateEventA(null, true, false, null)
log: 705890,class jtermios.windows.WinAPI line 686, thread id 1, main, <
CreateEventA(null, true, false, null) =>
native@0x5c0(jtermios.windows.WinAPI$HANDLE@5c0
)
log: 705891,class jtermios.JTermios line 392, thread id 1, main, <
open('COM15',00020006) => 0
log: 705892,class jtermios.JTermios line 307, thread id 1, main, > fcntl(0,
3, 0)
log: 705893,class jtermios.JTermios line 309, thread id 1, main, < fcntl(0,
3, 0) => 131078
log: 705893,class jtermios.JTermios line 307, thread id 1, main, > fcntl(0,
4, 131074)
log: 705894,class jtermios.JTermios line 309, thread id 1, main, < fcntl(0,
4, 131074) => 0
log: 705895,class jtermios.JTermios line 369, thread id 1, main, >
tcgetattr(0,jtermios.Termios@a1323da0)
log: 705895,class jtermios.JTermios line 371, thread id 1, main, <
tcgetattr(0,jtermios.Termios@d0c82aa0) => 0
log: 705896,class jtermios.JTermios line 363, thread id 1, main, >
cfmakeraw(0,jtermios.Termios@d0c82aa0)
log: 705897,class jtermios.JTermios line 365, thread id 1, main, <
cfmakeraw(0,jtermios.Termios@d0c82aa0)
log: 705897,class jtermios.JTermios line 376, thread id 1, main, >
tcsetattr(0,0,jtermios.Termios@975081c2)
log: 705898,class jtermios.windows.WinAPI line 621, thread id 1, main, >
GetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 00 XoffChar 00 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0])
log: 705901,class jtermios.windows.WinAPI line 623, thread id 1, main, <
GetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 00 XoffChar 00 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0]) => true
log: 705902,class jtermios.windows.WinAPI line 628, thread id 1, main, >
SetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 11 XoffChar 13 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0])
log: 705908,class jtermios.windows.WinAPI line 630, thread id 1, main, <
SetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 11 XoffChar 13 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0]) => true
log: 705909,class jtermios.JTermios line 378, thread id 1, main, <
tcsetattr(0,0,jtermios.Termios@975081c2) => 0
log: 705910,class jtermios.JTermios line 342, thread id 1, main, >
setspeed(0,jtermios.Termios@975081c2,9600)
log: 705911,class jtermios.JTermios line 344, thread id 1, main, <
setspeed(0,jtermios.Termios@975081c2,9600) => 0
log: 705912,class jtermios.JTermios line 376, thread id 1, main, >
tcsetattr(0,0,jtermios.Termios@975081c2)
log: 705913,class jtermios.JTermios line 378, thread id 1, main, <
tcsetattr(0,0,jtermios.Termios@975081c2) => 0
log: 705914,class jtermios.JTermios line 376, thread id 1, main, >
tcsetattr(0,0,jtermios.Termios@975081c2)
log: 705914,class jtermios.JTermios line 378, thread id 1, main, <
tcsetattr(0,0,jtermios.Termios@975081c2) => 0
log: 705915,class jtermios.JTermios line 418, thread id 1, main, >
ioctl(0,1074033770,[00000000])
log: 705916,class jtermios.windows.WinAPI line 663, thread id 1, main, >
GetCommModemStatus(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8
),0x00000000)
log: 705917,class jtermios.windows.WinAPI line 665, thread id 1, main, <
GetCommModemStatus(native@0x5a8
(jtermios.windows.WinAPI$HANDLE@5a8),0x00000000)
=> true
log: 705918,class jtermios.JTermios line 420, thread id 1, main, <
ioctl(0,1074033770,[00000000]) => 0
log: 705919,class jtermios.JTermios line 459, thread id 1, main, >
pipe([2,0,0])
log: 705919,class jtermios.JTermios line 461, thread id 1, main, <
pipe([2,0,0]) => -1
log: 705921,class jtermios.JTermios line 342, thread id 1, main, >
setspeed(0,jtermios.Termios@975081c2,1000000)
log: 705922,class jtermios.windows.WinAPI line 621, thread id 1, main, >
GetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 11 XoffChar 13 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0])
log: 705925,class jtermios.windows.WinAPI line 623, thread id 1, main, <
GetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
9600 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 11 XoffChar 13 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0]) => true
log: 705926,class jtermios.windows.WinAPI line 628, thread id 1, main, >
SetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
1000000 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 11 XoffChar 13 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0])
log: 705932,class jtermios.windows.WinAPI line 630, thread id 1, main, <
SetCommState(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [BaudRate
1000000 fFlags 0001 wReserved 0 XonLim 0 XoffLim 0 ByteSize 8 Parity 0
StopBits 0 XonChar 11 XoffChar 13 ErrorChar 00 EofChar 00 EvtChar 0A
wReserved1 0]) => true
log: 705933,class jtermios.JTermios line 344, thread id 1, main, <
setspeed(0,jtermios.Termios@760249c2,1000000) => 0
log: 705934,class jtermios.JTermios line 376, thread id 1, main, >
tcsetattr(0,0,jtermios.Termios@760249c2)
log: 705934,class jtermios.JTermios line 378, thread id 1, main, <
tcsetattr(0,0,jtermios.Termios@760249c2) => 0
log: 705935,class jtermios.JTermios line 418, thread id 1, main, >
ioctl(0,1074033770,[00000000])
log: 705936,class jtermios.windows.WinAPI line 663, thread id 1, main, >
GetCommModemStatus(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8
),0x00000000)
log: 705937,class jtermios.windows.WinAPI line 665, thread id 1, main, <
GetCommModemStatus(native@0x5a8
(jtermios.windows.WinAPI$HANDLE@5a8),0x00000000)
=> true
log: 705937,class jtermios.JTermios line 420, thread id 1, main, <
ioctl(0,1074033770,[00000000]) => 0
log: 705938,class jtermios.JTermios line 418, thread id 1, main, >
ioctl(0,-2147191699,[00000002])
log: 705939,class jtermios.windows.WinAPI line 670, thread id 1, main, >
EscapeCommFunction(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8
),0x00000005)
log: 705940,class jtermios.windows.WinAPI line 672, thread id 1, main, <
EscapeCommFunction(native@0x5a8
(jtermios.windows.WinAPI$HANDLE@5a8),0x00000005)
=> true
log: 705941,class jtermios.windows.WinAPI line 670, thread id 1, main, >
EscapeCommFunction(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8
),0x00000004)
log: 705941,class jtermios.windows.WinAPI line 672, thread id 1, main, <
EscapeCommFunction(native@0x5a8
(jtermios.windows.WinAPI$HANDLE@5a8),0x00000004)
=> true
log: 705942,class jtermios.JTermios line 420, thread id 1, main, <
ioctl(0,-2147191699,[00000002]) => 0
cmd: 1,16

log: 705945,class jtermios.JTermios line 376, thread id 26, Thread-6, >
tcsetattr(0,0,jtermios.Termios@6a4bbae1)
log: 705946,class jtermios.windows.WinAPI line 635, thread id 26, Thread-6,
> SetCommTimeouts(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8),
[ReadIntervalTimeout 0 ReadTotalTimeoutMultiplier 0
ReadTotalTimeoutConstant 0 WriteTotalTimeoutMultiplier 0
WriteTotalTimeoutConstant 0])
log: 705947,class jtermios.JTermios line 404, thread id 1, main, >
write(0,[8192,0x31,0x2C,0x31,0x36,0x0A,0x00,0x00,0x00...],5)
log: 705947,class jtermios.windows.WinAPI line 637, thread id 26, Thread-6,
< SetCommTimeouts(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8),
[ReadIntervalTimeout 0 ReadTotalTimeoutMultiplier 0
ReadTotalTimeoutConstant 0 WriteTotalTimeoutMultiplier 0
WriteTotalTimeoutConstant 0]) => true
log: 705948,class jtermios.windows.WinAPI line 698, thread id 1, main, >
ResetEvent(native@0x5bc (jtermios.windows.WinAPI$HANDLE@5bc))
log: 705949,class jtermios.windows.JTermiosImpl line 752, thread id 26,
Thread-6, vmin 1 vtime 0 ReadIntervalTimeout 0 ReadTotalTimeoutConstant 0
ReadTotalTimeoutMultiplier 0
log: 705950,class jtermios.windows.WinAPI line 700, thread id 1, main, <
ResetEvent(native@0x5bc (jtermios.windows.WinAPI$HANDLE@5bc)) => true
log: 705950,class jtermios.JTermios line 378, thread id 26, Thread-6, <
tcsetattr(0,0,jtermios.Termios@6a4bbae1) => 0
log: 705951,class jtermios.windows.WinAPI line 549, thread id 1, main, >
WriteFile(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8),
[5,0x31,0x2C,0x31,0x36,0x0A], 5, [0], auto-allocated@0x647a20 (32 bytes))
log: 705952,class jtermios.JTermios line 438, thread id 26, Thread-6, >
select(1,[0],[],[],jtermios.TimeVal@8a7fa8b9)
log: 705952,class jtermios.windows.WinAPI line 600, thread id 26, Thread-6,
> ClearCommError(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [0],
[fFlags 0000 cbInQue 0 cbInQue 0])
log: 705953,class jtermios.windows.WinAPI line 551, thread id 1, main, <
WriteFile(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8),
[5,0x31,0x2C,0x31,0x36,0x0A], 5, [0], auto-allocated@0x647a20 (32 bytes))
=> false
log: 705954,class jtermios.windows.WinAPI line 602, thread id 26, Thread-6,
< ClearCommError(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [0],
[fFlags 0000 cbInQue 0 cbInQue 0]) => true
log: 705955,class jtermios.windows.WinAPI line 740, thread id 1, main, >
GetLastError()
log: 705956,class jtermios.windows.WinAPI line 698, thread id 26, Thread-6,
> ResetEvent(native@0x5c0 (jtermios.windows.WinAPI$HANDLE@5c0))
log: 705956,class jtermios.windows.WinAPI line 742, thread id 1, main, <
GetLastError() => 997
log: 705957,class jtermios.windows.WinAPI line 700, thread id 26, Thread-6,
< ResetEvent(native@0x5c0 (jtermios.windows.WinAPI$HANDLE@5c0)) => true
log: 705958,class jtermios.JTermios line 406, thread id 1, main, <
write(0,[8192,0x31,0x2C,0x31,0x36,0x0A,0x00,0x00,0x00...],5) => 5
log: 705958,class jtermios.windows.WinAPI line 607, thread id 26, Thread-6,
> SetCommMask(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), 0x00000001)
log: 705959,class jtermios.JTermios line 356, thread id 1, main, >
tcdrain(0)
log: 705960,class jtermios.windows.WinAPI line 609, thread id 26, Thread-6,
< SetCommMask(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8),
0x00000001) => true
log: 705960,class jtermios.windows.WinAPI line 572, thread id 1, main, >
FlushFileBuffers(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8))
log: 705961,class jtermios.windows.WinAPI line 705, thread id 26, Thread-6,
> WaitCommEvent(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [0],
auto-allocated@0x647a50 (32 bytes))
log: 705961,class jtermios.windows.WinAPI line 574, thread id 1, main, <
FlushFileBuffers(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8)) => true
log: 705962,class jtermios.windows.WinAPI line 707, thread id 26, Thread-6,
< WaitCommEvent(native@0x5a8 (jtermios.windows.WinAPI$HANDLE@5a8), [0],
auto-allocated@0x647a50 (32 bytes)) => false
log: 705963,class jtermios.JTermios line 358, thread id 1, main, <
tcdrain(0) => 0
log: 705964,class jtermios.windows.WinAPI line 740, thread id 26, Thread-6,
> GetLastError()
log: 705964,class jtermios.windows.WinAPI line 742, thread id 26, Thread-6,
< GetLastError() => 997
log: 705965,class jtermios.windows.WinAPI line 726, thread id 26, Thread-6,
> WaitForMultipleObjects(2, [2,native@0x5c0(jtermios.windows.WinAPI$HANDLE@5c0
),native@0x5ac (jtermios.windows.WinAPI$HANDLE@5ac)], false, 2147483647)

Other related posts: