DMR interliving and deinterliving

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
Hello! Need some help! I have 6 voice DMR RAW package:

1st pack
5a5a5a5a015f00004100050101000000111177771111000040128e0e2a15dd1446ded50b48af8775fd55f77d765f2b56db2631d5ef421f83249b00cb2a1501000200000033340500
2nd pack
5a5a5a5a025f000041000501010000001111888811110000407147734644d7f99088ef1dc58031c5203430501d59c1ee0ceb78751c324a7720ff0030464401000200000033340500
3rd pack
5a5a5a5a035f000041000501010000001111999911110000402b51b3fc8fcd13c75886291cd2b13c507010a44b57743e1ea10294aad2465b353600a2fc8f01000200000033340500
4st pack
5a5a5a5a045f000041000501010000001111aaaa11110000407e6853b919a7cc785306de673571710070a43049e7e302d193816759895e0964640006b91901000200000033340500
5st pack
5a5a5a5a055f000041000501010000001111bbbb111100004079affc634d7f792d9ba20d7e8871d74054f05070306f9688e1f5187d11c4f1b1ba00ca634d01000200000033340500
6st pack
5a5a5a5a065f000041000501010000001111cccc111100004062bdeac567c3e2326209c7d6d8916c5910a6a02c5ef346230ff7fae4eb13d77224006bc56701000200000033340500
and LC package:
5a5a5a5aff5e0000410005010100000011111111111100004090d100c844ac00081fe018c07c6d0457ff5dd7def52d30500380120010010c918000fbc84401000200000033340500

I know payload (33 bytes, for example for first package its 8e0e2a15dd1446ded50b48af8775fd55f77d765f2b56db2631d5ef421f83249b00). but I dont understand how I should make deinterleaver each package or all packages in one. I understand that system uses BPTC(196, 96) Encoder. Please explain me how I should take part of data and make real data. I saw the table of interleaver, but cant make from this data superframe. Please explain algorithm of this bit swapping.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,634
Reaction score
1,030
Location
Talbot Co, MD
You could peruse the op25 sources, particularly dmr_cai and dmt_slot found in ~/op25/op25/gr-op25_repeater/lib
 

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
Thanks for your answer. I found the decode function. I use it. But this function decode data information/ And I didnt found function which decoding voice data or I mistake?
 

Genguser

Member
Joined
Dec 27, 2023
Messages
7
Reaction score
2
Those bytes are not in correct order. that site protocol using some different pattern. For reading what info are in burst you can use OK-DMR libs from Github link. there is support for decoding Hytera ip site. Here is what u have in LC burst. No more useful info you can get.
[BsSourcedData] [DataTypes.VoiceLCHeader] [CC: 1] [TS: 1]
[FLCOs.GroupVoiceChannelUser] [FeatureSetIDs.MotorolaLtd] [SOURCE: 365201] [GROUP: 1] [PRIVACY]
Voice is probably encrypted. That ok-dmrlib cannot play audio from frames.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,634
Reaction score
1,030
Location
Talbot Co, MD
Thanks for your answer. I found the decode function. I use it. But this function decode data information/ And I didnt found function which decoding voice data or I mistake?
Regular DMR voice frames are decoded down in rx_sync.cc. bptc19696 is not used by op25 for voice.
 

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
Thanks for your explain. And sorry for my mistake. I'm a little confused with data types. Now I understand that I use a different encoding. But the interleaving issue remains relevant. As I understand it, from each packet after decoding and bit swapping I should get three packets of 72 bits. For decoding I should use Golay's algorithm. Now I'm trying to figure out how it all works.
 

Genguser

Member
Joined
Dec 27, 2023
Messages
7
Reaction score
2
From each packet you get 264 bits which is exactly one frame (burst). for de/interleave - in case bptc19696 is used , then you take 98 bits from left and 98bits from right. so it looks more like this 98bits/center_bits/98 bits. In more detail it is described in ETSI docs, where you can see it all how it works. ETSI from TS 102 361-1 to TS 102 361-4.
 

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
You are right, but its work with data burst. Voice bursts is decode another way. You take 108bit from left - 48 bit its synch - 108 bit from right. This data you should decode. And bptc19696 is not used by op25 for voice.
 

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
Regular DMR voice frames are decoded down in rx_sync.cc. bptc19696 is not used by op25 for voice.
Thanks for your answers. I find information about good analyzer DMR. That is https://github.com/laforge/DMRshark. But now this project is empty. I found another GitHub - nonoo/dmrshark: dmrshark analyses the traffic, and adds extra features to a Hytera IPSC network. but its deamon and have another functions. Did you know some projects such https://github.com/laforge/DMRshark? Or maybe you know site with this projects?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,634
Reaction score
1,030
Location
Talbot Co, MD
Thanks for your answers. I find information about good analyzer DMR. That is https://github.com/laforge/DMRshark. But now this project is empty. I found another GitHub - nonoo/dmrshark: dmrshark analyses the traffic, and adds extra features to a Hytera IPSC network. but its deamon and have another functions. Did you know some projects such https://github.com/laforge/DMRshark? Or maybe you know site with this projects?
Sorry, I've got practically no receivable DMR in my local area so I don't spend a lot of time playing with it.
 

