Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decoding a serial port....

Status
Not open for further replies.

iondy

Programmer
Feb 10, 2004
10
GB
Now first I apologise if this post is not relevant to this group, but I couldn't find a topic it fitted in, and as I will be doing it in java, thought i'd post it here. If there is one better suited, please point me in the right direction. :)

I have a device from 1987 (a Q-Zar lasertag system for which their is no longer any accessible documentation) and the original DOS based system that ran in. It connects via the serial port (not parallel port as I was originally told). Basically, I need to decode the command set it works on so I can write a new control program.

Now, how would I go about this? Would it be possible to splice into the serial cable another cable end which would connect to PC running a serial port listener that would just print on screen everything passed down the link? Then just run the original control program and make a note of what is sent/received?

From what i can work out, it doesnt hold a conversation as such, it just sends a command i.e. start game. If it doesnt work, the program doesnt care and just carries on as if it had, so it seems that no ack is sent back.

Ta! :)
 
Yes, I've done something similar. I had a conveyor belt in a warehouse controlled by commands via a serial cable. To program for it back at my desk, I set up a second pc and connected it to my main pc via a serial cable. Then I wrote a java program to pretend to be the conveyor system, accepting commands and sending replies.

You can use the java Comm API to read the serial port. Be sure to use a null modem serial cable (not a "straight through" one), so that the transmit pin on the sending PC is going into the receive pin on the other one.
 
I believe you should read a serial port monitor, you can find a lot of them on the internet

Ion Filipski
1c.bmp
 
Thanks idarke. That pretty much along the lines of what I am doing. :)

And thanks IonFilipski, I downloaded one of said programs and am now receiving the 'commands sent'.

I have one problem now tho, using the serial monitor program I have found out what the baud rate is and how many data bits (fiddled until I received meaningful characters and no errors), but using a java program I have written, I set the Baud and Data Bits to the same, but all I receive is random characters. Any idea on this?

Thanks. :)
 
sorry, hadn't written the program to convert it into Hex properly. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top