Java program to decode DMR

Status
Not open for further replies.

mikewazowski

Forums Manager/Global DB Admin
Staff member
Forums Manager
Joined
Jun 26, 2001
Messages
13,617
Location
Oot and Aboot
Got the software working last night and I'm having some success.

However, my laptop only has a mic in jack. Normally I would use my iMic as it seems to give the best input signal.

Add me in as another vote to be able to select which sound input device the program uses.
 

Jay911

Silent Key (April 15th, 2023)
Feed Provider
Joined
Feb 15, 2002
Messages
9,378
Location
Bragg Creek, Alberta
I ran this for a while on a system very close to my monitoring point (~2 blocks away), but I'm not sure how much useful info I got.

I set it to inverted input and the only thing I could recognize after gleaning the thread is "Colour Code 7". I don't think there was any actual voice comms going on being as it was Saturday night and this is a trucking firm, so I'm wondering if all I got was idle messages.

I've attached one of the logs I ran last night. If someone can browse it and give me some advice, I'd appreciate it. For example, am I getting a decent input (should I turn up or down my input volume)? I believe there are multiple "channels" in use at this site (I heard someone say "go to the maintenance channel" when I was using DSD the night before); is there any way I can identify which channel is which?
 
Last edited:

Forts

Mentor
Database Admin
Joined
Dec 19, 2002
Messages
6,807
Location
Ontario, Canada
Looks like you are monitoring a Capacity Plus or maybe a Connect Plus system. I always see entries like this one:

Unknown CSBK : CSBKO=62 + FID=16 1110001000000000000000000000000000000000000000000000000000000000

when I'm on Capacity Plus systems. I've never seen the entries about jitter and such though in any of my logs... I'm not sure what that's all about.

Here is an example from a system I was monitoring showing voice activity:

12:25:48 PM DMR Data Frame
CACH : TACT Ch 1 Continuation fragment of LC
Slot Type : Colour Code 3 Terminator with LC
Group Voice Channel User LC
Service Options : Non-emergency/No priority
Group Address : 100 Source Address : 1203

You can see radio 1203 was talking on group 100. Also, if Privacy was being used it would be shown in the Service Options line.
 

Jay911

Silent Key (April 15th, 2023)
Feed Provider
Joined
Feb 15, 2002
Messages
9,378
Location
Bragg Creek, Alberta
Here's a different system I listened to for about an hour today. I got everything that Forts indicates in his post above during voice activity.

MEGAUPLOAD - The leading online storage and file delivery service

My only disappointment is that it wouldn't run simultaneously with DSD on my Ubuntu netbook (the first program to get to /dev/audio wouldn't let anything else see it). Is this a function of the program or Ubuntu?
 

Forts

Mentor
Database Admin
Joined
Dec 19, 2002
Messages
6,807
Location
Ontario, Canada
I'm not sure where the limitation lies there... if it's a linux thing that prevents multiple programs from accessing an audio device or not. I think you can have multiple apps access audio at once under Windows, as long as they are using the same sample rate and such.

Your log looks good.... I have no clue about that jitter stuff, I never see that.

Slot Type : Colour Code 4 Terminator with LC
Group Voice Channel User LC
Service Options : Non-emergency/No priority
Group Address : 2 Source Address : 7610
Dibit 0=45% Dibit 1=13% Dibit 2=26% Dibit 3=14%
120021321132000130230002302000023320000120000223220000012200310021313333111331130131231131022133132000233300012211000103200002002000012200022223
2:55:22 PM DMR Data Frame
CACH : TACT AT=1 Ch 2 Last fragment of LC
Slot Type : Colour Code 4 Idle
2:55:22 PM Short LC : Act_Updt - Group voice activity on BS time slot 1 Hashed Addr 14 : No activity on BS time slot 2

So you can see all the good stuff there... Colour Code 4, Group ID 2 (No Privacy) and it's on timeslot #1.
 

IanWraith

Member
Joined
Sep 29, 2010
Messages
269
Location
ianwraith@gmail.com
Hi

I'm not sure about the multiple audio devices. All I can say is that DMR Decode uses the same sample rate and other sound card settings as DSD due to the simple factor that most of the demodulation code is ported straight over from DSD's C to Java.