lwvmobile

DSD-FME
Joined
Apr 26, 2020
Messages
1,441
Reaction score
992
Location
Lafayette County, FL
Alright, I'll bite on this.

Hello! Need some help! I have 6 voice DMR RAW package:

What is the source of this payload information? Main reason I ask, is that none of those payloads have a DMR frame sync pattern in them. Also, the payloads you present seem to be (with an extra hex character on the end) two slots worth of BS, if you include the CACH information.

For example, ok-dmrlib asked me to implement a format like this for hex payloads. Here is a snort snippet of BS with IDLE in slot 2, and slot 1 with VLC, and the first voice superframe. The first hex value before the space indicates the slot of activity, the 98 indicates CACH, and the 6 hex values indicate the 3-byte CACH Payload. The longer sequence below those are the burst type '09' is IDLE, and then has a 33-byte payload.

Code:
2 98 888A22 //CACH
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4 //Payload
1 98 008220
1 01 04F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 01 04F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015
2 98 889E7A
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 40D6A5
1 10 998C48E12777C57D8DBDA61A626755FD7DF75F757B15104FBD41545227BED3CCE7
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 10 F177B7160DEE7A06AF1019A716C320941000926CE4E2E2624498A33ABE41E8AE72
2 98 889E7A
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 40D6A5
1 10 0EAAA5D9F2310C2B78EDCACDE913600034105C3317C03B5D998C48E12777C57D8D
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 10 BDA61A62657B15104FBD4154522360090AA47C37BED3CCE7F177B7160DEE7A06AF
2 98 889E7A
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 40D6A5
1 10 1019A716CCE4E2E262558EA01E5349935A671B06BEA16AF6288AA3F97C6444A634
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 10 5B11B0FB610DD571E088AA0AC5A3000000000550414F1010FED43F0248EC16D8DE

If I take that sample, and compress it to just the useful bytes of payload, stripping the slot values and burst type values, you get something like this:

888A2253C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B400822004F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE5204F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A5998C48E12777C57D8DBDA61A626755FD7DF75F757B15104FBD41545227BED3CCE7880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE52F177B7160DEE7A06AF1019A716C320941000926CE4E2E2624498A33ABE41E8AE72889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A50EAAA5D9F2310C2B78EDCACDE913600034105C3317C03B5D998C48E12777C57D8D880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE52BDA61A62657B15104FBD4154522360090AA47C37BED3CCE7F177B7160DEE7A06AF889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A51019A716CCE4E2E262558EA01E5349935A671B06BEA16AF6288AA3F97C6444A634880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE525B11B0FB610DD571E088AA0AC5A3000000000550414F1010FED43F0248EC16D8DE

If I were to take that above, and dump it into a simple hex to dibit conversion tool that I literally just wrote up, you might get something like this:

