Scanner Screen: Free Open Source Software for Uniden Scanners

wbloss

Human
Database Admin
Joined
Dec 19, 2002
Messages
1,091
Location
Joplin MO
I'm getting a virus notification from Wondows on this one. Never had that before. Thoughts?
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
It’s clean sourceforge scans everything thing. Windows wants you to pay a few hundred dollars to them to get it signed. Maybe one day I will buy a certificate for it. It’s a ms tax.
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
Works perfect.
I might have to do a second $10 donation if it evolves at this rate.

/Ubbe
Thank you for the donation. I wish more people would do that as it makes you feel like what you are providing has value to someone. When I spend I will think about you. Thanks man
 

Ubbe

Member
Joined
Sep 8, 2006
Messages
9,516
Location
Stockholm, Sweden
Can you make some magic code to see to that it always leave 3 decimals, so that a 156.8 frequency will display as 156.800

1712358371648.png

/Ubbe
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
Can you make some magic code to see to that it always leave 3 decimals, so that a 156.8 frequency will display as 156.800

View attachment 159717

/Ubbe
Okay I made the changes here is what it does

1. Looks at string if it has a decimal then proceeds if not exits function
2. Checks to see if its a valid number if it is proceeds if not exits
3. Converts the string to a floating point
4. rounds it to 3 decimal places
5. Converts it back to a string

Try it out and let me know.

Just so you know I tired to get AI to build the function for me on gemini, chatgpt and claud3 and they all there could not make a working function. So I thought about it and said there is a much simpler way.

Let me know if its working.

I am glad AI does not drive my car around.

2.648 is the version
 

Ubbe

Member
Joined
Sep 8, 2006
Messages
9,516
Location
Stockholm, Sweden
I figured it would take some intricate coding to pull it off.

It now newer go more than 3 decimals and round the decimals off so that 422.24375 that are displayed as 422.2437 on the scanner are in ScannerScreen displayed as 422.244 and a 166.5125 frequency are displayed as 166.512, so it seems to make everything three decimals and not just the trailing zeros.

I wasn't clear enough what I wished for. I should have stated:
"Can you make some magic code to see to that it always leaves at least 3 decimals, so that a 156.8 frequency will display as 156.800 and only strip any trailing zeros that goes beyond 3 decimals"

I can have several ScannerScreen programs running at the same time so it seems they can coexists and use their own variables and hooks in windows and not interfere with each other, so that's a pleasant surprise.

One thing that happened with this new version are that there's some permission issues: ElnOutError/Access denied (C:\Program Files(x86)\Scanner Screen\SS20240406.TXT) If I switch to another harddrive for the logs that hasn't any user restrictions it works fine but in the previous versions it worked to store the logfile in that same program directory on C:

I deleted any old logfiles to be sure it wasn't an issue with overwrite permissions or similar problem but then it said I needed admin rights to delete them. So previous versions had admin rights when saving the logfile but now it has some lower category rights and not user rights so cannot use the program files folder to store logfiles. It isn't really an issue so perhaps safer to not let the program have admin rights.

/Ubbe
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
I figured it would take some intricate coding to pull it off.

It now newer go more than 3 decimals and round the decimals off so that 422.24375 that are displayed as 422.2437 on the scanner are in ScannerScreen displayed as 422.244 and a 166.5125 frequency are displayed as 166.512, so it seems to make everything three decimals and not just the trailing zeros.

I wasn't clear enough what I wished for. I should have stated:
"Can you make some magic code to see to that it always leaves at least 3 decimals, so that a 156.8 frequency will display as 156.800 and only strip any trailing zeros that goes beyond 3 decimals"

I can have several ScannerScreen programs running at the same time so it seems they can coexists and use their own variables and hooks in windows and not interfere with each other, so that's a pleasant surprise.

