0

I'm new to pi and Python.

I have pi3 and a meter(Tes-1370),

I want to read the data from meter

and meter read data by RS232

but pi don't have RS232

so , I buy a RS232-USB adapter , USB connect to pi3

and I use Python3 and PySerial to read that

but get some problem this is my code

import serial

port =serial.Serial(

      "/dev/ttyUSB0",
      baudrate=9600,
      parity=serial.PARITY_NONE,
      stopbits=serial.STOPBITS_ONE,
      bytesize=serial.EIGHTBITS,
      writeTimeout = 0,
      timeout = 10)

print(port.isOpen()) 

print("Port opened...")

while True:

     print("inside while")
     response=port.read(8)
     print(response)
     print ("Data Received") 

but it print

b'\x1c\xb7\x04\x88f\x1c\xb7\x04

I don't know what it is

can anyone help me??

  • I see you have posted the same/similar question you had asked just a day earlier. I had indicated in my comment on that question, that the protocol appears to documented only within the contents of the CD rom and doesnt appear to not publicly available despite my google-foo. If you could share the contents or details on the CD, you might find more assistance from more folks here. Any case you don't have a CD with you, you'll probably need to reach out to the manufacturer to get a copy. – Shreyas Murali Sep 30 '16 at 5:42
  • appreciate for your answer!! and this is protocol in the CD!! protocol – uhong lin Sep 30 '16 at 14:24
1

You need to read the attached CD-ROM.

From the linked PDF.

VIII. RS-232 INTERFACE, SOFTWARE INSTALLATION and OPERATION

For the detailed instruction, please refer to the content of attached CD-ROM, which has the complete instruction of RS-232 interface, software operation and relevant information.

RS-232 protocol : are enclosed within the content of CD-ROM, please open the CD-ROM for details.

  • thank you for your answer!! I found the CD and I put on this protocol – uhong lin Sep 30 '16 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.