The RXTXcomm.jar is a library to connect to a serial device. I've tested several libs and I have used rxtx-2.2pre2-bins in the end.
The problem is open and my study has failed because I have got some annoyances. My protocol only knows two methods: to locate a piece to a square on the board and to remove a piece from the board. Always if my model does not match the board representation I request the board description. But that fails already for initialization and I have delayed the project.
I have added the rxtx-2.2pre2.jar to the dependencies of the pom.xml. But there are compile errors in the class chess383\gui\swing\test\ModelJUnitTest.java at folder chess383\src\main\java.
I am working at windows 32bit jdk1.7 eclipse3.7 and maven3.0.4 maybe it will be run at your system? Please check it - tx
Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You have already mentioned the scope of JUnit is too restrictive.
I have removed the scope line for JUnit in the dependencies of poml.xml and "mvn test" is now running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do it!
The RXTXcomm.jar is a library to connect to a serial device. I've tested several libs and I have used rxtx-2.2pre2-bins in the end.
The problem is open and my study has failed because I have got some annoyances. My protocol only knows two methods: to locate a piece to a square on the board and to remove a piece from the board. Always if my model does not match the board representation I request the board description. But that fails already for initialization and I have delayed the project.
For example the output to clearify the problem for DGTRunner:
Program started
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB0
BaudRate: 9600
DataBits: 8
FlowControlMode: 0
Parity: 0
StopBits: 1
incoming bytes are [ -122 0 ]
incoming bytes are [ 67 ]
incoming bytes are [ 2 ]
incoming bytes are [ 3 4 5 6 4 3 2 1 1 1 1 1 1 1 1 0 0 0 0 ]
incoming bytes are [ 0 ]
incoming bytes are [ 0 ]
incoming bytes are [ 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 ]
incoming bytes are [ 0 0 0 0 0 7 7 7 7 7 7 7 7 8 9 10 11 12 10 9 ]
incoming bytes are [ 8 ]
message buffer [ 2 3 4 5 6 4 3 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 7 7 7 7 7 7 7 8 9 10 11 12 10 9 8 ]
current read buffer [ -122 0 67 2 3 4 5 6 4 3 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 7 7 7 7 7 7 7 8 9 10 11 12 10 9 8 ]
aligned read buffer [ ]
handleBoardDumpEvent() [ 2 3 4 5 6 4 3 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 7 7 7 7 7 7 7 8 9 10 11 12 10 9 8 ]
Dumped board position: rnbqkbnr/pppppppp/8/8/P7/8/PPPPPPPP/RNBQKBNR
21.01.2013 22:28:30 chess383.chess.hardware.dgt.DGTConnection getPosition
INFO: getPosition() = rnbqkbnr/pppppppp/8/8/P7/8/PPPPPPPP/RNBQKBNR
21.01.2013 22:28:30 chess383.chess.hardware.dgt.DGTConnection init
INFO: Expected position: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 0
21.01.2013 22:28:30 chess383.chess.hardware.dgt.DGTConnection init
INFO: Delivered position by hardware: rnbqkbnr/pppppppp/8/8/P7/8/PPPPPPPP/RNBQKBNR
...
I have added the rxtx-2.2pre2.jar to the dependencies of the pom.xml. But there are compile errors in the class chess383\gui\swing\test\ModelJUnitTest.java at folder chess383\src\main\java.
I am working at windows 32bit jdk1.7 eclipse3.7 and maven3.0.4 maybe it will be run at your system? Please check it - tx
Thomas
You have already mentioned the scope of JUnit is too restrictive.
I have removed the scope line for JUnit in the dependencies of poml.xml and "mvn test" is now running.
I have fixed it.