Also when monitoring don't enable the "Debug" option in the main menu as that shows a whole load of info such as jitter you don't want to see when monitoring a system.

Regards

Ian
 

IanWraith

Member
Joined
Sep 29, 2010
Messages
269
Location
ianwraith@gmail.com
Hi Folks
I have just uploaded build 32 to Github ..

https://github.com/IanWraith/DMRDecode/downloads

New features include a "Pause" button to stop screen activity if you see something interesting and the radio logged feature at the bottom of the screen now shows which channels (timeslots) the radios used (as suggested by Forts).

Also I have fixed a bug which prevented you starting logging again once you had stopped logging.

As usual feature suggestions and bug reports to this forum please.

Regards

Ian
 

inigo88

California DB Admin
Database Admin
Joined
Oct 31, 2004
Messages
1,999
Location
San Diego, CA
Thanks for the great program Ian!

After much headache trying to determine whether or not the signal was inverted (it was, thanks to your explanation in this thread) I've been able to successfully decode some voice frames containing group and radio id data:

Code:
5:02:23 PM DMR Voice Frame with Embedded Signalling
CACH : TACT  Ch 2 Continuation fragment of LC 
EMB : Colour Code 1 : Single fragment LC 
5:02:23 PM Embedded Single Block LC : Null
5:02:23 PM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Last fragment of LC 
Slot Type : Colour Code 1 CSBK
Unknown CSBK : CSBKO=62 + FID=16 1100001100010000110010010000000000000000000000000000000000000000
5:02:23 PM Short LC : Unknown SLCO=15 000100000000001100000000
5:02:23 PM DMR Data Frame
CACH : TACT  Ch 2 First fragment of LC 
Slot Type : Colour Code 1 Terminator with LC
Group Voice Channel User LC
[B]Service Options : Non-emergency/No priority
Group Address : 201 Source Address : 1162[/B]
5:02:23 PM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Continuation fragment of LC 
Slot Type : Colour Code 1 CSBK
Unknown CSBK : CSBKO=62 + FID=16 1100001100010000110010010000000000000000000000000000000000000000
5:02:23 PM DMR Data Frame
CACH : TACT  Ch 2 Continuation fragment of LC 
Slot Type : Colour Code 1 Terminator with LC
Group Voice Channel User LC
Service Options : Non-emergency/No priority
Group Address : 201 Source Address : 1162

I think this is likely a Capacity Plus (single site trunking?) system due to the presence of unknown CSBK and SLCO frames. For some context, this UHF mototrbo system is used by a large public university here in southern California (and replaced their older 800 MHz Smartnet trunking system). One of the main users are the campus wide shuttle buses, which are all equipped with GPS tracking through the same mototrbo system.

So far I have only gotten unintelligible audio from DSD on this system, however thanks to your program I can now see that there is a lot less voice traffic than I originally thought, and DSD was likely decoding all the data frames. So all hope for monitoring decoded voice audio may not be lost after all!
 

Forts

Mentor
Database Admin
Joined
Dec 19, 2002
Messages
6,807
Location
Ontario, Canada
Yes, that does look like a Capacity Plus system. You will likely find those same radio and group ID's in use on another frequency somewhere.
 

inigo88

California DB Admin
Database Admin
Joined
Oct 31, 2004
Messages
1,999
Location
San Diego, CA
Actually I finally got DSD to work and that same frequency does carry voice traffic during those voice frames (with data frames interleaved at the same time). One interesting thing I noticed several times during a voice conversation that I wasn't expecting was after the first user would show up on one TDMA channel on a given group, the second user would reply on the same group on the second TDMA channel, while the original user was still keyed up on the first. So in other words, both TDMA voice channels were in use at once for the same conversation on the same group (one for each radio ID). I'm curious whether this was a bug in the program or if mototrbo supports some kind of full duplex calling option?

Also, I recall you saying earlier in the thread that "Connect Plus" (the multi-site trunking variant) has a dedicated control channel, and I was able to confirm that with this brochure. I noticed a trbo/DMR-sounding control channel in the San Diego, CA area on 453.0125 MHz, and ran DMRDecode on it. This system is unrelated to the previous system I posted, which I believe to be capacity plus.

