szechyjs / dsd

Digital Speech Decoder
Other
708 stars 272 forks source link

Wishlist: P25 control channel decoding? #51

Open sbromberger opened 9 years ago

sbromberger commented 9 years ago

Hi,

First off, thanks very much for this great utility. Just FYI, I've been able to get voice stats off P25 using this in conjunction with rtl_fm:

rtl_fm -f XXXXX -p 49 -s 48000 -g 25 -M fm | dsd -i - -o /dev/null -v99 -g25

(Please let me know if you have any suggestions re: these options, but right now they seem to work well).

I'm hoping to get more info from the P25 control channel, and unfortunately my C++/SDR skills are pretty much nonexistent. Any way this could be placed on the roadmap, or have I overlooked this functionality?

robotastic commented 9 years ago

I have a separate project that uses OP25 to decode the trunk channel and DSD to decode the audio: https://github.com/robotastic/trunk-recorder

Right now, this isn't something that DSD can do.

sbromberger commented 9 years ago

Thanks for the quick response. Unfortunately gnuradio is a nonstarter as it's too resource-intensive. Is there any way I might get this to work with any of the rtl_ utilities?

robotastic commented 9 years ago

Ah! unfortunately I don't think there is. Right now OP25 is the only Open Source project that decodes the P25 control channel. UniTrunker does it too, but it is windows based.

If you find something, let me know. I have a Pi2 that I want to use to follow a P25 system.

sbromberger commented 9 years ago

Forgive my ignorance here, but how hard would it be to merge the op25 stuff into dsd?

PS: I'm also looking at getting this working on a pi2 :)

mattames commented 9 years ago

Very. It would need a lot of massaging to make it work, as everything in OP25 is designed around the GNUradio framework.

sbromberger commented 9 years ago

I can't get trunkrecorder built anyway - getting gnuradio working is a complete exercise in frustration.

sbromberger commented 9 years ago

Sorry for the next silly question: if dsd is demodulating and producing some sort of stream of frames (using the generic definition), why couldn't I (or you, or ...) write a parser for the frames that understands the control channel protocols?

nivex commented 9 years ago

Look at the various processFOO functions in the p25p1_*.c files for how bits from the stream are processed. You could probably borrow the parser code from trunk_recorder and assemble a processTSDU function, then plumb it up in dsd_frame.c on line 470 where it currently skips those bits.

sbromberger commented 9 years ago

@nivex - Thanks - that's pretty helpful. To start, I'm trying to find a good way of just getting the frame bytes. Let me take a deeper look at the process*. stuff.

sbromberger commented 9 years ago

Hm. Is there a straightforward way to just dump a raw P25 frame (as a hex bytestream, for example) to stdout? I've found the trunking frame diagrams (http://www.p25.com/images/pdf/CodanTG-001-4-0-0P25TrainingGuide.pdf if you're interested), but I'd rather write the parser in some other language than C :)