Not able to Read byte Array From Wireless Coordinator - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Not able to Read byte Array From Wireless Coordinator (/thread-16860.html) |
Not able to Read byte Array From Wireless Coordinator - jenkins43 - Mar-18-2019 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 |