Code:
----------------Hex to Dibit Tool----------------

 Include any leading zeroes in Input Message!

 Enter Input Message (Hex Octets): 888A2253C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B400822004F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE5204F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A5998C48E12777C57D8DBDA61A626755FD7DF75F757B15104FBD41545227BED3CCE7880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE52F177B7160DEE7A06AF1019A716C320941000926CE4E2E2624498A33ABE41E8AE72889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A50EAAA5D9F2310C2B78EDCACDE913600034105C3317C03B5D998C48E12777C57D8D880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE52BDA61A62657B15104FBD4154522360090AA47C37BED3CCE7F177B7160DEE7A06AF889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A51019A716CCE4E2E262558EA01E5349935A671B06BEA16AF6288AA3F97C6444A634880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE525B11B0FB610DD571E088AA0AC5A3000000000550414F1010FED43F0248EC16D8DE

 Len: 576; DLen: 2304;
  In: 888A2253C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B400822004F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE5204F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A5998C48E12777C57D8DBDA61A626755FD7DF75F757B15104FBD41545227BED3CCE7880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE52F177B7160DEE7A06AF1019A716C320941000926CE4E2E2624498A33ABE41E8AE72889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A50EAAA5D9F2310C2B78EDCACDE913600034105C3317C03B5D998C48E12777C57D8D880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE52BDA61A62657B15104FBD4154522360090AA47C37BED3CCE7F177B7160DEE7A06AF889E7A53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B440D6A51019A716CCE4E2E262558EA01E5349935A671B06BEA16AF6288AA3F97C6444A634880CD353C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B441DE525B11B0FB610DD571E088AA0AC5A3000000000550414F1010FED43F0248EC16D8DE
 Out: 2,0,2,0,2,0,2,2,0,2,0,2,1,1,0,3,3,0,0,2,1,1,3,2,2,2,2,3,2,2,2,0,1,2,1,3,0,1,3,1,3,0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,1,3,3,1,1,3,1,1,3,1,3,3,1,1,3,1,0,2,0,1,3,3,3,3,1,2,3,2,1,0,1,2,1,1,0,1,1,3,0,1,2,3,1,0,2,0,3,0,2,2,1,2,3,1,1,0,3,3,3,0,1,2,0,1,0,0,2,3,1,0,1,0,0,1,3,1,3,2,1,1,0,2,1,1,2,3,0,1,0,1,2,3,0,0,3,3,2,3,1,2,0,1,0,0,3,1,3,1,1,1,1,3,0,1,3,2,0,0,2,0,2,0,2,2,2,2,0,0,2,2,3,0,1,1,2,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,1,0,0,1,1,0,3,3,0,1,0,0,0,1,0,0,3,3,3,2,3,1,1,0,0,3,3,3,0,0,0,2,1,0,2,0,3,2,3,0,0,1,1,2,3,1,2,0,3,1,3,2,
 Written to file: dibits.bin

 Enter any value to Exit: 1

And If I were to in turn run that dibits.bin file into dsd-fme, I would get:

Code:
Build Version: AW 2025-92-g8bfdeee
MBElib Version: 1.3.4
CODEC2 Support Enabled
Logging Frame Payload to console
Decoding DMR BS/MS Simplex
Audio In Device: dibits.bin
21:33:07 Sync: +DMR   slot1  [slot2] | CACH/Burst FEC ERR
21:33:07 Sync: +DMR  [slot1]  slot2  | Color Code=03 | VLC 
 SLOT 1 TGT=100 SRC=4112 FLCO=0x00 FID=0x68 SVC=0x40 Encrypted Hytera Group Call 
 DMR PDU Payload [00][68][40][00][00][64][00][10][10][C6][97][A7]
 SLCO CRC ERR
21:33:07 Sync: +DMR   slot1  [slot2] | Color Code=03 | IDLE
21:33:07 Sync: +DMR  [slot1]  slot2  | Color Code=03 | VLC 
 SLOT 1 TGT=100 SRC=4112 FLCO=0x00 FID=0x68 SVC=0x40 Encrypted Hytera Group Call 
 DMR PDU Payload [00][68][40][00][00][64][00][10][10][C6][97][A7]
21:33:07 Sync: +DMR   slot1  [slot2] | Color Code=03 | IDLE
21:33:07 Sync: +DMR  [SLOT1]  slot2  | Color Code=03 | VC1*
 AMBE F60FA79182EE80 err = [0] [0]
 AMBE E41DB58390FC80 err = [0] [0]
 AMBE C03991A7B4D880 err = [0] [0]

 Activity Update TS1: Group Voice; Hash: 59; TS2: Idle; Hash: 0;
 SLCO Completed Block [18][03][B0][07][30]
21:33:07 Sync: +DMR   slot1  [slot2] | Color Code=03 | IDLE
21:33:07 Sync: +DMR  [SLOT1]  slot2  | Color Code=03 | VC2
 AMBE 8871D9EFFC9080 err = [0] [0]
 AMBE 18E1497F6C0000 err = [0] [0]
 AMBE 39C0685E4D2100 err = [0] [0]
21:33:07 Sync: +DMR   slot1  [slot2] | Color Code=03 | IDLE
21:33:07 Sync: +DMR  [SLOT1]  slot2  | Color Code=03 | VC3
 AMBE 7B822A1C0F6300 err = [0] [0]
 AMBE FF06AE988BE780 err = [0] [0]
 AMBE F60FA79182EE80 err = [0] [0]

 Activity Update TS1: Group Voice; Hash: 59; TS2: Idle; Hash: 0;
 SLCO Completed Block [18][03][B0][07][30]
21:33:07 Sync: +DMR   slot1  [slot2] | Color Code=03 | IDLE
21:33:07 Sync: +DMR  [SLOT1]  slot2  | Color Code=03 | VC4
 AMBE E41DB58390FC80 err = [0] [0]
 AMBE C03991A7B4D880 err = [0] [0]
 AMBE 8871D9EFFC9080 err = [0] [0]
