Tutorial: How to add new radios

Overview:

To add support for a new radio:

  • Add the radio modelXXX and CI-V address to rigidentities.h
  • Add a case for your radio model to the switch in rigidentities.cpp
    • Incidentally, this is a good place to cause one radio to identify as another if you are testing
  • Within rigcommander.cpp:
    • Within the determineRigCaps() function, add a case for your radio. Try and keep the model numbers in numerical order.
      • Generally, you can copy/paste from a similar radio, for example, look at case model7410.
      • Tweak the available bands and modes. Look at the other existing radios for example
      • Adjust the “features” that are available, such as CTCSS
      • Add/remove preamp, attenuator, and antenna selection options
      • Add a CI-V Transceive command string (we use this so that we can keep transceive on, even when a shared control program is asking to turn it off)
      • Add a Hamlib rigctld model number (rigctlModel) that exists already in hamlib.
      • Populate the inputs vector with whatever the radio has available, but skip any inputs that can’t be selected in software via CI-V commands. For older rigs, this can be left with the default “mic” only.
    • For radios that have several mod inputs, such as ACC, USB, or others, and if there are commands to select the active input, you’ll need to traverse the maze of code and find where these are defined.
      • Start with the setModInput() function. There are two, use the one with more arguments as this one can both set and query the active input
        • Most Icom radios have the same command for setting and querying the input, followed by a byte for the input chosen (ACC, USB, etc).
        • Add your model to the switch case
      • Now add mod gain controls for adjusting the level:
        • Start at getModInputLevel, and follow each function
        • populate your rig in the getUSBAddr function and the getACCAddr function, as is appropriate.

That’s about it. For radios with more advanced features, such as spectrum, try to follow what is already available for similar radios.