Firmware

Introduction

The OpenHPSDR Ethernet Protocol (aka protocol II) is the only protocol which will be supported for ANAN transceivers. This protocol is supported via firmware updates on TAPR Hermes boards and ANAN transceivers from Apache Labs. SDR Console supports the Hermes Lite variant of protocol I.

► This new firmware is still being tested and will be used in the PowerSDR Thetis release. When this is available together with new firmware installation software you will be able to use the ANAN support in this software.

Download
Download firmware from Github [Link].

Installation
Migration from Protocol 1 to Protocol 2 can be done using HPSDR Programmer or HPSDR Bootloader in the normal fashion. However, once Protocol 2 resides in the hardware, successive firmware loads will require the use of either a new P2 compatible programmer application or HPSDR Bootloader.. Very detailed instructions are available here: https://apache-labs.com/community/viewtopic.php?f=18&t=2333.

Version

10E: The current firmware used on the 10E for development is:
  • Protocol = 3.1,
  • Firmware = 10.2.
  • This is working well.

To determine your firmware version first start the radio, then select Logfile from the Tools pane in the ribbon bar. In the logfile look for an entry similar to that below, in this example the protocol is 3.1, firmware level is 10.2.

Receiving replies, timeout 2000 ms
Discovery, received 60 bytes from 192.168.1.180
Parsing:
    Sequence ...........: 0-0-0-0
    Response ...........: Available (02)
    MAC ................: 00-1E-C0-A5-CD-97-02-1F
    Board type .........: ANAN-10E, 100B (2)
    Version protocol ...: 03.1
            firmware ...: 10.2
            Mercury ....: 0-0-0-0
            Penny ......: 0
            Metis ......: 0
    Receivers ..........: 2
    Frequency or phase .: 1, Phase
    Mode big endian ....: 0
         little endian .: 0
    Format 3-byte ......: 0
           float .......: 0
           double ......: 0

Loading

Follow these steps:
  1. Read "Updating the ANAN-10E Firmware".
  2. Install WinPcap: "WinPcap is the industry-standard tool for link-layer network access in Windows environments: it allows applications to capture and transmit network packets bypassing the protocol stack, and has additional useful features, including kernel-level packet filtering, a network statistics engine and support for remote packet capture."
  3. Download and install the OpenHPSDR Bootloader from http://openhpsdr.org/download.php.
  4. Set a static IP address in the 10E with the OpenHPSDR Bootloader.

Guide To Using HPSDR Programmer and HPSDR Bootloader

Post by w-u-2-o » Sat Apr 08, 2017 6:02 pm

Overview:
HPSDR Programmer is generally the preferred way to upgrade/downgrade radio firmware. It is simpler and easier than HPSDR Bootloader. However, it does require the radio to have a proper IP address, either static, DHCP or APIPA, and it does require the existing firmware in the radio to be properly functional. If any of those conditions are not met, then that is the time to use HPSDR Bootloader.

There are now two different versions of HPSDR Programmer. Choose the correct version as follows:
  1.  If Protocol 1 firmware is currently in the radio hardware, to change it to another version of Protocol 1 or Protocol 2 firmware use the Protocol 1 HPSDR Programmer. 
  2. If Protocol 2 firmware is currently in the radio hardware, to change it to another version of Protocol 1 or Protocol 2 firmware use the Protocol 2 HPSDR Programmer.
If all of that is too confusing, then you can always use HPSDR Bootloader, it works with any combination of upgrades, downgrades, sidegrades, etc. Bootloader has its own challenges, however, including switches, jumpers, power cycles and a prohibition on managed Ethernet switches.

Firmware Download Instructions:
  1. Firmware should be obtained from the openHPSDR TAPR GitHub repository.
  2. Click on the link for the desired .rbf file (Do NOT right click and "Save as", this will cause you to get a small file that is NOT the .rbf file and this will NOT work. It is most unfortunate that GitHub allows this mistake, and worse, that Programmer or Bootloader do not verify the file and allow this mistake to propagate.)
  3. On the page that loads it should say "View Raw". Click the download button in the upper right of the page.