21:33:07 Sync: +DMR   slot1  [slot2] | Color Code=03 | IDLE
21:33:07 Sync: +DMR  [SLOT1]  slot2  | Color Code=03 | VC5
 AMBE 18E1497F6C0000 err = [0] [0]
 AMBE 3939E9DF854900 err = [0] [0]
 AMBE 7B45DB1C0F0100 err = [0] [0]

 Activity Update TS1: Group Voice; Hash: 59; TS2: Idle; Hash: 0;
 SLCO Completed Block [18][03][B0][07][30]
21:33:07 Sync: +DMR   slot1  [slot2] | Color Code=03 | IDLE
21:33:07 Sync: +DMR  [SLOT1]  slot2  | Color Code=03 | VC6
 SLOT 1 TGT=100 SRC=4112 FLCO=0x00 FID=0x68 SVC=0x40 Encrypted Hytera Group Call 
 DMR PDU Payload [00][68][40][00][00][64][00][10][10]
 AMBE 4B111B15F6BE00 err = [0] [0]
 AMBE F6859D20022D00 err = [0] [0]
 AMBE E47B0C23581500 err = [0] [0]
 SB: 00000000000 - 000;

All this is to say, that unless you have a specific application that puts that format and only that format out, then its kind of a long way around to get to something that can be accomplished much easier with pretty much any DMR capable decoding software.
 

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
Гаразд, я кусаю це.



Яке джерело цієї інформації про корисне навантаження? Основна причина, чому я запитую, полягає в тому, що жодна з цих корисних навантажень не має шаблону кадрової синхронізації DMR. Крім того, корисне навантаження, яке ви надаєте, здається (з додатковим шістнадцятковим символом у кінці) становить два слоти BS, якщо ви включите інформацію CACH.

Наприклад, ok-dmrlib попросив мене реалізувати такий формат для шістнадцяткових корисних даних. Ось фрагмент snort BS з IDLE у слоті 2 і слоті 1 з VLC, а також перший голосовий суперкадр. Перше шістнадцяткове значення перед пробілом вказує на слот активності, 98 вказує на CACH, а 6 шістнадцяткових значень вказують на 3-байтове корисне навантаження CACH. Довша послідовність під цими типом пакету '09' є IDLE, а потім має 33-байтове корисне навантаження.

[КОД]
2 98 888A22 //CACH
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4 //Корисне навантаження
1 98 008220
1 01 04F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 01 04F04242052434687A300B280C7DFF57D75DF5D504CC037A166617E406C0118015
2 98 889E7A
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 40D6A5
1 10 998C48E12777C57D8DBDA61A626755FD7DF75F757B15104FBD41545227BED3CCE7
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 10 F177B7160DEE7A06AF1019A716C320941000926CE4E2E2624498A33ABE41E8AE72
2 98 889E7A
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 40D6A5
1 10 0EAAA5D9F2310C2B78EDCACDE913600034105C3317C03B5D998C48E12777C57D8D
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 10 BDA61A62657B15104FBD4154522360090AA47C37BED3CCE7F177B7160DEE7A06AF
2 98 889E7A
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 40D6A5
1 10 1019A716CCE4E2E262558EA01E5349935A671B06BEA16AF6288AA3F97C6444A634
2 98 880CD3
2 09 53C25EABA8671DC7383BD9360E4DFF57D75DF5D21FF6E465171B48CA6D4FC610B4
1 98 41DE52
1 10 5B11B0FB610DD571E088AA0AC5A3000000000550414F1010FED43F0248EC16D8DE[/CODE]

Якщо я візьму цей зразок і стисну його лише до корисних байтів корисного навантаження, видаливши значення слотів і значення типу пакету, ви отримаєте щось на зразок цього:



Якщо я візьму це вище і перенесу це в простий інструмент перетворення hex to dibit, який я буквально щойно написав, ви могли б отримати щось на зразок цього:

[КОД]----------------Інструмент Hex to Dibit----------------

Додайте будь-які початкові нулі у вхідному повідомленні!

Введіть вхідне повідомлення (шістнадцяткові октети):

