Try Minicom first and see what your serial port returns. Install it with sudo apt-get install minicom
You start it as follows (for ttyS0):
sudo minicom -D /dev/ttyS0
You can set the communication parameters from within Minicom (using ctrl-A P
), so you're sure that they are correct.
If your device uses a specific protocol, it might need a command to start its communication. So have a look at the user manual.
Maybe your device is set up to use hardware handshaking. If possible, turn it off (at least to start with).
If you can't turn it off, then you will have to set that up as well on your side. In Minicom this is under ctrl-A O
and then serial port setup
.
I've used Minicom often to debug serial communications and I find it works best.
I've received some more information from the OP:
The laboratory instrument(Cobas C311) uses ASTM protocol. There in the interface, we just need to click "Send to Host" and it sends a bunch of ASTM records. I just need to receive them in a file. Is there any other setting? What is the command to start acquiring data?...and how to save the data in a file?
Chosen the right paramters. Minicom is showing 9600 8N2. Hope it's alright. But receiving nothing - not a single bit. The analyser says, "The instrument transmitted ENQ as a send request,but the Host did not return ACK or NAK within 15 seconds.(Link Timeout)"
The device uses the ASTM Protocol. The device sends the <ENQ>
character as a signal that it is ready to start sending data.
This is not something you will be able to receive using minicom
or any other terminal program. You will need proper application software that supports this protocol.
You definitely have to read your user manual and check the installation disk (if any) and the manufacturer's website for an application that supports this protocol.
I would be surprised if they don't have application support for this device. If they offer something it is likely to be a Windows application or some example code plus a library.
It is possible to write something yourself, but it won't be easy. There is some Python support for ASTM and there is a Perl script that you could try.
SO also has a post with some information about ASTM..