Version 6.5.6

This commit is contained in:
Chrystian Huot 2022-09-19 07:35:40 -04:00
parent 2e772c0e1e
commit af41604322
18 changed files with 198 additions and 152 deletions

View file

@ -43,6 +43,12 @@ _v6.5.5_
- Fixed concurrent map read and map write on dirwatch. - Fixed concurrent map read and map write on dirwatch.
_v6.5.6_
- Fixed Clients lockup by removing mutex on some unecessary Clients methods.
- Better `DSDPlus Fast Lane` parser. Tested with `ConP(BS)`, `DMR(BS)`, `NEXEDGE48(CS)`, `NEXEDGE48(CB)`, `NEXEDGE48(TB)`, `NEXEDGE96(CB)`, `NEXEDGE96(CS)`, `NEXEDGE96(TB)`, `P25(BS)` and `P25`.
- Fixed unit aliases not displaying on the main screen under certain circumstances.
## Version 6.4 ## Version 6.4
- New `-cmd` command line options to allow advanced administrative tasks. - New `-cmd` command line options to allow advanced administrative tasks.

View file

@ -27,13 +27,13 @@ Clone the official repository on your computer and start the build process.
When finished, you will find the precompiled versions for various platforms in the `dist` folder. When finished, you will find the precompiled versions for various platforms in the `dist` folder.
rdio-scanner-darwin-amd64-v6.5.5.zip rdio-scanner-darwin-amd64-v6.5.6.zip
rdio-scanner-darwin-arm64-v6.5.5.zip rdio-scanner-darwin-arm64-v6.5.6.zip
rdio-scanner-freebsd-amd64-v6.5.5.zip rdio-scanner-freebsd-amd64-v6.5.6.zip
rdio-scanner-linux-386-v6.5.5.zip rdio-scanner-linux-386-v6.5.6.zip
rdio-scanner-linux-amd64-v6.5.5.zip rdio-scanner-linux-amd64-v6.5.6.zip
rdio-scanner-linux-arm64-v6.5.5.zip rdio-scanner-linux-arm64-v6.5.6.zip
rdio-scanner-linux-arm-v6.5.5.zip rdio-scanner-linux-arm-v6.5.6.zip
rdio-scanner-windows-amd64-v6.5.5.zip rdio-scanner-windows-amd64-v6.5.6.zip
**Happy Rdio scanning !** **Happy Rdio scanning !**

View file