Довжина: 576; DLen: 2304;
в:
Вихід: 2,0,2,0,2,0,2,2,0,2,0,2,1,1,0,3,3,0,0,2,1,1,3,2,2,2,2,3,2,2,2,0,1,2,1,3,0,1,3,1,3,0,1,3,0,3,2 ,0,0,3,2,3,3,1,2,1,0,3,1,2,0,0,3,2,1,0,3,1,3,3,3,3,1,1,1,3,3,1,1,3,1,1,3,1,3,3,1,1,3,1,0,2,0,1 ,3,3,3,3,1,2,3,2,1,0,1,2,1,1,0,1,1,3,0,1,2,3,1,0,2,0,3,0,2,2,1,2,3,1,1,0,3,3,3,0,1,2,0,1,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,0,2,3,1,0,1,0,0,1,3,1,3,2,1,1,0,2,1,1,2,3,0,1,0,1,2,3,0,0,3,3,2,3,1,2,0,1,0,0,3,1,3,1,1,1,1,3,0, 1,3,2,0,0,2,0,2,0,2,2,2,2,0,0,2,2,3,0,1,1,2,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,1,0 ,0,1,1,0,3,3,0,1,0,0,0,1,0,0,3,3,3,2,3,1,1,0,0,3,3,3,0,0,0,2,1,0,2,0,3,2,3,0,0,1,1,2,3,1,2,0,3,1,3,2,0,1,0,0,3,1,3,1,1,1,1,3,0,1,3,2,0,0,2,0,2,0,2,2,2,2,0,0,2,2,3,0,1,1,2,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, 1,1,1,0,0,1,0,0,1,1,0,3,3,0,1,0,0,0,1,0,0,3,3,3,2,3,1,1,0,0,3,3,3,0,0,0,2,1,0,2,0,3,2,3,0,0,1,1,2,3,1,2,0,3,1,3,2,0,1,0,0,3,1,3,1,1,1,1,3,0,1,3,2,0,0,2,0,2,0,2,2,2,2,0,0,2,2,3,0,1,1,2,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, 1,1,1,0,0,1,0,0,1,1,0,3,3,0,1,0,0,0,1,0,0,3,3,3,2,3,1,1,0,0,3,3,3,0,0,0,2,1,0,2,0,3,2,3,0,0,1,1,2,3,1,2,0,3,1,3,2,
Записано у файл: dibits.bin

Введіть будь-яке значення для виходу: 1[/CODE]

І якби я, у свою чергу, запустив цей файл dibits.bin у dsd-fme, я б отримав:

[КОД]Версія збірки: AW 2025-92-g8bfdeee
Версія MBElib: 1.3.4
Підтримка CODEC2 увімкнена
Корисне навантаження фрейму журналу на консоль
Декодування DMR BS/MS Simplex
Аудіовхідний пристрій: dibits.bin
21:33:07 Синхронізація: +DMR slot1 [slot2] | ПОМИЛКА CACH/Burst FEC
21:33:07 Синхронізація: +DMR [slot1] slot2 | Код кольору=03 | VLC
СЛОТ 1 TGT=100 SRC=4112 FLCO=0x00 FID=0x68 SVC=0x40 Зашифрований груповий виклик Hytera
Корисне навантаження DMR PDU [00][68][40][00][00][64][00][10][10][C6][97][A7]
ПОМИЛКА CRC SLCO
21:33:07 Синхронізація: +DMR slot1 [slot2] | Код кольору=03 | ПРОСТОЮЧИЙ
21:33:07 Синхронізація: +DMR [slot1] slot2 | Код кольору=03 | VLC
СЛОТ 1 TGT=100 SRC=4112 FLCO=0x00 FID=0x68 SVC=0x40 Зашифрований груповий виклик Hytera
Корисне навантаження DMR PDU [00][68][40][00][00][64][00][10][10][C6][97][A7]
21:33:07 Синхронізація: +DMR slot1 [slot2] | Код кольору=03 | ПРОСТОЮЧИЙ
21:33:07 Синхронізація: +DMR [SLOT1] slot2 | Код кольору=03 | VC1*
AMBE F60FA79182EE80 помилка = [0] [0]
AMBE E41DB58390FC80 помилка = [0] [0]
AMBE C03991A7B4D880 помилка = [0] [0]

Оновлення діяльності TS1: груповий голос; Хеш: 59; TS2: неактивний; Хеш: 0;
Завершений блок SLCO [18][03][B0][07][30]
21:33:07 Синхронізація: +DMR slot1 [slot2] | Код кольору=03 | ПРОСТОЮЧИЙ
21:33:07 Синхронізація: +DMR [SLOT1] slot2 | Код кольору=03 | VC2
AMBE 8871D9EFFC9080 помилка = [0] [0]
AMBE 18E1497F6C0000 помилка = [0] [0]
AMBE 39C0685E4D2100 помилка = [0] [0]
21:33:07 Синхронізація: +DMR slot1 [slot2] | Код кольору=03 | ПРОСТОЮЧИЙ
21:33:07 Синхронізація: +DMR [SLOT1] slot2 | Код кольору=03 | VC3
AMBE 7B822A1C0F6300 помилка = [0] [0]
AMBE FF06AE988BE780 помилка = [0] [0]
AMBE F60FA79182EE80 помилка = [0] [0]

