I have an instrument(machine) and it communicates with a software using the 9 pin RS232 connector through the COM port in the system. I wanted to know what commands are sent from the software to establish communication with the instrument. Is it possible?
I am quite new to the world of firmware and serial communication so please bare with me. I used serial monitor software to witness what kind of data are transferred in between the two system. It resulted with bunch of ASCII and HEX values. How do I decode this?
What I want to replicate is that, I can connect to the instrument using their software. But, I wanted to establish the same communication using any serial monitor (say Putty). Here I wanted to know what commands are sent to the instrument to establish communication.
That's a sensible approach. Some software also allows monitoring the state of the flow control pins (CTS, DTR etc.) Take note of the use of those as they may be necessary in trying to communicate with the device with your custom tools.
You correlate the values with the actions and readings of the instrument. You're likely seeing a combination of commands, identifiers and measurement values. By systematically testing specific scenarios and looking for similarities in the data you receive, you may be able to figure out what everything means.
Thank you for your response. Yes, I am looking for some similarities in the data, but to make it worse, every time I perform the simple operation with the software (which is establishing connection to the instrument), I get different ASCII and HEX values. However, there are few similar values which I am looking closely to find something.
It is an instrument that is used to perform flash test for the Lamps.
One of the challenges is that you want to see both sides of the conversation, that is, both what is being sent by the instrument controller and what is sent back by the instrument. One way to approach this is to configure a PC with two serial ports, two instantiations of serial terminal software one per port, and record the data exchange with timestamps to enable merging the command/response activity in time order. If it's a non-trivial amount of data, I'd consider writing utility software to attach ports and log both send and receive channels.
Once you have reliably captured the data exchange there remains the issue of figuring out what it all means, but this is dependent upon first getting coherent data exchanges to analyze.
If you have samples of data that you've captured, it might be helpful to post snippets so we can see what you've got thus far.
Absolutely critical. But equally so is to know the exact response for each individual message.
From 1981-1986, I was a data communications consultant to the banking industry doing exactly that thing in order to duplicate the communications to various bank teller terminals, ATMs and ATM networks. I used a very expensive data recorder using a tape cartridge. It showed both sides of the transmission in normal video and the response in reverse video.
That way I could write code to duplicate what was being sent and received by the bank's machines. That information allowed me to design and program a front-end processor for a Data General mini computer that was intended to do all the bank data processing.
Critical to the OP success is knowing in detail the documentation for BOTH ends of the communications.
Hello guys, Thanks for your support. I was able to decode the commands that are sent and received. Initially, I used serial monitor to watch the data that are been written and read. Then with the help of the user manual, I was able to crack down the commands. Now, I am able to send data to the instrument that helps in establishing the commands. So, the data are dealt with ASCII format. But, now I am facing an another problem where I am not able to read and print the response data. Say, if I am sending something like "Hello", the machine responds (I could see this in serial monitor) but I am not able to read and print the response in my software. I am using C# with .NET framework.
Would be helpful, If someone could help me with this? Let me know, if you need any snippets, I could share that.