One thing that happened with this new version are that there's some permission issues: ElnOutError/Access denied (C:\Program Files(x86)\Scanner Screen\SS20240406.TXT) If I switch to another harddrive for the logs that hasn't any user restrictions it works fine but in the previous versions it worked to store the logfile in that same program directory on C:

I deleted any old logfiles to be sure it wasn't an issue with overwrite permissions or similar problem but then it said I needed admin rights to delete them. So previous versions had admin rights when saving the logfile but now it has some lower category rights and not user rights so cannot use the program files folder to store logfiles. It isn't really an issue so perhaps safer to not let the program have admin rights.

/Ubbe
I have removed the freq function that trims it as it is not working like it supposed to. I will re add it later once I get it working in all curmstances.

Good find on the below when selecting the dir it starts out in the program dir and it does not have rights per windows to write in that dir.
So now when you go to select the file it start out in your documents dir and you can change it to what you wish.

Thank you for this find
One thing that happened with this new version are that there's some permission issues: ElnOutError/Access denied (C:\Program Files(x86)\Scanner Screen\SS20240406.TXT) If I switch to another harddrive for the logs that hasn't any user restrictions it works fine but in the previous versions it worked to store the logfile in that same program directory on C:
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
I figured it would take some intricate coding to pull it off.

It now newer go more than 3 decimals and round the decimals off so that 422.24375 that are displayed as 422.2437 on the scanner are in ScannerScreen displayed as 422.244 and a 166.5125 frequency are displayed as 166.512, so it seems to make everything three decimals and not just the trailing zeros.

I wasn't clear enough what I wished for. I should have stated:
"Can you make some magic code to see to that it always leaves at least 3 decimals, so that a 156.8 frequency will display as 156.800 and only strip any trailing zeros that goes beyond 3 decimals"

I can have several ScannerScreen programs running at the same time so it seems they can coexists and use their own variables and hooks in windows and not interfere with each other, so that's a pleasant surprise.

One thing that happened with this new version are that there's some permission issues: ElnOutError/Access denied (C:\Program Files(x86)\Scanner Screen\SS20240406.TXT) If I switch to another harddrive for the logs that hasn't any user restrictions it works fine but in the previous versions it worked to store the logfile in that same program directory on C:

I deleted any old logfiles to be sure it wasn't an issue with overwrite permissions or similar problem but then it said I needed admin rights to delete them. So previous versions had admin rights when saving the logfile but now it has some lower category rights and not user rights so cannot use the program files folder to store logfiles. It isn't really an issue so perhaps safer to not let the program have admin rights.

/Ubbe
Okay try version 2.650

Here is the logic I am using
function tform1.ProcessDecimalString(inputString: string): string;
var
floatValue: real;
integerPart, fractionalPart: string;
i: integer;
begin
// Check if the input is a string
if not (inputString <> '') then
begin
Result := inputString;
Exit;
end;

// Check if the string contains a decimal
if Pos('.', inputString) = 0 then
begin
Result := inputString;
Exit;
end;

// Check if the string is a valid number
try
floatValue := StrToFloat(inputString);
except
begin
Result := inputString;
Exit;
end;
end;

// Check if the last decimal is zero
if not (inputString[Length(inputString)] = '0') then
begin
Result := inputString;
Exit;
end;

// Split the string into integer and fractional parts
integerPart := inttostr(strtoint(Copy(inputString, 1, Pos('.', inputString) - 1)));
fractionalPart := Copy(inputString, Pos('.', inputString) + 1, Length(inputString));

// Check if the fractional part has more than 3 decimals
if Length(fractionalPart) > 3 then
begin
// Remove trailing zeros
i := Length(fractionalPart);
while (i > 0) and (fractionalPart = '0') do
Dec(i);
fractionalPart := Copy(fractionalPart, 1, i);

// Add zeros to make it three decimals long if it's fewer than 3 decimals
while Length(fractionalPart) < 3 do
fractionalPart := fractionalPart + '0';