Оновлення діяльності TS1: груповий голос; Хеш: 59; TS2: неактивний; Хеш: 0;
Завершений блок SLCO [18][03][B0][07][30]
21:33:07 Синхронізація: +DMR slot1 [slot2] | Код кольору=03 | ПРОСТОЮЧИЙ
21:33:07 Синхронізація: +DMR [SLOT1] slot2 | Код кольору=03 | VC4
AMBE E41DB58390FC80 помилка = [0] [0]
AMBE C03991A7B4D880 помилка = [0] [0]
AMBE 8871D9EFFC9080 помилка = [0] [0]
21:33:07 Синхронізація: +DMR slot1 [slot2] | Код кольору=03 | ПРОСТОЮЧИЙ
21:33:07 Синхронізація: +DMR [SLOT1] slot2 | Код кольору=03 | VC5
AMBE 18E1497F6C0000 помилка = [0] [0]
AMBE 3939E9DF854900 помилка = [0] [0]
AMBE 7B45DB1C0F0100 помилка = [0] [0]

Оновлення діяльності TS1: груповий голос; Хеш: 59; TS2: неактивний; Хеш: 0;
Завершений блок SLCO [18][03][B0][07][30]
21:33:07 Синхронізація: +DMR slot1 [slot2] | Код кольору=03 | ПРОСТОЮЧИЙ
21:33:07 Синхронізація: +DMR [SLOT1] slot2 | Код кольору=03 | VC6
СЛОТ 1 TGT=100 SRC=4112 FLCO=0x00 FID=0x68 SVC=0x40 Зашифрований груповий виклик Hytera
Корисне навантаження DMR PDU [00][68][40][00][00][64][00][10][10]
AMBE 4B111B15F6BE00 помилка = [0] [0]
AMBE F6859D20022D00 помилка = [0] [0]
AMBE E47B0C23581500 помилка = [0] [0]
SB: 00000000000 - 000;[/CODE]

Все це означає, що якщо у вас немає конкретної програми, яка виводить цей формат і тільки цей формат, то буде довгий шлях, щоб дістатися до чогось, чого можна досягти набагато легше за допомогою будь-якого програмного забезпечення для декодування, що підтримує DMR.
Тhanks for your answer and your example In my example after deinterliveng and decoding voice frames I should to make one more action, make superframe and decrypt it. I know the key. But I try to understand the algorithm. What I must to do before decryption? Now I use Ok-dmrlib and dmr-utils3 library and find some functions which help me. I figured out how to get data from the LC header packet, and now I'm working on how to get a superframe from my packets. They have different conversion algorithms. I also want to understand how the superframe is decrypted and AMBE frames are obtained.
 

Genguser

Member
Joined
Dec 27, 2023
Messages
7
Reaction score
2
Here is what i was able to reconstruct into dsd-fme. Audio is short obviously, but im pretty sure it is really encrypted by DMR PI line plus VLC.
Maybe lwvmobile can tell more from that log.

Code:
10:19:57 Sync: +DMR   slot1  [slot2] | CACH/Burst FEC ERR
10:19:57 Sync: +DMR  [slot1]  slot2  | Color Code=00 | IDLE
 SLCO CRC ERR
10:19:57 Sync: +DMR   slot1  [SLOT2] | Color Code=00 | VC1*
 AMBE 713DF12A000000 err = [0] [2]
 AMBE 849CCCFA004980 err = [3] [4]
 AMBE 839988B3E2F880 err = [0] [0]
10:19:57 Sync: +DMR  [slot1]  slot2  | Color Code=00 | IDLE
10:19:57 Sync: +DMR   slot1  [SLOT2] | Color Code=01 | VC2
 AMBE 00E50B81A1E580 err = [0] [0]
 AMBE EA7229988B8A00 err = [0] [0]
 AMBE 111BABF5D59900 err = [0] [0]
10:19:57 Sync: +DMR  [slot1]  slot2  | Color Code=00 | IDLE
 SLCO CRC ERR
10:19:57 Sync: +DMR   slot1  [SLOT2] | Color Code=01 | VC3
 AMBE 8F330F0DEDB280 err = [0] [0]
 AMBE A5D30ED255D300 err = [0] [0]
 AMBE 8B469DF7119600 err = [0] [0]
10:19:57 Sync: +DMR  [slot1]  slot2  | Color Code=00 | IDLE
10:19:57 Sync: +DMR   slot1  [SLOT2] | Color Code=01 | VC4
 AMBE 17E700B39E3D00 err = [0] [0]
 AMBE 004C29E86F8F80 err = [0] [0]
 AMBE 2D5144D2AEC000 err = [0] [0]
10:19:57 Sync: +DMR  [slot1]  slot2  | Color Code=00 | IDLE
 Activity Update TS1: Group Voice; Hash: 59; TS2: Idle; Hash: 0;
 SLCO Completed Block [18][03][B0][07][30]

