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 8 5,907 Feb-08-2020, 06:58 PM
Last Post: karkas
  How to read a text file into a list or an array musouka 2 491 Oct-07-2019, 01:54 PM
Last Post: musouka
  Byte array is sorted when sending via USB daviddlc68 1 262 Aug-16-2019, 10:11 AM
Last Post: wavic
  Reading data from serial port as byte array vlad93 1 2,363 May-18-2019, 05:26 AM
Last Post: heiner55
  Read Byte Array from Zigbee coordinator using python jenkins43 3 601 Mar-26-2019, 03:03 PM
Last Post: micseydel
  Read data of Wireless Modem in Byte Format barry76 2 452 Jan-31-2019, 11:26 AM
Last Post: barry76
  Enable & Disable Wireless connection by using python aniyanetworks 9 4,056 Jan-15-2019, 04:32 AM
Last Post: aniyanetworks
  How to detect wireless modem connected serially to my laptop in python barry76 3 681 Jan-08-2019, 06:18 AM
Last Post: Gribouillis
  Byte-Array okmog 3 1,228 Jun-13-2018, 03:19 PM
Last Post: DeaD_EyE
  How can Read text file and create array? puneet102 1 650 May-22-2018, 06:41 PM
Last Post: snippsat

Forum Jump:


Users browsing this thread: 1 Guest(s)