Had an inquiry about my video PoC on youtube with MDC1200 on app_rpt, and thought it might be of interest to the list. I'm a hack, not a good programer, but I can read and write protocols :) Does anyone use MDC with app_rpt, and want to improve it? The original inquiry and my response is below. On 12/11/15 12:46 AM, Brett Woollum wrote:
Hi Bryan!
I found your video on Youtube (link <https://www.youtube.com/watch?v=MgdaXkD8Dtk>). I have app_rpt running now on my system (fresh install using DIAL linux, link <https://allstarlink.org/> and link <http://ohnosec.org/drupal/node/198>). I have the MDC-1200 functionality complied and working. I can encode and decode packets successfully, which is excellent.
One thing I've noticed is that the app_rpt MDC-1200 functionality seems on only include options for Call, Emergency, Status, and ID - but not Stun/Un-Stun. In your video, you demonstrate Stun and Un-Stun capabilities. Mind if I ask how this was accomplished? Did you just customize the code to add this, or do I have the wrong version of the code?
Any assistance you can provide would be great. If you did modify the libraries, and don't mind sharing, can you send a link to where I can find them?
It's GPL, it's a requirement to share. I'm to lazy to make diffs :( I added the following in app_rpt.c : line 24883 or so
else if (p->type[0] == 'K') // kill a unit { mdc_encoder_set_packet(ps->mdc,0x22b,0x00,p->UnitID); } else if (p->type[0] == 'U') // UnKill a unit { mdc_encoder_set_packet(ps->mdc,0x2b,0x0c,p->UnitID);
Now in the logging/monitor part: line 20596 or so
/* if for Stun ACK */ if ((op == 0x0b) && (arg == 0x00)) { myrpt->lastunit = unitID; sprintf(ustr,"STUN ACK %04X",unitID); #ifdef _MDC_ENCODE_H_ mdc1200_ack_status(myrpt,unitID); #endif mdc1200_notify(myrpt,NULL,ustr); mdc1200_send(myrpt,ustr); mdc1200_cmd(myrpt,ustr); }
}
What needs to be done is to setup a verification of the MDC commands. When you stun a unit it ACK's to say it's stunned. This needs to tie into a verification procedure on the K command, where it keeps trying to stun the unit until it has an ACK. I'm not sure how to do this. Second this needs to be tied into the repeater with an over the air response like "UNITNNNN KILLED". rpt cmd 40821 cop 60 K,b055 is the command that will stun unit b055 rpt cmd 40821 cop 60 U,b055 is the command that will stun unit b055 I need to figure out how to make this work from over the air input, but that might be dangerous unless we have a verification loop built in. A misread DTMF digit could kill the wrong radio. 73's -- Bryan Fields, W9CR Florida Simulcast Group, Inc. -- Bryan Fields 727-409-1194 - Voice 727-214-2508 - Fax http://bryanfields.net