10:19:57 Sync: +DMR   slot1  [SLOT2] | Color Code=01 | VC5
 AMBE F45A4FB12BFA80 err = [0] [0]
 AMBE B62D49F0174A00 err = [0] [0]
 AMBE 61AC84737F9600 err = [0] [0]
10:19:57 Sync: +DMR  [slot1]  slot2  | Color Code=00 | IDLE
10:19:58 Sync: +DMR   slot1  [SLOT2] | Color Code=01 | VC6
 SLOT 2 TGT=1 SRC=365201 FLCO=0x00 FID=0x10 SVC=0x40 Group Encrypted Call
 DMR PDU Payload [00][10][40][00][00][01][05][92][91]
 AMBE F2ADAEFA6A2480 err = [0] [0]
 AMBE 79CBDDEED11A80 err = [0] [0]
 AMBE EE8818DF69E480 err = [0] [0]
 SB: 00001011001 - 059;

 Slot 2 DMR LE SB ALG ID: 0x21 KEY ID: 0x0B
 Slot 2 DMR PI C- ALG ID: 0x21 KEY ID: 0x0B MI: 0x00000000
 Slot 2 PI/LFSR and Late Entry MI Mismatch - 00000000 : 8DAC2684 (CRC OK)
10:19:58 Sync: +DMR  [slot1]  slot2  | Color Code=00 | IDLE
 Activity Update TS1: Group Voice; Hash: 59; TS2: Idle; Hash: 0;
 SLCO Completed Block [18][03][B0][07][30]

P.S. short link control lines was just added randomly. so slc lines has not correct values.
Also just little OT question to lwvmobile: does dsd-fme support replaying data without cach frames? i guess it doesn't. Im just asking because inside hytera ip multi-site connect is no cach or short link control informations (for at least what i know), so reconstructing those packets from .pcap into .bin isn't for one minute.


Edit: you were faster DiggerPopPC. So i dont know if that my answer is now still useful, but i cant delete it.
 

lwvmobile

DSD-FME
Joined
Apr 26, 2020
Messages
1,441
Reaction score
992
Location
Lafayette County, FL
P.S. short link control lines was just added randomly. so slc lines has not correct values.
Also just little OT question to lwvmobile: does dsd-fme support replaying data without cach frames? i guess it doesn't. Im just asking because inside hytera ip multi-site connect is no cach or short link control informations (for at least what i know), so reconstructing those packets from .pcap into .bin isn't for one minute.

If you're going to try to reconstruct it up as a BS signal, then yeah, the CACH is necessary because it has the TACT bits in it, which also has the bit for the slot value (TDMA Channel) in it, otherwise on BS, it'll just throw a bunch of CACH/TACT errors because it wouldn't otherwise know hot to keep the payloads for each slot seperated. You could possibly have better luck doing it as a MS instead, you could just pass 000000 to CACH each time since its not on MS, just the timing is seperated the same. Also, you would need to just put in some zero payload fill for the 33-bytes of the empty TDMA slot for the same timing.

Just out of curiosity, how did you end up reconstructing those frames into payloads? I took a second look at it last night, but I couldn't get the payload to line up just right and just ended up with a bunch of errors after inserting a frame sync pattern and trying to seperate the payloads in-between the frame syncs.

Also, should note, that does appear to be DMRA RC4 going by embedded link control, the late entry that was pulled from the voiced frames with a good CRC and also the single burst on VC6.

Code:
10:19:58 Sync: +DMR   slot1  [SLOT2] | Color Code=01 | VC6
 SLOT 2 TGT=1 SRC=365201 FLCO=0x00 FID=0x10 SVC=0x40 Group Encrypted Call
 DMR PDU Payload [00][10][40][00][00][01][05][92][91]

 Slot 2 DMR LE SB ALG ID: 0x21 KEY ID: 0x0B
 Slot 2 DMR PI C- ALG ID: 0x21 KEY ID: 0x0B MI: 0x00000000
 Slot 2 PI/LFSR and Late Entry MI Mismatch - 00000000 : 8DAC2684 (CRC OK)
 

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
If you're going to try to reconstruct it up as a BS signal, then yeah, the CACH is necessary because it has the TACT bits in it, which also has the bit for the slot value (TDMA Channel) in it, otherwise on BS, it'll just throw a bunch of CACH/TACT errors because it wouldn't otherwise know hot to keep the payloads for each slot seperated. You could possibly have better luck doing it as a MS instead, you could just pass 000000 to CACH each time since its not on MS, just the timing is seperated the same. Also, you would need to just put in some zero payload fill for the 33-bytes of the empty TDMA slot for the same timing.