@ -16,8 +16,8 @@
################################################################################ ################################################################################
app := rdio-scanner app := rdio-scanner
date := 2022/09/12 date := 2022/09/19
ver := 6.5.5 ver := 6.5.6
client := $(wildcard client/*.json client/*.ts) client := $(wildcard client/*.json client/*.ts)
server := $(wildcard server/*.go) server := $(wildcard server/*.go)

View file

@ -1,12 +1,12 @@
{ {
"name": "rdio-scanner", "name": "rdio-scanner",
"version": "6.5.5", "version": "6.5.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "rdio-scanner", "name": "rdio-scanner",
"version": "6.5.5", "version": "6.5.6",
"license": "LICENSE", "license": "LICENSE",
"dependencies": { "dependencies": {
"@angular/animations": "^13.3.10", "@angular/animations": "^13.3.10",

View file

@ -38,5 +38,5 @@
"build": "ng build --base-href ./ --configuration production", "build": "ng build --base-href ./ --configuration production",
"start": "ng serve" "start": "ng serve"
}, },
"version": "6.5.5" "version": "6.5.6"
} }

View file

@ -59,10 +59,10 @@
<p> <p>
<span class="mat-body">Directory</span><br> <span class="mat-body">Directory</span><br>
<span class="mat-caption"> <span class="mat-caption">
Path of a Path of the
<ng-container [ngSwitch]="dirWatch.get('type')?.value"> <ng-container [ngSwitch]="dirWatch.get('type')?.value">
<ng-container *ngSwitchCase="'dsdplus'"> <ng-container *ngSwitchCase="'dsdplus'">
<b>1R-Record</b> <b>Record</b>, <b>1R-Record</b> or <b>VC-Record</b>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'sdr-trunk'"> <ng-container *ngSwitchCase="'sdr-trunk'">
<b>Recordings</b> <b>Recordings</b>
@ -120,7 +120,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<div class="row" *ngIf="['default'].includes(dirWatch.get('type')?.value)"> <div class="row" *ngIf="['default','dsdplus'].includes(dirWatch.get('type')?.value)">
<p> <p>
<span class="mat-body">Talkgroup</span><br> <span class="mat-body">Talkgroup</span><br>
<span class="mat-caption">Talkgroup to where the audio files should go.</span> <span class="mat-caption">Talkgroup to where the audio files should go.</span>

View file

@ -537,7 +537,7 @@ export class RdioScannerMainComponent implements OnDestroy, OnInit {
private updateDisplay(time = this.callTime): void { private updateDisplay(time = this.callTime): void {
if (this.call) { if (this.call) {
let isAfs = this.isAfsSystem(this.call.system); const isAfs = this.isAfsSystem(this.call.system);
this.callProgress = new Date(this.call.dateTime); this.callProgress = new Date(this.call.dateTime);
this.callProgress.setSeconds(this.callProgress.getSeconds() + time); this.callProgress.setSeconds(this.callProgress.getSeconds() + time);
@ -581,9 +581,7 @@ export class RdioScannerMainComponent implements OnDestroy, OnInit {
this.callTalkgroupId = isAfs ? this.formatAfs(this.call.talkgroup) : this.call.talkgroup.toString(); this.callTalkgroupId = isAfs ? this.formatAfs(this.call.talkgroup) : this.call.talkgroup.toString();
if (typeof source.src === 'number' && Array.isArray(this.call.systemData?.units)) { if (typeof source.src === 'number' && Array.isArray(this.call.systemData?.units)) {
const callUnit = this.call?.systemData?.units?.find((u) => u.id === source.src); this.callUnit = this.call.systemData?.units?.find((u) => u.id === source.src)?.label ?? `${source.src}`;
this.callUnit = callUnit ? callUnit.label : `${source.src}`;
} else { } else {
this.callUnit = typeof this.call.source === 'number' ? `${this.call.source}` : ''; this.callUnit = typeof this.call.source === 'number' ? `${this.call.source}` : '';
@ -592,7 +590,7 @@ export class RdioScannerMainComponent implements OnDestroy, OnInit {
} else { } else {
this.callTalkgroupId = isAfs ? this.formatAfs(this.call.talkgroup) : this.call.talkgroup.toString(); this.callTalkgroupId = isAfs ? this.formatAfs(this.call.talkgroup) : this.call.talkgroup.toString();
this.callUnit = typeof this.call.source === 'number' ? `${this.call.source}` : ''; this.callUnit = this.call.systemData?.units?.find((u) => u.id === this.call?.source)?.label ?? `${this.call.source ?? ''}`;
} }
if ( if (

View file

@ -736,8 +736,8 @@ export class RdioScannerService implements OnDestroy {
} }
private cleanQueue(): void { private cleanQueue(): void {
let isActive = (call: RdioScannerCall) => { const isActive = (call: RdioScannerCall) => {
let lfm = (sys: number, tg: number): boolean => this.livefeedMap && this.livefeedMap[sys] && this.livefeedMap[sys][tg]?.active; const lfm = (sys: number, tg: number): boolean => this.livefeedMap && this.livefeedMap[sys] && this.livefeedMap[sys][tg]?.active;
let active = lfm(call.system, call.talkgroup); let active = lfm(call.system, call.talkgroup);
if (!active && Array.isArray(call.patches)) { if (!active && Array.isArray(call.patches)) {
for (let i = 0; i < call.patches.length; i++) { for (let i = 0; i < call.patches.length; i++) {
@ -856,8 +856,8 @@ export class RdioScannerService implements OnDestroy {
switch (message[0]) { switch (message[0]) {
case WebsocketCommand.Call: case WebsocketCommand.Call:
if (message[1] !== null) { if (message[1] !== null) {
let call: RdioScannerCall = message[1]; const call: RdioScannerCall = message[1];
let flag: string = message[2]; const flag: string = message[2];
if (flag === WebsocketCallFlag.Download) { if (flag === WebsocketCallFlag.Download) {
this.download(message[1]); this.download(message[1]);
@ -948,12 +948,12 @@ export class RdioScannerService implements OnDestroy {
break; break;
case WebsocketCommand.Version: case WebsocketCommand.Version: {
var data = message[1]; const data = message[1];
if (data !== null && typeof data === 'object') { if (data !== null && typeof data === 'object') {
var branding = data['branding']; const branding = data['branding'];
var email = data['email']; const email = data['email'];
if (typeof branding === 'string') { if (typeof branding === 'string') {
this.config.branding = branding; this.config.branding = branding;
@ -972,6 +972,7 @@ export class RdioScannerService implements OnDestroy {
} }
} }
} }
}
private playbackNextCall(): void { private playbackNextCall(): void {
if (this.call || this.livefeedMode !== RdioScannerLivefeedMode.Playback || !this.playbackList || this.playbackPending) { if (this.call || this.livefeedMode !== RdioScannerLivefeedMode.Playback || !this.playbackList || this.playbackPending) {
@ -1117,7 +1118,9 @@ export class RdioScannerService implements OnDestroy {
this.livefeedMap[+sys][+tg].active = lfm[sys][tg]; this.livefeedMap[+sys][+tg].active = lfm[sys][tg];
}); });
}); });
} catch (_) { } } catch (_) {
//
}
} }
private sendtoWebsocket(command: string, payload?: unknown, flags?: string): void { private sendtoWebsocket(command: string, payload?: unknown, flags?: string): void {

View file

@ -53,12 +53,12 @@ $ docker run --detach --env TZ=America/Toronto --name rdio-scanner --publish 300
520cdbf51fca11d8bacea12d81245f1cb4d984f80d2be2e3039727b59533a6a9 520cdbf51fca11d8bacea12d81245f1cb4d984f80d2be2e3039727b59533a6a9
$ docker logs rdio-scanner $ docker logs rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 08:57:23 server started 2022/09/19 08:57:23 server started
2022/09/12 08:57:23 base folder is /app/data 2022/09/19 08:57:23 base folder is /app/data
2022/09/12 08:57:23 main interface at http://6d87e8dc37a0:3000 2022/09/19 08:57:23 main interface at http://6d87e8dc37a0:3000
2022/09/12 08:57:23 admin interface at http://6d87e8dc37a0:3000/admin 2022/09/19 08:57:23 admin interface at http://6d87e8dc37a0:3000/admin
``` ```
You can also use docker-compose to start the server with this simple `docker-compose.yml`: You can also use docker-compose to start the server with this simple `docker-compose.yml`:

View file

@ -43,8 +43,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@macos ~ % mkdir rdio-scanner rdio@macos ~ % mkdir rdio-scanner
rdio@macos ~ % cd rdio-scanner rdio@macos ~ % cd rdio-scanner
rdio@macos rdio-scanner % unzip \ rdio@macos rdio-scanner % unzip \
> ~/Downloads/rdio-scanner-darwin-arm64-v6.5.5.zip > ~/Downloads/rdio-scanner-darwin-arm64-v6.5.6.zip
Archive: /Users/rdio/Downloads/rdio-scanner-darwin-arm64-v6.5.5.zip Archive: /Users/rdio/Downloads/rdio-scanner-darwin-arm64-v6.5.6.zip
inflating: rdio-scanner inflating: rdio-scanner
inflating: rdio-scanner.pdf inflating: rdio-scanner.pdf
@ -52,11 +52,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@macos rdio-scanner % ./rdio-scanner rdio@macos rdio-scanner % ./rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 08:38:06 server started 2022/09/19 08:38:06 server started
2022/09/12 08:38:06 main interface at http://macos.local:3000 2022/09/19 08:38:06 main interface at http://macos.local:3000
2022/09/12 08:38:06 admin interface at http://macos.local:3000/admin 2022/09/19 08:38:06 admin interface at http://macos.local:3000/admin
4. Access the administrative dashboard to finalize the configuration. 4. Access the administrative dashboard to finalize the configuration.
@ -78,11 +78,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
rdio@macos rdio-scanner % ./rdio-scanner --listen :80 rdio@macos rdio-scanner % ./rdio-scanner --listen :80
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 08:48:03 server started 2022/09/19 08:48:03 server started
2022/09/12 08:48:03 main interface at http://macos.local 2022/09/19 08:48:03 main interface at http://macos.local
2022/09/12 08:48:03 admin interface at http://macos.local/admin 2022/09/19 08:48:03 admin interface at http://macos.local/admin
## Listening on a SSL port ## Listening on a SSL port
@ -96,12 +96,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
> -ssl_key_file mykey.key \ > -ssl_key_file mykey.key \
> -ssl_listen :443 > -ssl_listen :443
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 08:50:58 server started 2022/09/19 08:50:58 server started
2022/09/12 08:50:58 main interface at http://macos.local 2022/09/19 08:50:58 main interface at http://macos.local
2022/09/12 08:50:58 main interface at https://macos.local 2022/09/19 08:50:58 main interface at https://macos.local
2022/09/12 08:50:58 admin interface at https://macos.local/admin 2022/09/19 08:50:58 admin interface at https://macos.local/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal. If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -119,7 +119,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_auto_cert mydomain.com \ > -ssl_auto_cert mydomain.com \
> -ssl_listen :443 \ > -ssl_listen :443 \
> -config_save > -config_save
2022/09/12 08:52:24 rdio-scanner.ini file created 2022/09/19 08:52:24 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list. All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -133,12 +133,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
rdio@macos rdio-scanner % ./rdio-scanner rdio@macos rdio-scanner % ./rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 08:54:08 server started 2022/09/19 08:54:08 server started
2022/09/12 08:54:08 main interface at http://macos.local 2022/09/19 08:54:08 main interface at http://macos.local
2022/09/12 08:54:08 main interface at https://macos.local 2022/09/19 08:54:08 main interface at https://macos.local
2022/09/12 08:54:08 admin interface at https://macos.local/admin 2022/09/19 08:54:08 admin interface at https://macos.local/admin
## Install Rdio Scanner as a service ## Install Rdio Scanner as a service

View file

@ -43,8 +43,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@pc-freebsd:~ $ mkdir rdio-scanner rdio@pc-freebsd:~ $ mkdir rdio-scanner
rdio@pc-freebsd:~ $ cd rdio-scanner rdio@pc-freebsd:~ $ cd rdio-scanner
rdio@pc-freebsd:~/rdio-scanner $ unzip \ rdio@pc-freebsd:~/rdio-scanner $ unzip \
> ~/rdio-scanner-freebsd-amd64-v6.5.5.zip > ~/rdio-scanner-freebsd-amd64-v6.5.6.zip
Archive: ../rdio-scanner-freebsd-amd64-v6.5.5.zip Archive: ../rdio-scanner-freebsd-amd64-v6.5.6.zip
extracting: rdio-scanner extracting: rdio-scanner
extracting: rdio-scanner.pdf extracting: rdio-scanner.pdf
@ -52,11 +52,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
rdio@pc-freebsd:~/rdio-scanner $ ./rdio-scanner rdio@pc-freebsd:~/rdio-scanner $ ./rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 08:16:36 server started 2022/09/19 08:16:36 server started
2022/09/12 08:16:36 main interface at http://pc-freebsd:3000 2022/09/19 08:16:36 main interface at http://pc-freebsd:3000
2022/09/12 08:16:36 admin interface at http://pc-freebsd:3000/admin 2022/09/19 08:16:36 admin interface at http://pc-freebsd:3000/admin
4. Access the administrative dashboard to finalize the configuration. 4. Access the administrative dashboard to finalize the configuration.
@ -82,11 +82,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
Password: Password:
root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner -listen :80 root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner -listen :80
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 08:19:38 server started 2022/09/19 08:19:38 server started
2022/09/12 08:19:38 main interface at http://pc-freebsd 2022/09/19 08:19:38 main interface at http://pc-freebsd
2022/09/12 08:19:38 admin interface at http://pc-freebsd/admin 2022/09/19 08:19:38 admin interface at http://pc-freebsd/admin
## Listening on a SSL port ## Listening on a SSL port
@ -102,12 +102,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
> -ssl_key_file mykey.key \ > -ssl_key_file mykey.key \
> -ssl_listen :443 > -ssl_listen :443
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 10:34:29 server started 2022/09/19 10:34:29 server started
2022/09/12 10:34:29 main interface at http://pc-freebsd 2022/09/19 10:34:29 main interface at http://pc-freebsd
2022/09/12 10:34:29 main interface at https://pc-freebsd 2022/09/19 10:34:29 main interface at https://pc-freebsd
2022/09/12 10:34:29 admin interface at https://pc-freebsd/admin 2022/09/19 10:34:29 admin interface at https://pc-freebsd/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal. If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -127,7 +127,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_auto_cert mydomain.com \ > -ssl_auto_cert mydomain.com \
> -ssl_listen :443 \ > -ssl_listen :443 \
> -config_save > -config_save
2022/09/12 10:37:00 rdio-scanner.ini file created 2022/09/19 10:37:00 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list. All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -143,12 +143,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
Password: Password:
root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner root@pc-freebsd:/home/rdio/rdio-scanner # ./rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 10:38:28 server started 2022/09/19 10:38:28 server started
2022/09/12 10:38:29 main interface at http://pc-freebsd 2022/09/19 10:38:29 main interface at http://pc-freebsd
2022/09/12 10:38:29 main interface at https://pc-freebsd 2022/09/19 10:38:29 main interface at https://pc-freebsd
2022/09/12 10:38:29 admin interface at https://pc-freebsd/admin 2022/09/19 10:38:29 admin interface at https://pc-freebsd/admin
## Install Rdio Scanner as a service ## Install Rdio Scanner as a service

View file

@ -43,8 +43,8 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
[rdio@pc-linux ~]$ mkdir rdio-scanner [rdio@pc-linux ~]$ mkdir rdio-scanner
[rdio@pc-linux ~]$ cd rdio-scanner [rdio@pc-linux ~]$ cd rdio-scanner
[rdio@pc-linux rdio-scanner]$ unzip \ [rdio@pc-linux rdio-scanner]$ unzip \
> ~/Downloads/rdio-scanner-linux-amd64-v6.5.5.zip > ~/Downloads/rdio-scanner-linux-amd64-v6.5.6.zip
Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.5.5.zip Archive: /home/rdio/Downloads/rdio-scanner-linux-amd64-v6.5.6.zip
inflating: rdio-scanner inflating: rdio-scanner
inflating: rdio-scanner.pdf inflating: rdio-scanner.pdf
@ -52,11 +52,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
[rdio@pc-linux rdio-scanner]$ ./rdio-scanner [rdio@pc-linux rdio-scanner]$ ./rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 09:11:48 server started 2022/09/19 09:11:48 server started
2022/09/12 09:11:48 main interface at http://pc-linux:3000 2022/09/19 09:11:48 main interface at http://pc-linux:3000
2022/09/12 09:11:48 admin interface at http://pc-linux:3000/admin 2022/09/19 09:11:48 admin interface at http://pc-linux:3000/admin
4. Access the administrative dashboard to finalize the configuration. 4. Access the administrative dashboard to finalize the configuration.
@ -79,11 +79,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
[rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner -listen :80 [rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner -listen :80
[sudo] password for rdio: [sudo] password for rdio:
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 09:14:00 server started 2022/09/19 09:14:00 server started
2022/09/12 09:14:00 main interface at http://pc-linux 2022/09/19 09:14:00 main interface at http://pc-linux
2022/09/12 09:14:00 admin interface at http://pc-linux/admin 2022/09/19 09:14:00 admin interface at http://pc-linux/admin
## Listening on a SSL port ## Listening on a SSL port
@ -98,12 +98,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
> -ssl_listen :443 > -ssl_listen :443
[sudo] password for rdio: [sudo] password for rdio:
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 09:16:47 server started 2022/09/19 09:16:47 server started
2022/09/12 09:16:47 main interface at http://pc-linux 2022/09/19 09:16:47 main interface at http://pc-linux
2022/09/12 09:16:47 main interface at https://pc-linux 2022/09/19 09:16:47 main interface at https://pc-linux
2022/09/12 09:16:47 admin interface at https://pc-linux/admin 2022/09/19 09:16:47 admin interface at https://pc-linux/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal. If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -121,7 +121,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
> -ssl_auto_cert mydomain.com \ > -ssl_auto_cert mydomain.com \
> -ssl_listen :443 \ > -ssl_listen :443 \
> -config_save > -config_save
2022/09/12 09:19:29 rdio-scanner.ini file created 2022/09/19 09:19:29 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list. All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -136,12 +136,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
[rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner [rdio@pc-linux rdio-scanner]$ sudo ./rdio-scanner
[sudo] Mot de passe de rdio : [sudo] Mot de passe de rdio :
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 09:20:40 server started 2022/09/19 09:20:40 server started
2022/09/12 09:20:40 main interface at http://pc-linux 2022/09/19 09:20:40 main interface at http://pc-linux
2022/09/12 09:20:40 main interface at https://pc-linux 2022/09/19 09:20:40 main interface at https://pc-linux
2022/09/12 09:20:40 admin interface at https://pc-linux/admin 2022/09/19 09:20:40 admin interface at https://pc-linux/admin
## Install Rdio Scanner as a service ## Install Rdio Scanner as a service

View file

@ -45,7 +45,7 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
C:\Users\rdio> cd rdio-scanner C:\Users\rdio> cd rdio-scanner
C:\Users\rdio\rdio-scanner> tar -xvf ^ C:\Users\rdio\rdio-scanner> tar -xvf ^
..\downloads\rdio-scanner-windows-amd64-v6.5.5.zip ..\downloads\rdio-scanner-windows-amd64-v6.5.6.zip
x rdio-scanner.exe x rdio-scanner.exe
x rdio-scanner.pdf x rdio-scanner.pdf
@ -53,11 +53,11 @@ ALWAYS DOWNLOAD THE LATEST VERSION OF [RDIO SCANNER](https://github.com/chuot/rd
C:\Users\rdio\rdio-scanner>rdio-scanner C:\Users\rdio\rdio-scanner>rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 13:48:48 server started 2022/09/19 13:48:48 server started
2022/09/12 13:48:48 main interface at http://pc-windows:3000 2022/09/19 13:48:48 main interface at http://pc-windows:3000
2022/09/12 13:48:48 admin interface at http://pc-windows:3000/admin 2022/09/19 13:48:48 admin interface at http://pc-windows:3000/admin
4. Access the administrative dashboard to finalize the configuration. 4. Access the administrative dashboard to finalize the configuration.
@ -79,11 +79,11 @@ Here we want our [Rdio Scanner](https://guthub.com/chuot/rdio-scanner) instance
C:\Users\rdio\rdio-scanner>rdio-scanner -listen :80 C:\Users\rdio\rdio-scanner>rdio-scanner -listen :80
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 10:53:31 server started 2022/09/19 10:53:31 server started
2022/09/12 10:53:31 main interface at http://pc-windows 2022/09/19 10:53:31 main interface at http://pc-windows
2022/09/12 10:53:31 admin interface at http://pc-windows/admin 2022/09/19 10:53:31 admin interface at http://pc-windows/admin
## Listening on a SSL port ## Listening on a SSL port
@ -97,12 +97,12 @@ You can use your own SSL certificates that match your domain name with `-ssl_cer
-ssl_key_file meykey.key ^ -ssl_key_file meykey.key ^
-ssl_listen :443 -ssl_listen :443
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 11:05:43 server started 2022/09/19 11:05:43 server started
2022/09/12 11:05:43 main interface at http://pc-windows 2022/09/19 11:05:43 main interface at http://pc-windows
2022/09/12 11:05:43 main interface at https://pc-windows 2022/09/19 11:05:43 main interface at https://pc-windows
2022/09/12 11:05:43 admin interface at https://pc-windows/admin 2022/09/19 11:05:43 admin interface at https://pc-windows/admin
If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal. If you don't want to worry about SSL certificates, you can use the built-in Let's Encrypt auto-cert feature. This requires that you have both port 80 (HTTP) and port 443 (HTTPS) open to the world. Also, your domain name should point to your IP address where [Rdio Scanner](https://github.com/chuot/rdio-scanner/) is running. The advantage of this approach is that everything is done automatically, no certificate request, no certificate renewal.
@ -120,7 +120,7 @@ You don't want to have to type everytime a long list of arguments. No problem, y
-ssl_auto_cert mydomain.com ^ -ssl_auto_cert mydomain.com ^
-ssl_listen :443 ^ -ssl_listen :443 ^
-config_save -config_save
2022/09/12 11:08:28 rdio-scanner.ini file created 2022/09/19 11:08:28 rdio-scanner.ini file created
All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list. All of your parameters passed as arguments to [Rdio Scanner](https://github.com/chuot/rdio-scanner) have been saved to an INI file which has the same arguments/values list.
@ -134,12 +134,12 @@ Then simply run [Rdio Scanner](https://github.com/chuot/rdio-scanner) without an
C:\Users\rdio\rdio-scanner>rdio-scanner C:\Users\rdio\rdio-scanner>rdio-scanner
Rdio Scanner v6.5.5 Rdio Scanner v6.5.6
---------------------------------- ----------------------------------
2022/09/12 11:11:28 server started 2022/09/19 11:11:28 server started
2022/09/12 11:11:28 main interface at http://pc-windows 2022/09/19 11:11:28 main interface at http://pc-windows
2022/09/12 11:11:28 main interface at https://pc-windows 2022/09/19 11:11:28 main interface at https://pc-windows
2022/09/12 11:11:28 admin interface at https://pc-windows/admin 2022/09/19 11:11:28 admin interface at https://pc-windows/admin
\pagebreak{} \pagebreak{}

View file

@ -218,9 +218,6 @@ func NewClients() *Clients {
} }
func (clients *Clients) AccessCount(client *Client) int { func (clients *Clients) AccessCount(client *Client) int {
clients.mutex.Lock()
defer clients.mutex.Unlock()
count := 0 count := 0
for c := range clients.Map { for c := range clients.Map {
@ -240,16 +237,10 @@ func (clients *Clients) Add(client *Client) {
} }
func (clients *Clients) Count() int { func (clients *Clients) Count() int {
clients.mutex.Lock()
defer clients.mutex.Unlock()
return len(clients.Map) return len(clients.Map)
} }
func (clients *Clients) EmitCall(call *Call, restricted bool) { func (clients *Clients) EmitCall(call *Call, restricted bool) {
clients.mutex.Lock()
defer clients.mutex.Unlock()
for c := range clients.Map { for c := range clients.Map {
if (!restricted || c.Access.HasAccess(call)) && c.Livefeed.IsEnabled(call) { if (!restricted || c.Access.HasAccess(call)) && c.Livefeed.IsEnabled(call) {
c.Send <- &Message{Command: MessageCommandCall, Payload: call} c.Send <- &Message{Command: MessageCommandCall, Payload: call}
@ -258,9 +249,6 @@ func (clients *Clients) EmitCall(call *Call, restricted bool) {
} }
func (clients *Clients) EmitConfig(groups *Groups, options *Options, systems *Systems, tags *Tags, restricted bool) { func (clients *Clients) EmitConfig(groups *Groups, options *Options, systems *Systems, tags *Tags, restricted bool) {
clients.mutex.Lock()
defer clients.mutex.Unlock()
count := len(clients.Map) count := len(clients.Map)
for c := range clients.Map { for c := range clients.Map {
@ -277,9 +265,6 @@ func (clients *Clients) EmitConfig(groups *Groups, options *Options, systems *Sy
} }
func (clients *Clients) EmitListenersCount() { func (clients *Clients) EmitListenersCount() {
clients.mutex.Lock()
defer clients.mutex.Unlock()
count := len(clients.Map) count := len(clients.Map)
for c := range clients.Map { for c := range clients.Map {

View file

@ -91,6 +91,7 @@ var defaults Defaults = Defaults{
"Fire", "Fire",
"Interop", "Interop",
"Law", "Law",
"Unknown",
}, },
keypadBeeps: "uniden", keypadBeeps: "uniden",
options: DefaultOptions{ options: DefaultOptions{
@ -119,5 +120,6 @@ var defaults Defaults = Defaults{
"Interop", "Interop",
"Security", "Security",
"Service", "Service",
"Untagged",
}, },
} }

View file

@ -250,6 +250,11 @@ func (dirwatch *Dirwatch) ingestDSDPlus(p string) error {
call.System = v call.System = v
} }
switch v := dirwatch.TalkgroupId.(type) {
case uint:
call.Talkgroup = v
}
if call.Audio, err = os.ReadFile(p); err != nil { if call.Audio, err = os.ReadFile(p); err != nil {
return err return err
} }

View file

@ -18,6 +18,7 @@ package main
import ( import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt"
"mime" "mime"
"mime/multipart" "mime/multipart"
"path" "path"
@ -33,6 +34,23 @@ import (
func ParseDSDPlusMeta(call *Call, fp string) error { func ParseDSDPlusMeta(call *Call, fp string) error {
dir := filepath.Dir(fp) dir := filepath.Dir(fp)
base := strings.TrimSuffix(filepath.Base(fp), filepath.Ext(fp)) base := strings.TrimSuffix(filepath.Base(fp), filepath.Ext(fp))
meta := []string{""}
lbl := false
ptr := 0
for i := 0; i < len(base); i++ {
if base[i] == '[' {
lbl = true
} else if base[i] == ']' {
lbl = false
}
if !lbl && base[i] == '_' {
ptr++
meta = append(meta, "")
} else {
meta[ptr] += string(base[i])
}
}
if d := regexp.MustCompile(`([0-9]+)$`).FindStringSubmatch(dir); len(d) == 2 && len(d[1]) == 8 { if d := regexp.MustCompile(`([0-9]+)$`).FindStringSubmatch(dir); len(d) == 2 && len(d[1]) == 8 {
if t := regexp.MustCompile(`^([0-9]+)`).FindStringSubmatch(base); len(t) == 2 && len(t[1]) == 6 { if t := regexp.MustCompile(`^([0-9]+)`).FindStringSubmatch(base); len(t) == 2 && len(t[1]) == 6 {
@ -52,35 +70,64 @@ func ParseDSDPlusMeta(call *Call, fp string) error {
} }
} }
if s := regexp.MustCompile(`^[0-9]+_[0-9]+_[^_]+_([0-9]+)-([0-9]+)_`).FindStringSubmatch(base); len(s) == 3 { if len(meta) > 3 {
if sys, err := strconv.Atoi(s[1]); err == nil && sys > 0 { switch meta[2] {
call.System = uint(sys) case "ConP(BS)", "DMR(BS)", "P25(BS)":
if s := regexp.MustCompile(`^([0-9]+)-.+$`).FindStringSubmatch(meta[3]); len(s) > 1 {
if i, err := strconv.Atoi(s[1]); err == nil {
call.System = uint(i)
} }
} }
tu := regexp.MustCompile(`([0-9]+)_([0-9]+)$|([0-9]+)_([0-9]+)\[([^\]]*)\]$`).FindStringSubmatch(base) case "NEXEDGE48(CB)", "NEXEDGE48(CS)", "NEXEDGE48(TB)", "NEXEDGE96(CB)", "NEXEDGE96(CS)", "NEXEDGE96(TB)":
if s := regexp.MustCompile(`^.([0-9]+)-[0-9]+$`).FindStringSubmatch(meta[3]); len(s) > 1 {
if len(tu[3]) > 0 { if i, err := strconv.Atoi(s[1]); err == nil && i > 0 {
tu[1] = tu[3] call.System = uint(i)
} }
if len(tu[4]) > 0 { } else if len(meta) > 4 {
tu[2] = tu[4] if s := regexp.MustCompile(`RAN([0-9]+)`).FindStringSubmatch(meta[4]); len(s) > 1 {
if i, err := strconv.Atoi(s[1]); err == nil && i > 0 {
call.System = uint(i)
}
}
} }
if tg, err := strconv.Atoi(tu[1]); err == nil && tg > 0 { case "P25":
call.Talkgroup = uint(tg) if s := regexp.MustCompile(`^[^\.]+\.([^-]+)`).FindStringSubmatch(meta[3]); len(s) > 1 {
if src, err := strconv.Atoi(tu[2]); err == nil && src > 0 { if i, err := strconv.ParseInt(s[1], 16, 64); err == nil && i > 0 {
call.System = uint(i)
}
}
}
}
if s := regexp.MustCompile(`[^\[\]]+`).FindAllString(meta[len(meta)-2], -1); len(s) > 0 {
if i, err := strconv.Atoi(s[0]); err == nil && i > 0 {
call.Talkgroup = uint(i)
}
if len(s) > 1 && len(s[1]) > 0 {
if !regexp.MustCompile(`^([\.\-\ ,_]+)$`).MatchString(s[1]) {
call.talkgroupLabel = s[1]
}
}
}
if s := regexp.MustCompile(`[^\[\]]+`).FindAllString(meta[len(meta)-1], -1); len(s) > 0 {
if src, err := strconv.Atoi(s[0]); err == nil && src > 0 {
call.Source = uint(src) call.Source = uint(src)
if len(tu[5]) > 0 && strings.TrimSpace(tu[5]) != strings.TrimSpace(tu[2]) { if len(s) > 1 && len(s[1]) > 0 {
if b := regexp.MustCompile(`^([\.\-\ ,_]+)$`).MatchString(tu[5]); !b { if strings.TrimSpace(s[1]) != fmt.Sprintf("%v", call.Source) {
if !regexp.MustCompile(`^([\.\-\ ,_]+)$`).MatchString(s[1]) {
units := NewUnits() units := NewUnits()
units.Add(uint(src), tu[5]) units.Add(uint(src), strings.TrimSpace(s[1]))
call.units = units call.units = units
} }
} }
} }
} }
}
return nil return nil
} }

View file

@ -15,4 +15,4 @@
package main package main
const Version = "6.5.5" const Version = "6.5.6"