Python Forum
Python 3 Serial communication need help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python 3 Serial communication need help
#1
I am develop a data logger in raspberry pi. I want to fetch data from a temperature controller. Previously i develop a data logger application using vb.net and its currently working. We want to send the data in the format chr(12) + chr(3) + chr(0) + chr(0) + chr(0)+ chr(2) + CRC(chr(12) + chr(3) + chr(0) + chr(0) + chr(0)+ chr(2)). In phyton3 i easily create the CRC and the result is converted in to char and send the 8 characters. In phyton3 we cant able to send the unicode so we want to encode it. If encode in phyton3 the crc chr created are 191, 163 so in phyton3 its split in to two characters for each chr. So total chractor send is 10. If we decode in phyton3 the output is correct. But the instrument never respond for that command. If i create a byte array with the crc with 8 charactor the instrument reply correctly. When go through articles in phyton3 if the char greater then 127 while encode phyton automatically split in to two charactor. Need help in this. Thanks in Advance.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Server/client basic communication ebolisa 0 2,009 Sep-30-2021, 12:22 PM
Last Post: ebolisa
  Serial toggles serial, but no data Saltwater 2 2,557 Sep-08-2019, 12:20 PM
Last Post: Saltwater
  Serial communication Isabelle94 3 3,455 Sep-28-2018, 10:23 AM
Last Post: Larz60+
  python socketio-client-2 and nod js socketio server communication is not success vmyadhu2 2 6,640 Oct-02-2017, 04:22 AM
Last Post: vmyadhu2

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020