Difference between revisions of "Allstar® and P25 on Quantar"
Line 450: | Line 450: | ||
You should hear it announce if you're connected to the Quantar v.24 port. The v.24 light should stop flashing on the front panel of the Quantar too. | You should hear it announce if you're connected to the Quantar v.24 port. The v.24 light should stop flashing on the front panel of the Quantar too. | ||
+ | |||
+ | The final thing needed to do is setup a service file to have it start this on system boot and when it crashes (and boy does it ever!) | ||
+ | |||
+ | Make a file /lib/systemd/system/pnx.service | ||
+ | |||
+ | <Pre> | ||
+ | [Unit] | ||
+ | Description=P25NX Service | ||
+ | Wants=network-online.target | ||
+ | After=network-online.target | ||
+ | |||
+ | [Service] | ||
+ | ExecStart=/opt/pnx-mono/bin/Release/pnx-mono.exe | ||
+ | StandardOutput=null | ||
+ | User=pnxmono | ||
+ | WorkingDirectory=/opt/pnx-mono/bin/Release | ||
+ | |||
+ | # safe_asterisk emulation | ||
+ | Restart=always | ||
+ | RestartSec=10 | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | Alias=pnx.service | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | Reload systemd and start pnxmono: | ||
+ | |||
+ | <pre> | ||
+ | systemctl daemon-reload | ||
+ | systemctl restart start | ||
+ | </pre> | ||
+ | |||
+ | Now you're linked on the air with P25! |
Revision as of 03:07, 8 October 2017
This is a set of wildcard programing for the Quantar which enables Allstarlink and P25nx linking with mode switching controlled by local traffic. This is possible via some enhanced wildcard programing, and may be applicable for other users using different controllers.
Contents
Features
- Support for analog and digital P25 modes with linking
- Asterisk controller has an audio delay of 10ms to 500ms via ARS digital delay board.
- ID is done by analog controller in this mode
- PL is output to controller for it to make the decision if it’s needed to repeat.
- In COS mode P25 will be detected and no repeated.
- PL tail on wire line when on controller (chicken burst)
- When controller unkeys the transmitter stays keyed for 2 second with PL then drops it and stays Keyed for another 5 seconds. This will squelch even the worst baofeng’s receiver.
- Failsoft mode if the controller fails/asterisk dies
- Turns on in cabinet repeat and ID on that channel in analog mode (digital still works)
- Requires PL on receive as defined in the channel.
- Repeater has 4 alarm beeps on it in this mode.
- Loose the analog repeater delay.
- Mode lock which follows local users keyup after 10 seconds, and locks to that mode (blocks the other) for 5.5 minutes.
- This currently has a brief clip of audio at 10 seconds as it changes channels.
- A short call (under 10s) will not cause the system to lock
- This allows for a short call to not lock the system for the full lockout period.
- Blocks repeat or wireline of opposite mode.
- If no received signal of given mode, it goes back to mixed mode.
- Analog mode lock if external input 1 goes low, works on controller and failsoft modes.
- Blocks P25 repeat
- Alarm output on station alarm.
- Raspberry Pi controller running both P25nx and Allstarlink DIAL software.
- This is behind the cisco 1811 router
- Nat rules allow the asterisk port open to the outside.
Parts needed
Part Description | QTY | Price | Source |
---|---|---|---|
Quantar | |||
Cisco 1841 Router | 1 | 35 | eBay |
Rack Ears from 1841 | 1 | 10 | eBay |
Cisco Smart Serial Cable PN 72-1430-01 | 1 | 10 | eBay |
Cisco WIC-2A/S 2-Port Interface Card Network Module | 1 | 30 | eBay |
v.24 board for Quantar | 1 | 30 | mike.lussier@gmail.com |
25 pair Telco Cable Cat 3 PBX KSU RJ21 AMP connectors Male to Blunt, 5 Ft. | 1 | 7 | http://www.ebay.com/itm/122487217154 |
66 block | 1 | 16.49 | http://a.co/cxiEayf |
Bridging Clip- 100 Pack | 1 | 15.31 | http://a.co/iW0AZf8 |
ARS Digital Audio Delay board | 1 | 49 | http://arsrepeaters.com/Audio_Delay_W462.php |
Rasberry Pi | 1 | 40 | Amazon |
16 GB Sandisk miconSDHC card | 1 | 20 | Amazon |
1 RU drawer | 1 | 50 | http://www.ebay.com/itm/311572552441 |
RA-35/40 Radio interface | 1 | 65 | http://www.masterscommunications.com/products/radio-adapter/ra40.html |
6" usb cable " | 1 | 6 | http://a.co/3M3OzDb |
Heatsinks for Rpi | 1 | 6 | http://a.co/72cYxo3 |
Power supply, 12v to 5v for Rpi | 1 | 8.99 | http://a.co/a9f6IsV |
Standoffs for RA-35 | 1 | 8 | http://a.co/aUufBd4 |
Standoffs for Rpi | 4 | 10 | Digikey RPC1080-ND |
Logic level converter 3.3 > 5v | 1 | 7.99 | http://a.co/j7BayV5 |
RS232 port for Rpi | 1 | 11.25 | http://a.co/76BGWub |
NPN small signal 2n2222 eq | 1 | 0.5 | |
SPDT with middle switch | 2 | 10 | |
1k resistor | 1 | 0.05 | |
36 ohm resistor | 1 | 0.05 | |
10k resistor | 5 | 0.05 | |
3v Relay | 1 | 1 | |
Proto board | 1 | 12.95 | http://www.ebay.com/itm/322586917307 |
wirewrap wire | |||
lacing twine | |||
Total | 460.63 |
Assembly Notes
Following the diagram and the pictures install the parts into the drawer. I drill two holes and then enlarge them with a nibbler to secure the end of the 25 pair cable by lacing it in place. I'll cut this 5' cable down to 2.5' and set the extra aside for use as hookup-wire later. If you need longer to reach your Quantar, then cut only what you need.
Punch down all the pairs as labeled in the diagram. Note the difference of going by pair vs the 1-50 numbering Motorola uses.
I assemble the "glue board" using the extra hookup wire and tack solder the switches to unused pads. Note the 36 Ohm resistor is to limit current on the relay coil as I'm running junkbox 3v telecom relays at 5v. If you have another relay, feel free to use it. The only requirement is that it can operate continuously. A reed relay would be a nice upgrade.
The GPIO ports are connected to the pads on the RA-35 interface using wire-wrap wire and dressed.
Note I use the heatsinks on the RPi as it does get warm.
The rs232 level converter can be installed in the front of the drawer if you have a DE-9 Greenlee punch. This makes for a clean appearance.
Software
The software used here is the basic asterisk for app_rpt, and the pnxmono software. Pnxmono converts the serial data to multicast and the cisco router had a Dynamic Multipoint VPN (DMVPN) to the rest of the world wide network. Both these programs run on the same RPI.
Cisco router
You need to have the advanced enterprise services image installed to support Serial TUNnel (STUN) and DMVPN.
Example config. Please don't copy this
service timestamps debug datetime msec service timestamps log datetime msec service password-encryption ! hostname #SET-HOSTNAME-HERE ! aaa new-model ! ! aaa authentication login localauth local aaa authorization exec default local aaa accounting delay-start aaa session-id common ! clock timezone EST -5 0 $CHANGE THIS clock summer-time EDT recurring ! ip dhcp pool RPI network 172.31.4.100 255.255.255.252 #Change this to Fa0/1 default-router 172.31.12.101 #change this to Fa0/1 interface IP dns-server 4.2.2.2 #DNS SERVER lease 0 1 ! ! ip cef ip multicast-routing ! username w9cr privilege 15 secret 5 $1$9lDK$ALihMA.kF88ExXKVmFq7K/ username nx4y privilege 15 secret 5 $1$//au$PLHBB3ZORaUJwm6b8VuWB0 $ADD YOU IN HERE crypto isakmp policy 1 authentication pre-share crypto isakmp key BA4841AF1D3FD327D83F6CF81D4CB address 0.0.0.0 0.0.0.0 crypto isakmp keepalive 60 ! ! crypto ipsec transform-set trans2 esp-des esp-md5-hmac mode transport crypto ipsec transform-set NO-CRYPT ah-sha-hmac mode transport crypto ipsec transform-set VPN-TS esp-aes esp-sha-hmac ! crypto ipsec profile vpnprof set transform-set NO-CRYPT ! stun peer-name 172.31.300.101 #CHANGE THIS TO FA0/1 IP stun protocol-group 130 basic #change this to your group ! ! ! interface Loopback0 ip address 10.2.4.130 255.255.255.255 #what the admins give you ip pim sparse-mode ! interface Tunnel1 bandwidth 1000 ip address 172.21.400.130 255.255.240.0 #change this no ip redirects ip mtu 1400 ip pim nbma-mode ip pim sparse-mode ip nhrp authentication p25nx ip nhrp map multicast 44.98.249.177 ip nhrp map 172.21.1.1 44.98.249.177 ip nhrp network-id 100001 ip nhrp holdtime 600 ip nhrp nhs 172.21.1.1 ip nhrp server-only ip tcp adjust-mss 1350 ip ospf network broadcast ip ospf priority 0 delay 900 cdp enable tunnel source FastEthernet0/0 tunnel mode gre multipoint tunnel key 100001 tunnel protection ipsec profile vpnprof shared ! interface FastEthernet0/0 description INTERNET ip address dhcp #allow for DHCP, or you can set static. ip nat outside ip virtual-reassembly in duplex auto speed auto ipv6 address autoconfig default ipv6 enable ! interface FastEthernet0/1 description TO RPi NETWORK ip address 172.31.4567.101 255.255.255.252 # Must match subnet ip pim sparse-mode ip nat inside ip virtual-reassembly in ip tcp adjust-mss 1400 ip igmp query-interval 125 duplex auto speed auto ! interface Serial0/0/0 mtu 2104 no ip address encapsulation stun clock rate 9600 stun group 130 stun route all tcp 172.31.4.102 #change to the IP of the RPi ! interface Serial0/0/1 no ip address shutdown clock rate 125000 ! router ospf 1 network 10.2.4.130 0.0.0.0 area 0 network 172.21.4.130 0.0.0.0 area 0 network 172.31.4.100 0.0.0.3 area 0 ! Turn off Crap no ip forward-protocol nd no ip http server no ip http secure-server ! ip pim bidir-enable ip pim spt-threshold infinity ip nat inside source list NAT interface FastEthernet0/0 overload #update these with your RPi Address. ip nat inside source static tcp 172.31.4.102 22 interface FastEthernet0/0 45632 ip nat inside source static tcp 172.31.4.102 222 interface FastEthernet0/0 222 ip nat inside source static tcp 172.31.4.102 8080 interface FastEthernet0/0 8080 ip nat inside source static udp 172.31.4.102 4569 interface FastEthernet0/0 4569 ! ip access-list standard NAT permit 172.31.0.0 0.0.255.255 ! ip access-list extended VTY-ACL ! UPDATE THIS. permit tcp 192.168.0.0 0.0.255.255 any range 22 telnet permit tcp 44.98.0.0 0.0.255.255 any range 22 telnet permit tcp 208.38.136.0 0.0.0.255 any range 22 telnet permit tcp host 67.78.199.10 any range 22 telnet permit tcp 10.0.0.0 0.255.255.255 any range 22 telnet permit tcp host 96.254.123.27 any range 22 telnet permit tcp 172.16.0.0 0.15.255.255 any range 22 telnet deny ip any any log-input ! ip radius source-interface FastEthernet0/0 logging origin-id hostname logging source-interface FastEthernet0/0 logging 44.98.254.1 ! snmp-server community p25nx RO ! line con 0 exec-timeout 0 0 line aux 0 modem DTR-active no exec transport input telnet transport output none stopbits 1 line vty 0 4 access-class VTY-ACL in #VTY ACL exec-timeout 180 0 transport input telnet ssh escape-character 3 ! scheduler allocate 20000 1000 ntp update-calendar ntp server pool.ntp.org
Raspberry Pi
The RPI runs a stock DIAL image for asterisk, and should be configured for DHCP to make your life easier. There is a serial port which can be used to boot it in headless mode.
Install and configure the asterisk and enable simple-usb in the modules.conf file as we will be running in non-DSP mode. Why do DSP when the quantar can do the heavy lifting for us?
Install pnxmono software
The pnxmono software needs to be installed and modified as the current software has a couple of severe bugs. The pnxmono software will not filter commands received from the network, so this can cause the Quantar to change channels. The local courtesy tone it uses has a channel change embedded in it as well, so this needs to be disabled. We'll change it to the remote tone which has no such issue.
The commands to get it from github:
sudo apt-get update sudo apt-get upgrade sudo apt-get install git sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list sudo apt-get update sudo apt-get install mono-complete adduser pnxmono --disabled-password mkdir -p /opt/pnx-mono chown pnxmono:pnxmono /opt/pnx-mono cd /opt/pnx-mono su -c 'git clone https://github.com/p25nx/pnx-mono.git' pnxmono cd pnx-mono mv ctone1.cs ctone1.cs.old cp ctone2.cs ctone1.cs <pre> You'll need to edit the ctone1.cs file to have this rather than ctone2 in it. <pre> public static byte[][] cTone1 =
Now build pnxmono
cd /opt/pnx-mono su -c 'xbuild /p:configuration=Release' pnxmono cd bin/Release Now test it: su -c 'mono pnx-mono.exe' pnxmono
You should hear it announce if you're connected to the Quantar v.24 port. The v.24 light should stop flashing on the front panel of the Quantar too.
The final thing needed to do is setup a service file to have it start this on system boot and when it crashes (and boy does it ever!)
Make a file /lib/systemd/system/pnx.service
[Unit] Description=P25NX Service Wants=network-online.target After=network-online.target [Service] ExecStart=/opt/pnx-mono/bin/Release/pnx-mono.exe StandardOutput=null User=pnxmono WorkingDirectory=/opt/pnx-mono/bin/Release # safe_asterisk emulation Restart=always RestartSec=10 [Install] WantedBy=multi-user.target Alias=pnx.service
Reload systemd and start pnxmono:
systemctl daemon-reload systemctl restart start
Now you're linked on the air with P25!