Re^2: CAS-5A jpg trick?
JE9PEL, Mineo Wakita
On Sat, Mar 4, 2023 at 14:07 UTC
Thanks for CAS-5A ipg structure.
I re-edited my site referring to your advice.
Look at the bottom of that site.
By the way, what binary editor are you using?
Re:Re^2: CAS-5A jpg trick?
K4KDR, Scott
First, one additional tip....
Instead of downloading several different pictures, I recommend
(if there is time in a pass) to download the SAME picture as many times as you can.
That way, you might get packets from download #2 that you missed in download #1.
I like the FRHED hex editor (https://frhed.sourceforge.net/en/) on Windows.
But to make it easier to work with partial files, I convert to TEXT & use the GEANY
text editor for all my copy/paste operations. When I have ALL the packets, remove
all the INFO bytes (everything up to 'FF D8' on line #1 and the same number of bytes
on every other line), THEN I remove the line feeds so that I have a single line of
text going all the way from 'FF D8' to 'FF D9'. The final step is to convert back
to binary hex. Then I have a JPG file!
In a rough form, the steps look like this (with example commands):
------------------------------------------------------------------
- obtain KSS file from live capture
- convert from KSS to true HEX in GNU Radio while removing 1st 16 bytes (ax.25 header)
from each packet
- in hex editor, verify (or cut) start of file to confirm '03 xx xx' bytes are at
start of file
- chop file into 256 byte lines & convert to TEXT file:
cat cas-5a_22-n6rfm--cut.hex | xxd -p -c 256|more (confirm that each line starts
with '03 xx xx')
cat cas-5a_22-n6rfm--cut.hex | xxd -p -c 256 > cas-5a_22-n6rfm--0301.txt
- repeat for any other captures of same JPG file download
- open TEXT files & editor & remove 1st 3 bytes so that each line starts
w/ sequence # bytes (line #1 should start with '0001' - if you got the 1st packet)
- find missing packets by sequence number & fill from other downloads
- once all packets are present, remove 1st 26 characters from each line so that file
starts with 'FF D8'
cat cas-5a_22-combo.txt | cut -c 27- > 22-combo-less-27.txt
- remove line feeds so that entire text file (starting w/ 'FF D8') is on a single line
cat 22-combo-less-27.txt | tr '\n' ' ' > 22-combo-one-line.txt
- convert single line TEXT file to binary hex file w/ .JPG extension
cat 22-combo-one-line.txt | xxd -r -p > 22-combo.jpg
------------------------------------------------------------------
FYI, we got most of #23 last night - I'll try again today to get the remaining bytes.
#23 is HUGE! 794 packets.... that nice #22 picture that I posted with the satellite's
antenna was only something like 408 packets, I think. So, I hope #23 is good and not
just lens flare.