alias lynx='lynx -use_mouse -vikeys'
alias startvnc='vncserver -geometry 1870x980 -depth 24'
alias startvnc4='vnc4server -geometry 1870x980 -depth 24'
-alias python='/usr/local/bin/python3'
+#alias python='/usr/local/bin/python3'
alias git_local='git --git-dir=.git_local'
--- /dev/null
+#!/usr/bin/env python
+
+#import serial
+import fileinput
+
+def process_header(line):
+ str=""
+ ds=line[0:2]
+ le=line[3:5]
+ da=line[6:8]
+ sa=line[9:11]
+ if ds=="27": str="Data Request: "
+ if ds=="27" and da=="FE": str="Connection Req:"
+ if ds=="27" and da=="FF": str="Broadcast Req: "
+ if ds=="27" and da=="F7": str="Multicast Req:"
+ if ds=="26": str="Data Message: "
+ if ds=="24": str="Data Reply: "
+ print(str,"payload length:",le,"receiver:",da,"sender:",sa)
+ return
+
+def process_payload(line):
+ print(line)
+ return
+
+def process_crc(line):
+ print(line)
+ return
+
+def process_iscrcok(line):
+ print(line)
+ return
+
+def process_timestamp(line):
+ print(line)
+ return
+
+def process(line):
+ # parse line
+ line=line[2:]
+ packet=line.split(" - ")
+ n=len(packet)
+ if n>0: process_header(packet[0])
+# if n>1: process_payload(packet[1])
+# if n>2: process_crc(packet[2])
+ if n>3:
+ info=packet[3].split(" : ")
+ m=len(info)
+# if m>0: process_iscrcok(info[0])
+# if m>1: process_timestamp(info[1].strip())
+ print("--------------------------------------------------------------------------------------------------------")
+ return
+
+for line in fileinput.input():
+ process(line)
+