Here is an excerpt of one second worth of data while the control channel is idle (I haven't observed any voice traffic yet):

Code:
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Continuation fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Continuation fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Last fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM Short LC : Unknown SLCO=10 000001110111000001100000
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 First fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame - Error !
CACH : TACT  AT=1 Ch 2 Continuation fragment of LC 
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Continuation fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Last fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM Short LC : Unknown SLCO=10 000001110111000001100000
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 First fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Continuation fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Continuation fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Last fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM Short LC : Unknown SLCO=10 000001110111000001100000
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 First fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Continuation fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Continuation fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Last fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM Short LC : Unknown SLCO=10 000001110111000001100000
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 First fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Continuation fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Continuation fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Last fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM Short LC : Unknown SLCO=10 000001110111000001100000
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 First fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Continuation fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 Continuation fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Last fragment of LC 
Slot Type : Colour Code 3 Idle
3:54:47 AM Short LC : Unknown SLCO=10 000001110111000001100000
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 1 First fragment of LC 
Slot Type : Colour Code 3 CSBK
Unknown CSBK : CSBKO=1 + FID=6 0000010100000011000001000000000100000000000000000000000000001010
3:54:47 AM DMR Data Frame
CACH : TACT  AT=1 Ch 2 Continuation fragment of LC 
Slot Type : Colour Code 3 Idle

Hope that helps! :)
 

IanWraith

Member
Joined
Sep 29, 2010
Messages
269
Location
ianwraith@gmail.com
Hello

Thanks for your logs. I see the "Unknown CSBK : CSBKO=62" frames all the time on a local shopping mall Capacity Plus system but have never seen the "Unknown CSBK : CSBKO=1 + FID=6" frames before so think you are right and that this is a Connect Plus system.

Incidentally the Capacity Plus CSBKO=62 frames appear to have a purpose of telling all the repeater users what is happening on that channel. So from your first log we have ..

Group Address : 201 Source Address : 1162

which is followed by ..

Unknown CSBK : CSBKO=62 + FID=16
11000011 00010000 11001001 0000000000000000000000000000000000000000

Now the group number 201 is 11001001 is binary which is the 3rd byte in the unknown CSBK above. I would be interested if anyone can work out the meaning of the rest of the frame.

Regards

Ian
 

Forts

Mentor
Database Admin
Joined
Dec 19, 2002
Messages
6,807
Location
Ontario, Canada
There must be channel steering/LCN assignments in there somewhere I would think, to tell the radio which timeslot & frequency it's supposed to be on. I was reading as well that the Connect Plus systems don't currently support Privacy of any form (which seemed kind of odd). But monitoring a system with a radio looked rather difficult given the authentication steps a radio goes thru to register itself on the system.
 

inigo88

California DB Admin
Database Admin
Joined
Oct 31, 2004
Messages
1,999
Location
San Diego, CA
There must be channel steering/LCN assignments in there somewhere I would think, to tell the radio which timeslot & frequency it's supposed to be on.

You know, the more I look at Capacity Plus the more it seems like LTR standard, or its more advanced cousin (supporting radio ID, multi-site and ESN verification) "Passport." /\/\ has been making LTR standard and Passport radios for a long time, so this could be conceivable.

LTR standard is pretty primitive. It has no control channel. All traffic initially defaults to the home repeater, and the subaudibile outgoing signal word (which is only 40 bits) runs underneath specifying the current (goto) and free channels. If any other users try to key up another talkgroup during that time, their radio is redirected to a free channel by the OSW data on the home repeater. If a 3rd talkgroup keys up, they are further redirected to a different free channel (until all the free channels are used up). Passport is similar (no control channel) except it uses a longer 68-bit OSW, maps the goto and free channels using LCNs (which can be converted to the frequency using base/step/offset tables in the radio) instead of arbitrary repeater numbers (1-20), the ESN registration, site roaming and radio ID, etc.

There was another LTR variant called Multi-Net, which did use a dedicated control channel.

To make a long story short, with the substitution of digital data frames in lieu of subaudible data, Capacity Plus seems awfully similar to a single site Passport system, and Connect Plus seems similar to Multi-Net.

