-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug logging some CC messages, adding unit logging #181
Conversation
updating master branch for change staging
For those who want to see what the control channel is putting out. Repetitive "meta" system messages (as seen on the P25 system I monitor) left at trace level. Also, added ability to respond to location registration acknowledgements.
creates a radiolist.json file in the capture directory consisting of radio ID/talkgroup pairs, and also added commented-out code to run an external command whenever a radio's state/channel changes. Radios that have been turned off are set to talkgroup -1 in the list. Also changed logging level to debug to capture more control channel messages Notes: List file will only get updated every 3 minutes, and that it may be better to write changes directly to it instead of keeping the list in memory. These should also really be configuration options.
fixing indentation issue
Fixing issue w/buildx
Fixing buildx issue
uncommenting radiochange.sh calls
fixing buildx issue
This was never merged so I updated it to work with the current version. Note that the config file entry is not hooked up as I am unsure how to access it in the contexts it is needed, so as is it'll always run in main.cc, the lines beginning with Even better, to support multiple systems, would be something like If someone could tell me the proper way of doing that it would be greatly appreciated, as I have other changes I'd like to work on getting ready next. |
OK, I think I have this all ready to go. @robotastic you want to merge it? |
Thanks - let me go give it a check tonight! |
Great! I'm wanting to set up the unit_check routine and have the option to
print out the list of radio affiliations the program keeps every so often
but the issues are a) the list gets flushed every time the program is
restarted and b) many sites have hundreds or thousands of radios and it's
much more efficient just to handle the changes.
…On Mon, Mar 8, 2021, 4:18 AM Luke Berndt ***@***.***> wrote:
Thanks - let me go give it a check tonight!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAB7DILOOJAA2IYX4TIMTLTCS6B7ANCNFSM4ETFY2XA>
.
|
The changes look good to me! Could you add in an example script that people could use to get started? You can add it to the /examples folder. It might make the most sense to ultimately track the Unit changes in a DB. It would be easier to do the report generation and analysis over time... and no C++ to worry about! |
That kind of depends on what people want to do. I'm using a PHP script to
populate the list and daily logs I've made (viewable at
http://www.rosecitytransit.org/radio/list.php, and, for buses since I can
get location info for them and calls for them only are heard on the site
they're connected to, http://www.rosecitytransit.org/radio/map.php ) but
certainly many people may want to use a shell script or something.
…On Mon, Mar 8, 2021, 7:01 PM Luke Berndt ***@***.***> wrote:
The changes look good to me! Could you add in an example script that
people could use to get started? You can add it to the /examples folder.
It might make the most sense to ultimately track the Unit changes in a DB.
It would be easier to do the report generation and analysis over time...
and no C++ to worry about!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAB7DJJGEUHC3BB7NGNRSLTCWFPVANCNFSM4ETFY2XA>
.
|
I got to thinking that a simple
|
Thanks! having a simple script will at least help people get started. I merged everything in and added a note in the readme. |
Just FYI, the sample script was just a draft and wasn't complete working code as-is. I can flesh it out if you don't want to. Also, I see you added a section to the read me, but you didn't delete mine (if you are wanting yours). |
I had totally missed that in the readme! If you are able to fill out the script a little, that would be great. It doesn't have to be anything fancy. I am a bad Bash scripter. What you have already written, is next level for me. |
This is kind of cool -- What is the chance you would share the template for your PHP files as well? You've shown the world the awesomeness, now we must have it :) The bash script doesn't work, but I think I understand the intent and can fix that if I can find the time to actually sit and code. Thanks for the commits! |
Well, thanks. The PHP script I use is at https://github.com/rosecitytransit/trunk-recorder/blob/oldtrimetscanner/unitreg.php It's not totally useful to others since it uses an API related to the radio system I record. I'm adding an updated draft to the opened issue. |
@rosecitytransit Can you explain what output this might generate? I have a custom unitlog script that I meant to submit a pull request for over a year ago and I just never could figure out how to do it. custom TR code will generate four different events: on, off, tg, tx. Some of them just provide the radio ID and the event, others include the talk group. It allows me to maintain a realtime database of every radio in the system, what talk group they're currently on, if they powered off, etc. I'm curious if there is a way to supplement what you did with my login somehow so as not to break what you're doing, but offer the same functionality? My code also generates these events even if the talk group in question is encrypted. If it happens, it logs it. Here is a log as an example: Radio ID 54638 cmd: tx tg: 54638 |
I put it in the Readme. It'll run e.g. `./script.sh shortName 123 onʼ or
`./script.sh shortName 123 call 4ʼ where 123 is a radio ID and 4 is a
talkgroup.
…On Mon, May 10, 2021, 3:00 PM jgarvas ***@***.***> wrote:
@rosecitytransit <https://github.com/rosecitytransit> Can you explain
what output this might generate? I have a custom unitlog script that I
meant to submit a pull request for over a year ago and I just never could
figure out how to do it. custom TR code will generate four different
events: on, off, tg, tx. Some of them just provide the radio ID and the
event, others include the talk group. It allows me to maintain a realtime
database of every radio in the system, what talk group they're currently
on, if they powered off, etc.
I'm curious if there is a way to supplement what you did with my login
somehow so as not to break what you're doing, but offer the same
functionality? My code also generates these events even if the talk group
in question is encrypted. If it happens, it logs it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAB7DIDIKFN47RHX7I7JXDTNBJQ3ANCNFSM4ETFY2XA>
.
|
-Changed logging of non-repetitive control channel messages from trace to debug level (based on what I've seen for P25, there may be others that are repetitive too)
-Added unit logging to radiolist.json in the capture directory
-Added commented-out code that could run an external command when a radio's state/channel changes.
Note that it would probably be best to make these configuration options,