RTCM Client

From AllStarLink Wiki
Revision as of 16:21, 9 August 2017 by imported>Ve7fet
Jump to navigation Jump to search

The Micro-Node RTCM and VOTER interfaces are typically used with AllStar in voting/simulcast applications. They MAY be used for ANY repeater interface application, through the chan/voter channel driver.

The VOTER is the original through-hole board designed by Jim Dixon for this application. It is open-source, and the relevant Gerber files and BoM to build it are available.

The Micro-Node Radio Thin Client Module (RTCM) is the commercial version of the VOTER. It uses surface mount parts (SMT), but is functionally equivalent to the original VOTER.

In general, the two terms (RTCM/VOTER) are used interchangeably, as they operate the same, and use the same firmware (mostly, see below).

This page will highlight some of the operational concerns, quirks, bugs, and other items of interest that relate to these interfaces. Much of the information has been gleaned off the AllStar mail list, comes from personal experience, or comes from notes in the firmware source code.


Firmware

The firmware in the RTCM and VOTER is the same, except it is compiled for the specific dsPIC that is installed in each. As such, the firmware is specific to the VOTER or the RTCM, and is NOT interchangeable (it won't boot in the wrong device). Firmware for the RTCM is denoted by "smt" in the filename.

The VOTER uses a dsPIC33FJ128GP802 and the RTCM uses a dsPIC33FJ128GP804.

There are two parts to the firmware, a bootloader, and then the actual firmware file. The bootloader starts when power is applied, and allows you to talk to the dsPIC and load new firmware files over ethernet. If the bootloader is not intercepted by the loading tool, it will continue to boot the current firmware file.

All new boards will need to have the bootloader installed first, followed by a firmware file. You can load a firmware file directly (.hex) in to the dsPIC, but then you will not have any of the bootloader remote loading features.

The current bootloader (.cof file) is available here: https://github.com/AllStarLink/voter/tree/master/voter-bootloader (the -smt file is for the RTCM). It needs to be loaded with a PICKit programmer.

Current firmware (.cry file) is available here: https://github.com/AllStarLink/voter/tree/master/board-firmware . They are loaded with the EBLEX C30 Programmer.

There are multiple "flavors" of firmware available. See below for further explanation of what all the options mean.

The DSPBEW versions have Jim's DSP/BEW feature enabled. Note that due to the size of this feature, the diagnostics menu is NOT available in this version.

The CHUCK versions have Chuck Henderson's RSSI and Squelch modifications enabled. This is probably the version that most user's will want to use in production.


Compiling Environment

If you look in the votersystem.pdf, you will find a procedure to modify and load the bootloader in to the dsPIC of a VOTER board.

Unfortunately, there is an important step missing in that procedure, which is covered below.

In addition, the old links for the MPLAB software are dead, so let's update this info and get you going.

Currently (Feb 2017), you can get the required software from:

http://www.microchip.com/development-tools/downloads-archive

Download MPLAB IDE 32-bit Windows v8.66:

http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_v8_66.zip
http://dvswitch.org/files/AllStarLink/Voter/MPLAB_IDE_v8_66.zip

Download MPLAB C Compiler for PIC24 and dsPIC DSCs v3.31 NOT v.3.25:

http://ww1.microchip.com/downloads/en/DeviceDoc/mplabc30-v3_31-windows-installer.exe
http://dvswitch.org/files/AllStarLink/Voter/mplabc30-v3_31-windows-installer.exe

Optionally, install Windows Virtual PC and XP Mode. This is getting to be pretty old software, so running it under XP Mode may be a good idea, so we can keep it isolated (install it in a virtual machine). It does run fine in Windows 7.

To setup the compile/build environment, follow these steps:

  • Run the MPLAB IDE installer. You don't need to install the HI-TECH C Compiler at the end (click no)
  • Run the MPLAB C Compiler installer
  • Select Legacy Directory Name
  • Select Lite Compiler
  • Go to: https://github.com/AllStarLink
  • Follow the links to: voter --> Clone or Download --> Download Zip. That will get you voter-master.zip which is a download of the whole VOTER tree from GitHub.
  • Extract it somewhere (ie. in the XP Mode Virtual PC)
  • Launch the MPLAB IDE
  • Go to Configure --> Settings --> Projects and de-select one-to-one project mode.


Bootloader

If you need to load the bootloader in to a fresh board, you will need to follow these steps:

  • Go to Project --> Open --> voter-bootloader.mcp --> Open (it is in the voter-bootloader folder of the GitHub source)
  • Go to File --> Import --> voter-bootloader --> ENC_C30.cof --> Open This step is missing from the original procedure.
  • Remove JP7 on the VOTER Board. This is necessary to allow programming by the PICKit2/PICKit3 device.
  • Attach the PICKIT2/PICKit3 device to J1 on the VOTER board. Note that Pin 1 is closest to the power supply modules (as indicated on the board).
  • If you have not already selected a programming device, go to Programmer --> Select Device and choose PICKit3 (or PICKit2, depending on what you are using).
  • Go to Programmer --> Program. This will program the bootloader firmware into the PIC device on the board.

If you want to change the default IP address from 192.168.1.11 in the bootloader:

  • Select View --> Program Memory (from the top menu bar)
  • Hit Control-F (to "find") and search for the digits "00A8C0".
  • These should be found at memory address "03018".

The "A8C0" at 03018 represents the hex digits C0 (192) and A8 (168) which are the first two octets of the IP address. The six digits to enter are 00 then the SECOND octet of the IP address in hex then the FIRST octet of the IP address in hex.

The "0B01" at 0301A represents the hex digits 0B (11) and 01 (1) which are the second two octets of the IP address. The six digits to enter are 00 then the FOURTH octet of the IP address in hex then the THIRD octet of the IP address in hex.

Once you have modified the address to your desired IP, follow the programming procedure (above).


Firmware

To compile the firmware (if you want to make custom changes):

  • Go to Project --> Open --> navigate to board-firmware and open the .mcp file for the flavor of firmware you want to compile. They are in the board-firmware folder of the GitHub source.
  • NOTE: the .mcp files with the "smt" suffix are for the RTCM (built with SMT parts). The non-smt files are for the ORIGINAL through-hole VOTER boards. The difference is that the VOTER uses a dsPIC33FJ128GP802 and the RTCM uses a dsPIC33FJ128GP804.
  • Go to Project --> Build Configuration and select "Release". This may not be necessary (I don't believe that option is used in the firmware), but it removes the compiler option of __DEBUG being passed, so theoretically it would build "normal" firmware.
  • Go to Configure --> Select Device and choose the appropriate device for your board from the Device list. If you don't select the right one, the board will not boot. Select dsPIC33FJ128GP802 for the VOTER, and dsPIC33FJ128GP804 for the RTCM.
  • Now, if you go to Project --> Build All it should compile everything and show you "Build Succeeded".

A .cry file should be in the board-firmware folder. You can load this with the ENC Loader.

There is also a .hex file in there that you could load with a programmer... but that would wipe the bootloader... so don't do that.


Chuck Squelch

If you want to enable "Chuck Squelch", open the HardwareProfile.h and un-comment #define CHUCK.

You may also want to go down to Line 291 in Voter.c (right click on the window, go to Properties --> "C" File Types --> Line Numbers) and tack on CHUCK after 1.60 (the current version number) so that when you load this firmware, the version will be shown as 1.51CHUCK, and you'll know that Chuck Squelch is compiled in. We should probably make that more automagic in the future...


DSP/BEW

If you want to compile the DSPBEW version, open the DSPBEW project file instead.


DSP/BEW Firmware Version

DSP BEW Firmware is mutually exclusive with the diagnostic menu. There is not enough space for both, if you load the DSP/BEW firmware, you will NOT have a diag menu.

BEW stands for Baseband Examination Window.

Typically, the discriminator of an FM communications receiver produces results containing audio spectrum from the "sub-audible" range (typically < 100 Hz) to well above frequencies able to be produced by modulating audio. These higher frequencies can be utilized to determine signal quality, since they can only contain noise (or no noise, if a sufficiently strong signal is present).

For receivers (such as the Motorola Quantar, etc) that do not provide sufficient spectral content at these "noise" frequencies (for various reasons), The "DSP/BEW (Digital Signal Processor / Baseband Examination Window)" feature of the RTCM firmware may be utilized.

These receivers are perfectly capable of providing valid "noise" signal with no modulation on the input of the receiver, but with strong modulation (high frequency audio and high deviation), it severely interferes with proper analysis of signal strength.

This feature provides a means by which a "Window" of baseband (normal audio range) signal is examined by a DSP and a determination of whether or not sufficient audio is present to cause interference of proper signal strength is made. During the VERY brief periods of time when it is determined that sufficient audio is present to cause interference, the signal strength value is "held" (the last valid value previous to the time of interference) until such time that the interfering audio is no longer present.

The DSP/BEW feature is selectable, and should not be used for a receiver that does not need it.

A note on the Motorola SLR5700 per VE7FET. DSP/BEW definitely makes a difference on what AllMon reports for the signal strength of received signals. It is less reactive when DSP/BEW = 1 than with it set to 0. We'll have to see what the real world trials show. It might be better to leave it off.


Chuck Squelch

"Chuck Squelch" are a couple firmware changes made by Chuck Henderson, WB9UUS.

Pre-compiled firmware versions including this option are available on GitHub. See above on how it is enabled/compiled, if you are rolling your own firmware modifications.

One of the changes fixes an issue with weak signals producing RSSI readings all over the place. It is caused by a 16 bit value that was overflowing (it is the RSSI change in the firmware). It results in rock-solid RSSI values being reported, even on barely or non-readable signals. This change will likely be rolled in to a permanent fix in a future firmware release.

The other firmware change changes how the squelch responds (looks at the noise in the last two audio samples) and makes the "Micor squelch" action work better.

You may also want to consider the following changes in /etc/asterisk/voter.conf:

;Comment out:
;thresholds =

;and set:
linger = 0

Squelch Issues

  • If anyone is off frequency a little bit, that will make the voice talk off worse. Double check that the repeater and the users are all on frequency.
  • Don't use narrow bandwidth on the repeater receiver.
  • Make sure that the discriminator audio is not rolled off even a little bit at the high end. There should not be resistors in series or capacitors to ground between the discriminator chip output pin and the voter board input, for best results.


RTCM/VOTER LED's

RX LED on the RTCM/VOTER will flash (same rate as ACT LED) if you have External CTCSS enabled, and the received signal has the wrong (or no) valid PL.


TX Level Setting

  • Send 1kHz@3kHz on-channel in to the RX
  • Set the RX up so it reads 3kHz deviation on the RTCM's built in console meter
  • Now set the TX level pot to get 3kHz out of the transmitter (No PL)

Now change the modulation from 1kHz tone to 800Hz followed by 1.8kHz and verify that the deviation level doesn't change as the tone frequency changes. Changing levels indicates a pre/de-emphasis issue.

If using PL you have to account for that deviation, unless you filter it out with your IFR (test set).


GPS Issues

GPS Lock

The GPS led will go solid regardless of the connection LED. That has to happen or it won't connect to the Asterisk server.

It is not unusual for it to take up to 20 mins to get a GPS lock LED (ie. using a Trimble Thunderbolt) after any reboot.


GPS De-sense

If you are having odd loss of lock issues, consider you may have interference to your GPS antenna from strong RF nearby. A note from Jesse Lloyd:

I also had crazy problems with poor signal on my GPS when I set it up sitting in a window, and once installed at site I had the GPS antenna maybe 6 ft from the VHF antenna, and after some troubleshooting found it was getting swamped with RF and loosing lock. 

I found the debug setting of 40 useful in the RTCM, you can see a hex output of the GPS status.  


NMEA Sentences

If you are using an NMEA GPS (as opposed to a Trimble using the TSIP binary interface), the RTCM/VOTER is looking for the following NMEA sentences:

$GPGGA
$GPGSV
$GPRMC

Trimble Thunderbolt

Garmin LVC