Python Forum
Not able to Read byte Array From Wireless Coordinator
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  wireless access point on raspberry PI zazas321 0 684 Oct-02-2020, 05:33 PM
Last Post: zazas321
  'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte tienttt 12 3,785 Sep-18-2020, 10:10 PM
Last Post: tienttt
  convert array of numbers to byte array adetheheat 3 937 Aug-13-2020, 05:09 PM
Last Post: bowlofred
  Wireless sensor network TDMA cyborg_8274 1 815 Apr-17-2020, 10:43 AM
Last Post: Larz60+
  Convert even byte array to odd medatib531 1 872 Mar-17-2020, 02:48 AM
Last Post: scidam
  'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte karkas 8 25,098 Feb-08-2020, 06:58 PM
Last Post: karkas
  How to read a text file into a list or an array musouka 2 1,650 Oct-07-2019, 01:54 PM
Last Post: musouka
  Byte array is sorted when sending via USB daviddlc68 1 1,206 Aug-16-2019, 10:11 AM
Last Post: wavic
  Reading data from serial port as byte array vlad93 1 7,230 May-18-2019, 05:26 AM
Last Post: heiner55
  Read Byte Array from Zigbee coordinator using python jenkins43 3 1,721 Mar-26-2019, 03:03 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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