Protocol 1 HPSDR Programmer Instructions:
  1. If you have more than one network interface card (NIC) in your PC (including Wi-Fi), set your network metrics manually per the guidance here: http://www.w1aex.com/anan/ana.html#metric
  2. Download and install the Protocol 1 HPSDR Programmer.
  3. Power up radio.
  4. Run HPSDR Programmer.
  5. Click "Discover". HPSDR Programmer should discover the radio.

    At this point you can use the Programmer to change the IP or program the firmware. To program the firmware follow steps 6 through 8. Otherwise just program the IP and then skip to step 9.
  6. Click "Browse" in the Programmer section. Select the rbf file you want. If you get an error message you may need to rename the rbf file to "metis.rbf" because of some old code in the programmer.
  7. Click "Program" in the Programmer section. Wait for it to complete.
  8. HPSDR Programmer will attempt to re-discover the radio. Often times it will fail in the first attempt because the time-out setting is just a little bit short. Just click "Discover" again and it should find it.
  9. Quit HPSDR Programmer and enjoy your new firmware.
Protocol 2 HPSDR Programmer Instructions:
Note: although there is a Linux build of this programmer these instructions are specific to the Windows build.

1. Download zip file from Protocol 2 HPSDR Programmer.
2. Unzip the folder. There is no formal installer.
3. Open a Windows command prompt ("DOS") window.
4. Navigate to the folder you unzipped and run HPSDRProgrammer_web.exe (it is recommended you do this from a command prompt window so that you can watch for any error messages and because it gives you certain instructions).
5. Open a web browser and browse to "http://localhost:8228/intro/".

Steps 3-5 are a bit of pain. You can automate this by making a .bat file as follows (adjust the location of the executable file to taste):


cd C:\Program Files (x86)\OpenHPSDR\HPSDRProgrammer_web_v0.2.7_windows
start "" "HPSDRProgrammer_web.exe"
start "" http://localhost:8228/intro/

6. Click "Select Interface", then select the interface you think the radio is on. As of this posting if you guess wrong it is quite possible the programmer will crash. If so, start over at step 5.
7. If there is a radio to be found it will be on the "Select HPSDR" list. Select it and click "Select".
8. Click "Program" then click "Choose File", then choose the firmware file you want to load.
9. Click "Upload", then click "Program". The erasure phase will take a little over 30 seconds. No feedback will be seen in the command window. The programming phase will take about 7 seconds, you should see feedback in the command window.
10. Click "Quit", then click "Quit" again.
11. Enjoy your new firmware.

HPSDR Bootloader Instructions:
1. Do not use a managed (layer 2 or layer 3) switch. The MAC that the radio uses in bootloader mode is illegal and managed switches will not forward packets. Use a direct connection or a dumb switch.
2. If you have more than one network interface card (NIC) in your PC (including Wi-Fi), set your network metrics manually per the guidance here:


3. Download and install WinPCAP (Bootloader requires it, you will have to restart after install. Do NOT use "Win10PCAP", Bootloader will not work properly with it).
4. Download and install HPSDR Bootloader.
5. Power off radio.
6. Place jumper on board or flip bootloader switch to bootloader position, depending on the radio.
7. Power up radio.
8. Run Bootloader.
9. Click "Test for Bootloader". Bootloader should discover the radio.

At this point you can use the Bootloader to change the IP or program the firmware. To program the firmware follow steps 10 and 11. Otherwise just program the IP and then skip to step 12.

10. Click "Browse" in the Board Programmer section. Select the rbf file you want. If you get an error message you may need to rename the rbf file to "metis.rbf" because of some old code in the programmer.
11. Click "Program" in the Board Programmer section. Wait for it to complete.
12. Quit Bootloader.
13. Power off radio.
14. Remove jumper or flip bootloader switch back to normal position, depending on the radio.
15. Power up the radio and enjoy!

Programming Notes

Look at Performance Tuning for Low Latency Packet Processing, specifically Interrupt Moderation.

Consider thread affinity for the main ANAN and Modulation background threads.

Multiple LANs

Note for later: Go into the Properties of each connection (right click on it) –> select Internet Protocol (TCP/IP) –> click Properties -> click Advanced –> uncheck Automatic metric in the bottom and set a number between 1 and 9999 where the smaller the number the higher the connection priority.

UDP Packet Loss

Reduce packet loss via the registry setting below. Lots of information about tuning UDP available on the internet.

Entry:
    DefaultReceiveWindow
Key:
    HKEY_LOCAL_MACHINE
        SYSTEM
            CurrentControlSet
                Services
                    AFD
                        Parameters
Value Type:
    REG_DWORD
Suggested minimum value:
    16384
Share by: