Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decoding a serial stream
#5
You do not decode the "hexlify", you decode the original bytearray. You also need to specify which encoding was used. The default for .decode is utf-8.

What you really need is a knowledge of what was sent. Is it 20 bytes? Five 32 bit numbers? A Unicode string, and if so, what encoding was used?
Reply


Messages In This Thread
Decoding a serial stream - by AKGentile1963 - Mar-20-2021, 03:04 PM
RE: Decoding a serial stream - by deanhystad - Mar-20-2021, 03:31 PM
RE: Decoding a serial stream - by AKGentile1963 - Mar-20-2021, 04:30 PM
RE: Decoding a serial stream - by AKGentile1963 - Mar-20-2021, 04:33 PM
RE: Decoding a serial stream - by deanhystad - Mar-20-2021, 05:15 PM
RE: Decoding a serial stream - by AKGentile1963 - Mar-20-2021, 06:30 PM
RE: Decoding a serial stream - by bowlofred - Mar-20-2021, 07:08 PM
RE: Decoding a serial stream - by deanhystad - Mar-20-2021, 08:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pyserial/serial "has no attribute 'Serial' " gowb0w 11 21,871 Sep-27-2024, 12:18 PM
Last Post: NigelHalse
  Decoding lat/long in file name johnmcd 4 1,533 Mar-22-2024, 11:51 AM
Last Post: johnmcd
  Enigma Decoding Problem krisarmstrong 4 2,137 Dec-14-2023, 10:42 AM
Last Post: Larz60+
  EEG stream data with mne and brainfolw PaulC 0 988 Aug-22-2023, 03:17 AM
Last Post: PaulC
  json decoding error deneme2 10 8,110 Mar-22-2023, 10:44 PM
Last Post: deanhystad
  flask app decoding problem mesbah 0 3,201 Aug-01-2021, 08:32 PM
Last Post: mesbah
  Microphone stream manipulation Talking2442 0 3,820 Jan-07-2021, 07:36 PM
Last Post: Talking2442
  Best Video Quality And Stream Harshil 2 3,076 Aug-19-2020, 09:03 AM
Last Post: Harshil
  xml decoding failure(bs4) roughstroke 1 3,010 May-09-2020, 04:37 PM
Last Post: snippsat
  python3 decoding problem but python2 OK mesbah 0 2,305 Nov-30-2019, 04:42 PM
Last Post: mesbah

Forum Jump:

User Panel Messages

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