diff --git a/src/dmr_csbk.c b/src/dmr_csbk.c index 8b8ecb3..b5864ed 100644 --- a/src/dmr_csbk.c +++ b/src/dmr_csbk.c @@ -234,7 +234,7 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8 { //initial line break fprintf (stderr, "\n"); - fprintf (stderr, " Move (C_MOVE) (TODO)"); + fprintf (stderr, " Move (C_MOVE) "); } //Aloha @@ -372,10 +372,10 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8 { //initial line break fprintf (stderr, "\n"); - fprintf (stderr, " Clear (P_CLEAR) (TODO)"); + fprintf (stderr, " Clear (P_CLEAR) "); } - //(P_PROTECT) - Could be a useful way of determining who is on the current timeslot p_kind 2 + //(P_PROTECT) if (csbk_o == 47) { //initial line break @@ -395,27 +395,6 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8 fprintf (stderr, "\n"); fprintf (stderr, " Target [%08d] - Source [%08d]", target, source); - //Illegally Parked is another way to say a private call is outbound on this channel - //so, we can use this as a form of 'link control' - if (p_kind == 2) - { - //don't set this if operating out of dmr mono or using call alert beep - if (opts->dmr_mono == 0 && opts->call_alert == 0) - { - if (state->currentslot == 0) - { - state->lasttg = target; - state->lastsrc = source; - } - else - { - state->lasttgR = target; - state->lastsrcR = source; - } - } - - } - } if (csbk_o == 40) //0x28 //check to see if these are fid 0 only, or also in other manufacturer fids @@ -545,28 +524,28 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8 { //initial line break fprintf (stderr, "\n"); - fprintf (stderr, " C_AHOY (TODO) "); + fprintf (stderr, " C_AHOY "); } if (csbk_o == 42) { //initial line break fprintf (stderr, "\n"); - fprintf (stderr, " P_MAINT (TODO) "); + fprintf (stderr, " P_MAINT "); } if (csbk_o == 30) { //initial line break fprintf (stderr, "\n"); - fprintf (stderr, " C_ACKVIT (TODO) "); + fprintf (stderr, " C_ACKVIT "); } if (csbk_o == 31) { //initial line break fprintf (stderr, "\n"); - fprintf (stderr, " C_RAND (TODO) "); + fprintf (stderr, " C_RAND "); } //tier 2 csbks @@ -892,67 +871,6 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8 } - //upon further examination, opcodes 6 and C (12) do not appear to be a channel grants or tlcs, - //it is present in Connect+, but its purpose isn't entirely clear - //DSDPlus only regards it as a 'CSBK [LB=1 CSBKO=6 (?) FID=06 v1=115213 v2=10488576 v3=0] - //unsure of what the v1 v2 v3 fields specify - // if (csbk_o == 0x06 || csbk_o == 0x0C) - if (csbk_o != 0x01 && csbk_o != 0x03) - { - - uint32_t v1 = ( (cs_pdu[2] << 16) + (cs_pdu[3] << 8) + cs_pdu[4] ); - uint32_t v2 = ( (cs_pdu[5] << 16) + (cs_pdu[6] << 8) + cs_pdu[7] ); - uint32_t v3 = ( (cs_pdu[7] << 16) + (cs_pdu[8] << 8) + cs_pdu[9] ); - - // debug print - // initial line break - // fprintf (stderr, "\n"); - // fprintf (stderr, "%s", KYEL); - // fprintf (stderr, " Connect Plus CSBK 0x%X\n", csbk_o); - // fprintf (stderr, " v1(%d), v2(%d), v3(%d)",v1, v2, v3); - // state->dmr_mfid = 0x06; - // sprintf (state->dmr_branding, "%s", "Motorola"); - // sprintf(state->dmr_branding_sub, "Con+ "); - } - - //the validity of these last three csbk opcodes cannot be confirmed - //I recall making these based on observation and speculation long ago, - //but cannot verify the accuracy of them now, so they will remain disabled - //they offer no particular interest to trunking/listening - - // if (csbk_o == 0x11) - // { - // //initial line break - // fprintf (stderr, "\n"); - // fprintf (stderr, "%s", KYEL); - // fprintf (stderr, " Connect Plus Registration Request"); - // state->dmr_mfid = 0x06; - // sprintf (state->dmr_branding, "%s", "Motorola"); - // sprintf(state->dmr_branding_sub, "Con+ "); - // } - - // if (csbk_o == 0x12) - // { - // //initial line break - // fprintf (stderr, "\n"); - // fprintf (stderr, "%s", KYEL); - // fprintf (stderr, " Connect Plus Registration Response"); - // state->dmr_mfid = 0x06; - // sprintf (state->dmr_branding, "%s", "Motorola"); - // sprintf(state->dmr_branding_sub, "Con+ "); - // } - - // if (csbk_o == 0x18) - // { - // //initial line break - // fprintf (stderr, "\n"); - // fprintf (stderr, "%s", KYEL); - // fprintf (stderr, " Connect Plus Talkgroup Affiliation"); - // state->dmr_mfid = 0x06; - // sprintf (state->dmr_branding, "%s", "Motorola"); - // sprintf(state->dmr_branding_sub, "Con+ "); - // } - fprintf (stderr, "%s", KNRM); } diff --git a/src/dmr_flco.c b/src/dmr_flco.c index 3e0bcd6..d1be664 100644 --- a/src/dmr_flco.c +++ b/src/dmr_flco.c @@ -87,24 +87,48 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C dmr_embedded_gps(opts, state, lc_bits); } - //Unknown CapMax Things - if (fid == 0x10 && (flco == 0x08 || flco == 0x10) ) + //Unknown CapMax/Moto Things + if (fid == 0x10 && (flco == 0x08 || flco == 0x28)) { - //NOTE: fid 0x10 and flco 0x08 produces a lot of 'zero' bytes, rid users refer to receiving 'ten' 'elevens'? C0 and C1? + //NOTE: fid 0x10 and flco 0x08 (emb) produces a lot of 'zero' bytes //this has been observed to happen often on CapMax systems, so I believe it could be some CapMax 'thing' - //Unknown Link Control - FLCO=0x08 FID=0x10 SVC=0xC1 or FLCO=0x08 FID=0x10 SVC=0xC0 <-- have the enc bit set on svc, but these calls aren't enc? - //flco 0x10 has also been observed lately with similar svc bits, but the tg and src values don't match the vlc/tlc + //Unknown Link Control - FLCO=0x08 FID=0x10 SVC=0xC1 or FLCO=0x08 FID=0x10 SVC=0xC0 <- probably no SVC bits in the lc + //flco 0x28 has also been observed lately but the tg and src values don't match + //another flco 0x10 does seem to match, so is probably capmax group call flco if (type == 1) fprintf (stderr, "%s \n", KRED); if (type == 2) fprintf (stderr, "%s \n", KRED); if (type == 3) fprintf (stderr, "%s", KRED); fprintf (stderr, " SLOT %d", state->currentslot+1); - fprintf (stderr, " CapMax?"); + fprintf (stderr, " Motorola"); + unk = 1; + goto END_FLCO; + } + + //7.1.1.1 Terminator Data Link Control PDU - ETSI TS 102 361-3 V1.2.1 (2013-07) + if (type == 2 && flco == 0x30) + { + fprintf (stderr, "%s \n", KRED); + fprintf (stderr, " SLOT %d", state->currentslot+1); + fprintf (stderr, " Data Terminator (TD_LC)"); + goto END_FLCO; + } + + //Unknown Tait Things + if (fid == 0x58) + { + //NOTE: fid 0x58 (tait) had a single flco 0x06 emb observed, but without the other blocks (4,5,7) for an alias + //will need to observe this one, or just remove it from the list, going to isolate tait lc for now + if (type == 1) fprintf (stderr, "%s \n", KRED); + if (type == 2) fprintf (stderr, "%s \n", KRED); + if (type == 3) fprintf (stderr, "%s", KRED); + fprintf (stderr, " SLOT %d", state->currentslot+1); + fprintf (stderr, " Tait"); unk = 1; goto END_FLCO; } //unknown other manufacturer or OTA ENC, etc. - if (fid != 0 && fid != 0x58 && fid != 0x68 && fid != 0x10) + if (fid != 0 && fid != 0x68 && fid != 0x10) //removed tait from the list { if (type == 1) fprintf (stderr, "%s \n", KRED); if (type == 2) fprintf (stderr, "%s \n", KRED); @@ -302,10 +326,6 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C fprintf(stderr, "Call "); - // fprintf (stderr, "%s", KRED); - // if (CRCCorrect == 1) ; //fprintf(stderr, "(CRC OK)"); //CRCCorrect 1 is good, else is bad CRC; no print on good - // else if(IrrecoverableErrors == 0) ; //fprintf(stderr, "(FEC OK)"); - // else fprintf(stderr, "(FEC ERR) "); //check Cap+ rest channel info if available and good fec if (is_cap_plus == 1) @@ -353,7 +373,8 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C END_FLCO: if (unk == 1 || pf == 1) { - fprintf(stderr, " FLCO=0x%02X FID=0x%02X SVC=0x%02X ", flco, fid, so); + // fprintf(stderr, " FLCO=0x%02X FID=0x%02X SVC=0x%02X ", flco, fid, so); + fprintf(stderr, " FLCO=0x%02X FID=0x%02X ", flco, fid); //not all LC PDUs contain SVC bits (see TD_LC) fprintf (stderr, "%s", KNRM); }