Just out of curiosity, how did you end up reconstructing those frames into payloads? I took a second look at it last night, but I couldn't get the payload to line up just right and just ended up with a bunch of errors after inserting a frame sync pattern and trying to seperate the payloads in-between the frame syncs.

Also, should note, that does appear to be DMRA RC4 going by embedded link control, the late entry that was pulled from the voiced frames with a good CRC and also the single burst on VC6.

Code:
10:19:58 Sync: +DMR   slot1  [SLOT2] | Color Code=01 | VC6
 SLOT 2 TGT=1 SRC=365201 FLCO=0x00 FID=0x10 SVC=0x40 Group Encrypted Call
 DMR PDU Payload [00][10][40][00][00][01][05][92][91]

 Slot 2 DMR LE SB ALG ID: 0x21 KEY ID: 0x0B
 Slot 2 DMR PI C- ALG ID: 0x21 KEY ID: 0x0B MI: 0x00000000
 Slot 2 PI/LFSR and Late Entry MI Mismatch - 00000000 : 8DAC2684 (CRC OK)
Thanks for your answer. But one more nubies question. What program did you use to get information. And how you take data to that program?
 

DiggerPopPC

Member
Joined
Mar 24, 2025
Messages
14
Reaction score
2
I found dsd-fme project. It very interesting. I build it and install. But I dont understand how I should takes my packages to input this program. Please explain me how to convert my data and input it to program for result such yours.
 

lwvmobile

DSD-FME
Joined
Apr 26, 2020
Messages
1,441
Reaction score
992
Location
Lafayette County, FL
I found dsd-fme project. It very interesting. I build it and install. But I dont understand how I should takes my packages to input this program. Please explain me how to convert my data and input it to program for result such yours.

dsd-fme isn't compatible with ip frames like the ones you presented, its just that we tried to reconfigure the payload to what it would be like if it were coming over the air. Its meant to be used for RF signals captured over the air. If you want to use dsd-fme, I'd look into getting an sdr device and using sdr++ in conjunction with dsd-fme, or using an rtl dongle directly with dsd-fme, assuming that the ip frames you are capturing there have an over the air component to go along with it.

Or you could use OP25, or use SDRTrunk, Unitrunker, DSD+ FL, the point is, there are a multitude of decoding software packages available that all have some DMR capability, some more so than others, but the point is is to find a package that works for you.
 

Genguser

Member
Joined
Dec 27, 2023
Messages
7
Reaction score
2
Hi, sorry for late answer.
What are you trying to achieve DiggerPopPc? Listen audio from that traffic? Or some modification of that stream? I'm asking just to understand if we are capable to help you with that what are you trying to do.
dsd-fme tool has option parameter to enter key for decrypting audio if i remember correctly, however i never tried it, because im working more on other layers instead of voice bursts.
Im not author of ok-dmrlib, however im currently working on proof of concept function for ok-dmrlib to convert those packets into dsd-fme compatible bin file. After that i can open issue as an idea in smarek (author) github repo if he will be suppose and willable to integrate that into his lib tools.
From my point of view, it can be also useful for developers to cross check DMR bursts and contents between both softwares which was coded independently for further analysis.

So now answer for lwvmobile, for that burst patterns. well it's not from my head (invention), i just red few codes for that. here is example where i took LC Header from DiggerPopPc:
(im counting from zero in bytes logic)
Bursts starts at 25th byte. and ends at 59th byte which makes 34 bytes. (I dont know the reason, maybe beacuse even/odd numbering).
in final you take out the last byte which should be always zero, i highlight that byte with brackets below.
for alignment page view reasons i put below only bytes. so first line is mixed (original) multi site packet content, second line is unmixed into regular DMR bursts. Pattern in that is viewable. Just shifted bytes. if i'm looking correctly on that it should be scheme 2-1-4-3-6-5, etc...
Code:
d100c844ac00081fe018c07c6d0457ff5dd7def52d30500380120010010c918000fb
00d144c800ac1f0818e07cc0046dff57d75df5de302d0350128010000c018091fb[00]

Also another question, actually ideas. I dont want to hijack this thread for that, but i think in final can be what OP is looking for (maybe).
if static converting is okay, then maybe if smarek will include the converting function from network packets into bin compatible with dsd-fme can solve that.
if dynamic converting is required by author, then i guess it will require more implementations. I have just two ideas how it can be done for dynamic, but i cannot speak for smarek and lwvmobile, first one can be by making dsd-fme possible to decoding these multi-site network communication into decoder natively, or by somehow optionable listening on network port for that network traffic which will(?) be passed from ok-dmr after decoding into dsd-fme tool.
 
Last edited:
Top