Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reorganize seria data
#1
I have serial data captured using coolterm. Sample captured data is shown below

09 9F 12 B1 0D 0A DA BC E1 1A 0A 80 14 63 0D 0A
D7 AA DF 69 0B 15 15 80 0D 0A D4 D6 DD E9 0B 99
16 7A 0D 0A D3 9C DD AC 0B AE 16 A1 0D 0A D3 25
DE 06 0B 91 16 66 0D 0A D3 47 DE D0 0B 4D 15 DD
0D 0A D4 57 E0 40 0A D0 14 E2 0D 0A D5 FF E2 34

The data format is 8 bytes followed by 0D 0A. I need help in python program that
1.picks up 8 data bytes(4 integer data) before 0D 0A and remove OD OA after this
2.group 8 bytes into 4 variables, For eg: consider the data below
D7 AA DF 69 0B 15 15 80 0D 0A

I need var1=D7AA, var2=DF69,var3=0B15,var4=1580 with 0D 0A knocked off for the entire dataset

can anybody help me
Reply
#2
What is the type of data? String, file?
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Forum Jump:

User Panel Messages

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