Minor DMR Trunk/Site Tweaks; Update Readme w demo;

This commit is contained in:
lwvmobile 2022-12-17 23:39:45 -05:00
parent 57e3f518dd
commit 4946897914
6 changed files with 36 additions and 12 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
*.dylib
build
*.sh
*.csv

View File

@ -1,5 +1,9 @@
## WARNING! The DEV branch may have broken or incomplete features, changes in Menu or CLI options, and other quirks. USE AT YOUR OWN RISK!
Click image below for video of current DMR/P25 trunking capabilities.
[![DSD-FME](https://github.com/lwvmobile/dsd-fme/blob/dev/dsd-fme.png)](https://www.youtube.com/watch?v=hGIijBbbUxg "DSD-FME Trunking Demo")
If you want to checkout and build this branch (for testing purposes) ignore the automatic scripts and instructions further down below, run these steps instead
Download and Install the dependencies if you don't already have them (Debian/Ubuntu/Mint/Pi)
@ -235,8 +239,6 @@ To see the up to date CLI options, please look at the help options with the -h C
## 2022.08.12 Update ##
A new menu system has been introduced in the NCURSES Terminal. Also includes support for LRRP to text file type of choice and reading OP25 symbol capture bin files.
[![DSD-FME](https://github.com/lwvmobile/dsd-fme/blob/dev/dsd-fme.png)](https://www.youtube.com/watch?v=TqTfAfaPJ4s "DSD-FME Update 2022.08.12")
To get started with the new menu system, simply launch with:
`dsd-fme -N 2> log.txt`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 706 KiB

View File

@ -253,10 +253,10 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
uint8_t par = (uint8_t)ConvertBitIntoBytes(&cs_pdu_bits[54], 2);
uint32_t target = (uint32_t)ConvertBitIntoBytes(&cs_pdu_bits[56], 24);
fprintf (stderr, " C_ALOHA_SYS_PARMS - %s - Net ID: %d Site ID: %d Par: %d \n Reg Req: %d V: %d MS: %d", model_str, net, site, par, regreq, version, target);
fprintf (stderr, " C_ALOHA_SYS_PARMS - %s - Net ID: %d Site ID: %d Par: %d \n Reg Req: %d V: %d MS: %d", model_str, net+1, site+1, par+1, regreq, version, target);
//add string for ncurses terminal display - no par since slc doesn't carrry that value
sprintf (state->dmr_site_parms, "TIII - %s N%d-S%d ", model_str, net, site);
//add string for ncurses terminal display
sprintf (state->dmr_site_parms, "TIII - %s %d-%d.%d ", model_str, net+1, site+1, par+1);
//if using rigctl we can set an unknown cc frequency by polling rigctl for the current frequency
if (opts->use_rigctl == 1 && state->p25_cc_freq == 0) //if not set from channel map 0
@ -274,6 +274,9 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
uint16_t syscode = (uint16_t)ConvertBitIntoBytes(&cs_pdu_bits[40], 16);
//nullify any previous branding sub (bugfix for naughty assignments or system type switching)
sprintf(state->dmr_branding_sub, "%s", "");
//debug print
//fprintf (stderr, "\n SYSCODE: %016b", syscode);
//fprintf (stderr, " Sys ID Code: [%04X]", sysidcode);
@ -382,10 +385,16 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
uint8_t par = (uint8_t)ConvertBitIntoBytes(&cs_pdu_bits[54], 2);
uint32_t parms2 = (uint32_t)ConvertBitIntoBytes(&cs_pdu_bits[56], 24);
fprintf (stderr, "\n");
fprintf (stderr, " C_BCAST_SYS_PARMS - %s - Net ID: %d Site ID: %d Par: %d ", model_str, net, site, par);
fprintf (stderr, " C_BCAST_SYS_PARMS - %s - Net ID: %d Site ID: %d Par: %d ", model_str, net+1, site+1, par+1);
uint16_t syscode = (uint16_t)ConvertBitIntoBytes(&cs_pdu_bits[40], 16);
//fprintf (stderr, "\n SYSCODE: %016b", syscode);
//add string for ncurses terminal display - This may set adjacent site info, so just do it out of Aloha
// sprintf (state->dmr_site_parms, "TIII - %s %d-%d.%d ", model_str, net+1, site+1, par+1);
//nullify any previous branding sub (bugfix for naughty assignments or system type switching)
sprintf(state->dmr_branding_sub, "%s", "");
}
if (csbk == 28)
@ -612,7 +621,7 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
//don't tune if currently a vc on the control channel
if ( (time(NULL) - state->last_vc_sync_time > 2) )
{
//need channel map frequencies and stuff, also way to figure out control channel frequency? (channel 0 from channel map?)
if (state->p25_cc_freq != 0 && opts->p25_trunk == 1 && (strcmp(mode, "B") != 0))
{
if (state->trunk_chan_map[lcn] != 0) //if we have a valid frequency

View File

@ -319,7 +319,8 @@ dmr_data_sync (dsd_opts * opts, dsd_state * state)
//con+ voice channels can have extremely long idle periods without properly tearing down
if (opts->p25_trunk == 1 && opts->p25_is_tuned == 1 && state->is_con_plus == 1)
{
if ( (time(NULL) - state->last_vc_sync_time > 3) )
//at 3 seconds, the CC was sending back to the VC even without voice present, increased to 5
if ( (time(NULL) - state->last_vc_sync_time > 5) )
{
if (opts->use_rigctl == 1) //rigctl tuning
{

View File

@ -453,21 +453,32 @@ void dmr_slco (dsd_opts * opts, dsd_state * state, uint8_t slco_bits[])
if (slco == 0x2) //C_SYS_Parms
{
fprintf (stderr, " C_SYS_PARMS - %s - Net ID: %d Site ID: %d - Reg Req: %d - CSC: %d ", model_str, net, site, reg, csc);
fprintf (stderr, " C_SYS_PARMS - %s - Net ID: %d Site ID: %d - Reg Req: %d - CSC: %d ", model_str, net+1, site+1, reg, csc);
//disabling so we can show the par information from the CSBK
//add string for ncurses terminal display - no par since slc doesn't carrry that value
sprintf (state->dmr_site_parms, "TIII - %s N%d-S%d ", model_str, net, site);
// sprintf (state->dmr_site_parms, "TIII - %s N%d-S%d ", model_str, net, site);
//if using rigctl we can set an unknown cc frequency by polling rigctl for the current frequency
if (opts->use_rigctl == 1 && state->p25_cc_freq == 0) //if not set from channel map 0
{
ccfreq = GetCurrentFreq (opts->rigctl_sockfd);
if (ccfreq != 0) state->p25_cc_freq = ccfreq;
}
//nullify any previous branding sub (bugfix for naughty assignments or system type switching)
sprintf(state->dmr_branding_sub, "%s", "");
}
else if (slco == 0x3) //P_SYS_Parms
{
fprintf (stderr, " P_SYS_PARMS - %s - Net ID: %d Site ID: %d - Comp Ch: %d ", model_str, net, site, reg);
fprintf (stderr, " P_SYS_PARMS - %s - Net ID: %d Site ID: %d - Comp Ch: %d ", model_str, net+1, site+1, reg);
//only asssign below if the field is empty, the CSBK version on CC will carry par
//add string for ncurses terminal display - no par since slc doesn't carrry that value
sprintf (state->dmr_site_parms, "TIII - %s N%d-S%d ", model_str, net, site);
if((strncmp(state->dmr_site_parms, "", 3) == 0)) sprintf (state->dmr_site_parms, "TIII - %s %d-%d ", model_str, net+1, site+1);
//nullify any previous branding sub (bugfix for naughty assignments or system type switching)
sprintf(state->dmr_branding_sub, "%s", "");
}
else if (slco == 0x0) //null
fprintf (stderr, " SLCO NULL ");