Communication problem between javacs and Basic Stamp(sx) via RS232
J.We
Posts: 15
I am trying to send commands from a java program (using javacs.comm, java extension communications) to my BSsx. The bauds are off course set to the same on both side. 8-bits, no parity, 9600 b-rate and so on. I have also tried on slower baud rates..
·
The BSsx is programmed only to listen to the SERIN and GOSUB (drive a stepper motor via Little Step U), when receiving any data (one byte).
The java-program is programmed to locate the COM1, open it, and send one byte data, hold the port open five seconds, and then close the port.
·
The BSsx program work fine when using a terminal–program (RealTerm), but not with the java-program, and the java program work fine separate to.
·
Why is my system not working?
·
Please see attached files, TestMain.java , SerialIO.java (java-files) and TestMain.bsx (basic stamp-file).
·
Please, if anyone have done anything like this, please give me some advise! If anyone have any type of suggestion on haw to move on, don’t hesitate to reply this.
·
Regards//jw
·
The BSsx is programmed only to listen to the SERIN and GOSUB (drive a stepper motor via Little Step U), when receiving any data (one byte).
The java-program is programmed to locate the COM1, open it, and send one byte data, hold the port open five seconds, and then close the port.
·
The BSsx program work fine when using a terminal–program (RealTerm), but not with the java-program, and the java program work fine separate to.
·
Why is my system not working?
·
Please see attached files, TestMain.java , SerialIO.java (java-files) and TestMain.bsx (basic stamp-file).
·
Please, if anyone have done anything like this, please give me some advise! If anyone have any type of suggestion on haw to move on, don’t hesitate to reply this.
·
Regards//jw
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I don't know if Java gives you the option of opening the port without letting the DTR line transition.