// Join the integer and fractional parts with the decimal point
Result := integerPart + '.' + fractionalPart;
end
else
begin
// Add zeros to make it three decimals long if it's fewer than 3 decimals
while Length(fractionalPart) < 3 do
fractionalPart := fractionalPart + '0';
Result := integerPart + '.' + fractionalPart;
end;
end;
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
I figured it would take some intricate coding to pull it off.

It now newer go more than 3 decimals and round the decimals off so that 422.24375 that are displayed as 422.2437 on the scanner are in ScannerScreen displayed as 422.244 and a 166.5125 frequency are displayed as 166.512, so it seems to make everything three decimals and not just the trailing zeros.

I wasn't clear enough what I wished for. I should have stated:
"Can you make some magic code to see to that it always leaves at least 3 decimals, so that a 156.8 frequency will display as 156.800 and only strip any trailing zeros that goes beyond 3 decimals"

I can have several ScannerScreen programs running at the same time so it seems they can coexists and use their own variables and hooks in windows and not interfere with each other, so that's a pleasant surprise.

One thing that happened with this new version are that there's some permission issues: ElnOutError/Access denied (C:\Program Files(x86)\Scanner Screen\SS20240406.TXT) If I switch to another harddrive for the logs that hasn't any user restrictions it works fine but in the previous versions it worked to store the logfile in that same program directory on C:

I deleted any old logfiles to be sure it wasn't an issue with overwrite permissions or similar problem but then it said I needed admin rights to delete them. So previous versions had admin rights when saving the logfile but now it has some lower category rights and not user rights so cannot use the program files folder to store logfiles. It isn't really an issue so perhaps safer to not let the program have admin rights.

/Ubbe
Made some more adjustments

function tform1.ProcessDecimalString(inputString: string): string;
var
floatValue: real;
integerPart, fractionalPart: string;
i: integer;
begin
// Check if the input is a string
if not (inputString <> '') then
begin
Result := inputString;
Exit;
end;

// Check if the string contains a decimal
if Pos('.', inputString) = 0 then
begin
Result := inputString;
Exit;
end;

// Check if the string is a valid number
try
floatValue := StrToFloat(inputString);
except
begin
Result := inputString;
Exit;
end;
end;


// Split the string into integer and fractional parts
integerPart := inttostr(strtoint(Copy(inputString, 1, Pos('.', inputString) - 1)));
fractionalPart := Copy(inputString, Pos('.', inputString) + 1, Length(inputString));


// Remove trailing zeros
i := Length(fractionalPart);
while (i > 0) and (fractionalPart = '0') do
Dec(i);
fractionalPart := Copy(fractionalPart, 1, i);

// Add zeros to make it three decimals long if it's fewer than 3 decimals
while Length(fractionalPart) < 3 do
fractionalPart := fractionalPart + '0';

// Join the integer and fractional parts with the decimal point
Result := integerPart + '.' + fractionalPart;
end;

2.651 version
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
Added a trim

function tform1.ProcessDecimalString(inputString: string): string;
var
floatValue: real;
integerPart, fractionalPart: string;
i: integer;
begin
inputString:=trim(inputstring);

// Check if the input is a string
if not (inputString <> '') then
begin
Result := inputString;
Exit;
end;

// Check if the string contains a decimal
if Pos('.', inputString) = 0 then
begin
Result := inputString;
Exit;
end;

// Check if the string is a valid number
try
floatValue := StrToFloat(inputString);
except
begin
Result := inputString;
Exit;
end;
end;


// Split the string into integer and fractional parts
integerPart := inttostr(strtoint(Copy(inputString, 1, Pos('.', inputString) - 1)));
fractionalPart := Copy(inputString, Pos('.', inputString) + 1, Length(inputString));


// Remove trailing zeros
i := Length(fractionalPart);
while (i > 0) and (fractionalPart = '0') do
Dec(i);
fractionalPart := Copy(fractionalPart, 1, i);

