Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Not able to Read byte Array From Wireless Coordinator
#1
Hi, I am trying to read the ByteArray from Wireless Coordinator which is receiving data from wireless sensors. To check the frame, I am using the XCTU software from where I am getting byte array as mentioned below

"7E 00 32 90 00 13 A2 00 41 91 25 D4 FF FE C2 7F 00 01 03 FF 48 00 08 00 00 09 1A 00 08 07 00 32 70 00 00 00 00 0C DD 00 39 C2 FF F0 90 00 00 00 00 00 00 00 1A 0D"

But the below code when I am using to read the same data

import serial
ser = serial.Serial('COM6',9600)
read_byte = ser.read()
while read_byte is not None:
    read_byte = ser.read()
    print ('%x' % ord(read_byte))
Then I am getting Result as below

42
c4
76
66
c6
84
4e
66
42
e1
c2
66
c6
c7
c2
66
c2
a1
ce
66
c6
e5
42


I am not able to understand where is the issue please suggest something
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte karkas 7 280 Sep-12-2019, 11:19 PM
Last Post: newbieAuggie2019
  Byte string catenation inefficient in 3.7? RMJFlack 13 471 Aug-18-2019, 05:19 AM
Last Post: RMJFlack
  Byte array is sorted when sending via USB daviddlc68 1 113 Aug-16-2019, 10:11 AM
Last Post: wavic
  raw byte of integer jonnin 4 251 Jul-22-2019, 03:48 AM
Last Post: jonnin
  HELP: String of Zero's and One's to binary byte schwasskin 1 1,159 May-19-2019, 07:31 AM
Last Post: heiner55
  Reading data from serial port as byte array vlad93 1 1,008 May-18-2019, 05:26 AM
Last Post: heiner55
  g Null Byte using DictReader eshwinsukhdeve 13 617 May-15-2019, 08:50 AM
Last Post: buran
  charmap codec can't decode byte error with gzipped file in python bluethundr 2 275 Apr-30-2019, 12:26 PM
Last Post: bluethundr
  Read Byte Array from Zigbee coordinator using python jenkins43 3 350 Mar-26-2019, 03:03 PM
Last Post: micseydel
  N-Dim array manipulation in a loop, getting IndexError: too many indices for array cesardepaula 1 1,034 Mar-13-2019, 01:39 AM
Last Post: scidam

Forum Jump:


Users browsing this thread: 1 Guest(s)