On my university's Capacity Plus system, only one frequency broadcasts a rapid data burst every two seconds (DMRDecode shows jitter and syncs with debug on, but decodes no data). This same frequency also carries voice traffic from multiple talk groups, and it is apparently the only frequency used during slow traffic periods. This leads me to believe it operates like a "Home repeater", much like LTR and Passport (Passport even uses a similar data burst every two seconds on its home and/or registering channels). Presumably when this home repeater frequency is busy, the other frequencies act as "Free channels" and begin carrying traffic for other talk groups. I would be really interested to ask someone with mototrbo CPS how the details of Capacity Plus are programmed. Are the repeater frequencies pre-programmed in the radios (like LTR, mapped to Ch 1-20 for example) or are the radios programmed with a base/offset/step table which converts from LCNs received over the air? Of course, it could be neither. :)

I had a lot of fun collaborating on these forums a couple years ago with others who were trying to reverse engineer all the possible Passport OSW formats, and with the systems at least functioning in a similar manner, those old threads in the control channel decoding sub-forum may be a good starting place. While the CSBK format is completely different, comparing with known passport or LTR frames could give some clues as to what possible allocations the bits could be given (goto LCN, free LCN, message type, etc.).
 
Last edited:

TampaTyron

Beep Boop, Beep Boop
Premium Subscriber
Joined
Feb 1, 2010
Messages
1,115
Location
Phoenix, AZ
From an infrastructure point of view, each repeater is issued a pair of channel numbers ( CH 1,2 or 3,4 or 7,8). So here is how I have most of my systems setup:


Rptr A 451.000mhz gets assigned as "CH 1,2"
Rptr B 452.000mhz gets assigned as "CH 3,4"
Rptr C 453.000mhz gets assigned as "CH 5,6"
etc all the way up to 6 voice and 6 data repeaters (total of 12 voice and 12 data simultaneous slots) for 1 single site cap plus system.

I will see if I can get some programming screen shots. It is very similiar to LTR except Cap Plus fails gracefully. I have a demo system at my disposal that we can take captures of it will help (using known system parameters). See the Mototrbo System Planner for more detail. TT
 

TampaTyron

Beep Boop, Beep Boop
Premium Subscriber
Joined
Feb 1, 2010
Messages
1,115
Location
Phoenix, AZ
I can also assign a repeater a value so that the systems favors certain repeaters (if the freqs are clean or whatever) and will use those higher favored repeaters before pushing off to lower favored repeaters/channels. TT
 

inigo88

California DB Admin
Database Admin
Joined
Oct 31, 2004
Messages
1,999
Location
San Diego, CA
Thanks TT!!! I noticed in the 2nd byte of the above CSBK frame was "16", I wonder if that is CH 16? Would that be possible since there are 24 channels total? I'm still not sure where they're putting the "Free" channel field (if there even is one). I was suspecting fields for LCN and TDMA path in the data frame, but by preprogramming the frequency AND TDMA channel into the radio ahead of time they save a LOT of space in the data frame for other features. Obviously LTR handled repeater priority more primitively (through assignment of home repeater for each talkgroup), but this does seem a lot like LTR!
 
Last edited:

IanWraith

Member
Joined
Sep 29, 2010
Messages
269
Location
ianwraith@gmail.com
Hello Folks

From looking at a log my understanding of Unknown CSBK : CSBKO=62 frames is as follows (bit 0 is the left most bit)

Bit 2 - Channel 0 if ch1 and 1 if ch2
Bit 5 - Set if a unit to unit call
Bit 6 - Set if data call
Bit 8 - Set if group call
Bits 16 through to 23 - Group ident

Can anyone add anything to this ?

Regards

Ian
 

inigo88

California DB Admin
Database Admin
Joined
Oct 31, 2004
Messages
1,999
Location
San Diego, CA
I was guessing that bits 12 thru 16 could be the "Go to" repeater & TDMA slot channel number (Ch 1 through Ch 24?), but I will need to look at more logs to confirm this.

I finally have DSD working (and sounding great!) and the system I'm monitoring is definitely Capacity Plus trunking. The data burst every two seconds (the closest thing to a control channel this type of system seems to have) has migrated to a different repeater frequency this morning. From a monitoring perspective I am still surprised how similar the system operates to LTR.
 
Status
Not open for further replies.
Top