// Add zeros to make it three decimals long if it's fewer than 3 decimals
while Length(fractionalPart) < 3 do
fractionalPart := fractionalPart + '0';

// Join the integer and fractional parts with the decimal point
Result := integerPart + '.' + fractionalPart;
end;

version 2.652
 

Ubbe

Member
Joined
Sep 8, 2006
Messages
9,516
Location
Stockholm, Sweden
For the GLG command to retrieve the parameters it is a Uniden issue that it doesn't send any system or department info when monitoring private iCalls in DMR. It even gave an AM modulation info when monitoring a trunked system in NFM when I had monitored airband AM prior to that.

For using other commands they give you the whole display info in a comma delimited format but then differs depending of scanner model and if 3 or 5 row display mode are used.

For the comport issue when running ScannerScreen over night it first stopped at 7 o'clock in the morning and next time 2 o'clock at night. I can then use Unidens RH536 program and connect to the 536 scanner and confirm that the comport are still working, but after that check and even reconnecting the USB cable it doesn't help in ScannerScreen but selecting another comport and selecting to connect and then select back to the correct port makes it works again. So something like a crash in a buffer, used for the comport by the ScannerScreen program but not for other programs, that gets cleared when selecting another port.

/Ubbe
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
For the GLG command to retrieve the parameters it is a Uniden issue that it doesn't send any system or department info when monitoring private iCalls in DMR. It even gave an AM modulation info when monitoring a trunked system in NFM when I had monitored airband AM prior to that.

For using other commands they give you the whole display info in a comma delimited format but then differs depending of scanner model and if 3 or 5 row display mode are used.

For the comport issue when running ScannerScreen over night it first stopped at 7 o'clock in the morning and next time 2 o'clock at night. I can then use Unidens RH536 program and connect to the 536 scanner and confirm that the comport are still working, but after that check and even reconnecting the USB cable it doesn't help in ScannerScreen but selecting another comport and selecting to connect and then select back to the correct port makes it works again. So something like a crash in a buffer, used for the comport by the ScannerScreen program but not for other programs, that gets cleared when selecting another port.

/Ubbe
Does the screen say anything when it stops?
Any error?
I am using a really fast baud rate perhaps I could slow it down some.
ser.config(115200, 8, 'N', 0, False, False);
For the GLG command to retrieve the parameters it is a Uniden issue that it doesn't send any system or department info when monitoring private iCalls in DMR. It even gave an AM modulation info when monitoring a trunked system in NFM when I had monitored airband AM prior to that.

For using other commands they give you the whole display info in a comma delimited format but then differs depending of scanner model and if 3 or 5 row display mode are used.

For the comport issue when running ScannerScreen over night it first stopped at 7 o'clock in the morning and next time 2 o'clock at night. I can then use Unidens RH536 program and connect to the 536 scanner and confirm that the comport are still working, but after that check and even reconnecting the USB cable it doesn't help in ScannerScreen but selecting another comport and selecting to connect and then select back to the correct port makes it works again. So something like a crash in a buffer, used for the comport by the ScannerScreen program but not for other programs, that gets cleared when selecting another port.

/Ubbe
For the disconnecting there is a newer version 2.653 I compiled in the newest version of synapse from their github I am using the synaser library for serial communications.
Please try and let me know.
Also found a bug with the selecting the dir it was not assigning the edit box a value.
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
Does the screen say anything when it stops?
Any error?
I am using a really fast baud rate perhaps I could slow it down some.
ser.config(115200, 8, 'N', 0, False, False);

For the disconnecting there is a newer version 2.653 I compiled in the newest version of synapse from their github I am using the synaser library for serial communications.
Please try and let me know.
Also found a bug with the selecting the dir it was not assigning the edit box a value.
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
version 2.654 did a cleanup and build to make sure it is using all the latest libraries synaspe, htmlview
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
Does the screen say anything when it stops?
Any error?
I am using a really fast baud rate perhaps I could slow it down some.
ser.config(115200, 8, 'N', 0, False, False);

