0

I have an infrared thermometer which operates on a virtual serial port over USB, which I am trying to use on a Linux intel and next on a raspberry Pi. The system did not enumerate a /dev/ttyUSB device.

I found a piece of a solution here :

Cygnal Integrated Products serial port on Linux

I reprogrammed the product_ID and can now see it as /dev/ttyUSB0.

But trying to talk to the thermometer with minicom doesn't work. minicom keeps saying "disconnected" despite the "9600 8N1" indication.

I must say, I had many attempt to work with this kind of communication over USB/serial adapter trying using many different terminal emulator like screen or minicom but without any success at all !

I'm not even sure about the right way to send request and receive data.

Here is the documentation I'm using trying to talk to the thermometer :

http://www.optris.com/interfaces?file=tl_files/downloads/Manuals/addendums-de-en/ct-ctlaser-commands.pdf

Edit : I'm now trying to use PySerial Python library in a Python script with an Arduino as a target (to act as my thermometer, the arduino runs a simple code that takes the data received and send them back to my Python console.) But still, there is so many confusion possible between ASCII, Hexa, binary, that I'm not capable of debugging anything as I don't know where the transformation between different format takes place ! The communication is working as I can get some data forth and back from my Python console through the Arduino. But I can't get sending hexadecimal data and getting any response back in hexadecimal format. + You say "Your latest question puts you in the off-topic category. ", what do you mean ? Sorry of being so confused.

harold
  • 307
  • 1
  • 2
  • 9
  • A 3-wire serial connection has no concept of *"disconnected"*. According to the user manual, flow control is off or none. The data transfer is **binary**, so you cannot use minicom. – sawdust Jun 01 '17 at 05:38
  • Ok, but is there something I could use to communicate to my device ? I'm struggling with this for so long ! – harold Jun 01 '17 at 11:57
  • For the read commands that don't require a checksum, you could generate them from the keyboard: https://stackoverflow.com/questions/44227157/how-to-build-a-serial-rs422-or-rs232-message-to-communicate-with-sick-lms200-v/44234208#44234208. But for the commands that do have a checksum, a program would be convenient to calculate it. Then there's the issue of viewing the received binary data; if it's not a printable ASCII code, then you see nothing. Your latest question puts you in the off-topic category. – sawdust Jun 01 '17 at 23:12
  • The received binary data are supposed to be hexadecimal response, (1 or 2 bytes). I guess, it should be printable as ASCII character. Am I wrong ? – harold Jun 02 '17 at 09:01
  • @sawdust. Sorry for the late edit. – harold Jun 02 '17 at 09:28
  • Yes, you are wrong. The majority of the 256 binary values of a byte are not printable ASCII characters. There's also the extended ASCII characters, but not all terminals will display them. Regardless, you would have try to convert each displayed char to a byte value, tedious work. You're off topic, because you're asking for a software/program recommendation, e.g. a serial port monitor program that can let you enter hex values instead of ASCII text for input chars, and displays received data in hex values rather than ASCII text. – sawdust Jun 02 '17 at 22:18
  • *"I don't know where the transformation between different format takes place"* -- There typically is no *"transformation"*, because typically it's merely a matter of interpretation. A byte value can be written a as binary/hex or even decimal number, and represent/interpreted as a number, an ASCII code, part of a larger number (integer, fixed-point, floating-point), or part of a machine instruction. That's the foundation of digital computers: everything can be represented by numbers. – sawdust Jun 02 '17 at 22:28
  • Ok for being wrong about the 256 of extended ASCII "characters ! – harold Jun 06 '17 at 07:57
  • Ok for being wrong about the 256 of extended ASCII "characters" which aren't all printable ! But my thermometer, as the documentation states, only communicate with printable character I think. I send 1, 2, 3 or 4 bytes of Alphabetical /numbers (1, 2, 3 or 4 set of 2 printable characters) and I'm supposed to receive 1, 2 or 3 bytes (1, 2 or 3 set of 2 printable characters). I think they made the "code" to be communicated only using printable characters ! – harold Jun 06 '17 at 08:11
  • Mmmm ! I think I'm still wrong ! – harold Jun 06 '17 at 12:15

0 Answers0