THIS WILL MOST LIKELY NOT WORK FOR YOU OUT OF THE BOX
Unless you have the exact same very specific log format (unix timestamp, data as hex), this repository serves as a reference only.
This is basically a dirty hack made for single use, but if it spares anybody browsing old forum threads and staring at hex diffs, it fulfilled its purpose.
-
I grabbed an ADX that matched my log payload (included -
dmg210_simk43_v5.2.adx
). This most likely doesn't matter at all, I thought the log frame size might matter, but relative offset of the next frame is contained within each frames prefix. -
I recorded a very short, template log -
bench_sniff1.xdl
. This one does matter, but you should be good just using mine -
I estabilished that the header ends at 0x5F, which is where frames start. I didn't concern myself with contents of the header, since converted files work just fine without changing anything
-
I copy first 0x5F bytes of the
bench_sniff1.xdl
into each new XDL file. The ADX file I'm using only has a single source of frames (1 command - 1 response), it might get more complicated if you have more. -
I start writing converted frames
Based on the bench_sniff1.xdl
First 0x5F bytes - header, contents unknown (didn't matter, works fine).
Then log frames:
-
4 bytes - relative offset of the next frame, LSB. On the last frame, this will point to the end of the file
-
4 bytes - relative timestamp in miliseconds, LSB
-
4 bytes - unknown. I hardcode it to 0x0000, works fine.
-
log data (command response)
-
dmg210_simk43_v5.2.adx
- definition file that the example logs and XDL template are based on -
bench_sniff1.xdl
- short log used as a template, I copy first 0x5F bytes into each new XDL -
example_log.csv
- example of the log format I used this with. First column is unix timestamp (int), second is data in hex (like 0xC0 0xFF 0xEE) -
example_log.xdl
-example_log.csv
converted into XDL
In case you missed the header, this is not a plug&play solution, merely a XDL reference
python3 [input_filename.csv] [output_filename.xdl]