For the disconnecting there is a newer version 2.653 I compiled in the newest version of synapse from their github I am using the synaser library for serial communications.
Please try and let me know.
Also found a bug with the selecting the dir it was not assigning the edit box a value.
here is the voice reading logic

if channelname + DEPARTMENTNAME <> '' then
begin
if pos(departmentname, channelname) > 0 then
begin
READTEXT := WideString(channelname);
end
else
READTEXT := WideString(DEPARTMENTNAME + ' ' + channelname);
end
else
READTEXT := WideString(freq+
' ' + modulation + ' ' + systemname);
 

Ubbe

Member
Joined
Sep 8, 2006
Messages
9,516
Location
Stockholm, Sweden
Does the screen say anything when it stops?

Also found a bug with the selecting the dir it was not assigning the edit box a value

The error text are just that it lost the connection and that I should reconnect the USB cable. But it only helps if I select another port and then back again.

I did noticed that it never saved any selected library for the log file.

I though that the GLG command returned 5 decimals but it is only 4, so the only modification needed are to remove that 4:th decimal if it is a zero. But the check for trailing and leading zeros needs only to be done when it is a frequency and not a TG or UID number. The GLG command sometimes returns NFM when it is FM and it seems to get stuck with a previous value from a frequency, so there's some bugs in the Uniden firmware for that command. I cannot find GLG in the list of commands for SDSx00 but it still works but that probably means that they have abandoned it and no longer supports it, not dealing with related bug reports. I use 9600 with a terminal program to be sure that I don't loose any characters in the communication, but I've tried 115200 and see no errors.

/Ubbe
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
Okay try the 2.654 as I am using a 2023 version of the serial library I have run it all day without issue.
If it does it again I will add an option to select the baud rate.

Currently set to 115k
 

Vonskie

Member
Premium Subscriber
Joined
Feb 7, 2005
Messages
521
Location
Allen, TX
Oka
Okay try the 2.654 as I am using a 2023 version of the serial library I have run it all day without issue.
If it does it again I will add an option to select the baud rate.

Currently set to 115k
I added the following in 2.656
ser.AtTimeout := 4000;
ser.InterPacketTimeout := false;

See if that helps
 

Ubbe

Member
Joined
Sep 8, 2006
Messages
9,516
Location
Stockholm, Sweden
There is some sorcery involved here. I have three scanners and three instances of the program running and they point to the same logfile. They can happily write to the file all three and if I open that text file and there are hits logged while I study the text file, then when I reload the text file all new logs have been saved to that text file. There isn't any "already in use" issue that it usually are when trying to share the same file.

This is a super program to monitor scanners, with any sized font selected big enough to see it from the other end of the room.

I hacked the exe file (can't do pascal compiling) and changed the text in the window frame from "Screen" to instead show the scanner model so I can keep track of which window goes to which scanner. Is it possible to in the Connect to Scanner procedure to first send a MDL command to get the scanner model and then print that to the left in the line for the time and date display, with that font size, and instead move the start for the time display to the 10:th character position?

One thing that would be handy are a Channel Hold function. A button to toggle channel hold to both hold on an interesting conversation and also to do a quick toggle to get it to continue scan from the current conversation. If it could be made just by clicking on the line for Frequency/TG or the Clock line, don't know what is possible without reserving space for a dedicated button that sends a KEY,C,P command. Maybe those real time log names can be made into a button, the CHANNEL text. If that works then perhaps it can be the same done for SYSTEM to send a KEY,A,P and for DEPARTMENT KEY,B,P

I don't know what lower tier scanners like BCD396 will do with those commands, probably just respond with errors as A-B-C isn't in their key code list, so nothing terrible should happen.

/Ubbe
 
Top