Page 1 of 1

TDOA2_decoder.py

Posted: Fri Nov 27, 2020 9:52 am
by HSIAOJH
Hi,
I'm the beginner of Python but can run sniffer_binary.py to dump the log over shell, seen attachment.
Shell_Sniffer.PNG
The next is to decoder it for better understanding TDOA2 protocol ….
However, I don't know exactly and fail to use TDOA2_Decoder.py to decode these packages. The shell hangs and is likely waiting for input... see attachment.
Shell_TDOA2 Decoder.PNG
Shell_TDOA2 Decoder.PNG (9.55 KiB) Viewed 1665 times
Do I need to change any code? Any guidelines, instructions or kind help can be from support team?
Thanks a lot!
JH

Re: TDOA2_decoder.py

Posted: Mon Nov 30, 2020 11:01 am
by kristoffer
Hi!

The general idea is to pipe the output from the sniffer into the decoder
Assuming you are using a unix shell you should do something like this

Code: Select all

./tools/sniffer/sniffer_binary.py | ./tools/sniffer/tdoa2_decoder.py

Re: TDOA2_decoder.py

Posted: Tue Dec 01, 2020 7:18 am
by HSIAOJH
I'm not using unix shell. how do I get this script running with python?

Re: TDOA2_decoder.py

Posted: Tue Dec 01, 2020 7:54 am
by kristoffer
I'm not a windows expert, but I think you can pipe in windows as well.
I don't have a windows machine to test on, but try something like this:

from your normal command prompt (not in python), cd to the root of the repository

Then run the scripts

Code: Select all

python tools\sniffer\sniffer_binary.py | python tools\sniffer\tdoa2_decoder.py 

Re: TDOA2_decoder.py [Resolved]

Posted: Tue Dec 01, 2020 9:26 am
by HSIAOJH
Thanks! It works now!