Protocol Coverage - softerhardware/Hermes-Lite GitHub Wiki

Hermes-Lite Software Development

If software is developed or customized for the Hermes-Lite, it should strive to implement the Hermes data protocol and the Metis protcol. Not all functionality of the Hermes is covered. Please refer to the protocol coverage section below for more details.

Since the Hermes-Lite uses a different hardware platform, AD9866, some of the Hermes LTC2208 features are repurposed for the Hermes-Lite. Software that is aware of the Hermes-Lite can use the differentiating feature described above to implement these Hermes-Lite specific features.

  • Step attenuator and Dither is used to control the LNA in 1 dB increments as seen in the table on the Software wiki page
  • Random is used to control the AGC as described on the Software wiki page

The Hermes-Lite identifies itself as 0x06 instead of 0x01 in discovery to support Hermes-Lite specific software.

VNA Software Development

Starting with hardware revision 1.22, the Hermes-Lite supports the Hermes protocol VNA feature in which the PC scans a range of frequency points and the firmware returns the I/Q amplitude and phase for each. Starting from December 2016 Hermes-Lite supports a second method that scans the frequencies in the firmware (see below).

Basic VNA Operation for PC Scanning

Hermes is placed into PC-scan VNA mode by setting

  • the VNA bit (C0 0b0001001x, C2[7]) to one
  • the Duplex bit (C0 0b00000000, C4[2]) to zero
  • the number of receivers to one
  • the speed to 48 ksps.
  • the Alex data in C0 0b0001001x, C3 and C4 to zero

Change the VNA frequency by sending the new Tx frequency (C0 0b0000001x). The samples returned are the I/Q amplitude and phase for that frequency.

When in VNA mode, the following are true

  • The Tx phase word is used for Rx.
  • A sine wave is transmitted at the selected frequency. There is no need to send Tx samples. Do not turn on the MOX bit as VNA mode turns on the output.
  • Hermes returns microphone samples with the I/Q receiver samples, and VNA mode uses the least significant Mic bit to signal a frequency change. This bit is always zero except at the time a frequency change command is received by the firmware.

Basic VNA Software Flow for PC Scanning

  • Turn VNA mode on.
  • Set the frequency.
  • Detect the frequency change in the least significant bit of the Mic samples.
  • Wait for the frequency change to take effect, and the receiver signal to stabilize.
  • Collect and average N number of IQ samples from the receiver. Since Rx and Tx are in lock step, these represent a phase difference between Rx and Tx, as well as a magnitude.
  • Repeat for all frequencies of interest.

Hermes-Lite Considerations

  • Current VNA software leaves VNA mode on. This will prevent a subsequent connection, and you may have to cycle power to the Hermes-Lite hardware to recover. HamVNA has a button for "Disconnect" but a disconnect is not automatic on exit.
  • Current VNA software has no adjustment of TX power level or RX LNA gain. These should be made adjustable, and perhaps automatically adjusted by the software. The AD9866's dynamic range can be extended by clever use of the LNA.
  • Currently the VNA must be re-calibrated at every power on, since the phase between Rx and Tx is not defined at startup. The phase is maintained if the hardware is not powered down or used as a transceiver.

Software References

  • OpenHPSDR VNA Software is well commented. Basic ethernet interfacing can be reused.
  • Ham VNA uses the least significant bit to speed up frequency change detection.

Basic VNA Operation for Firmware Scanning

Hermes is placed into firmware VNA mode by setting

  • the VNA bit (C0 0b0001001x, C2[7]) to one
  • the Duplex bit (C0 0b00000000, C4[2]) to one
  • the number of receivers to one
  • the speed to 48 ksps
  • the Alex data in C0 0b0001001x, C3 and C4 to the number of scan frequencies desired. The most significant byte is C3.
  • set the Tx frequency to the starting frequency of the scan
  • set the Rx frequency to the frequency delta, the amount to add to the frequency for each point
  • set the TX power level and RX LNA gain as desired
  • set the MOX bit to one to produce output

When in firmware VNA mode, you must set the MOX bit to one to generate Tx output. As in PC-scan mode, Hermes-Lite generates a sine wave as the Tx output, the Rx and Tx frequencies are equal, and the samples represent the phase difference between Rx and Tx, as well as a magnitude. But there is no need to change the frequency. Hermes-Lite will return a continuous series of I/Q samples with a length equal to the number of scan points requested. There is a zero sample to separate blocks, and the sample after the zero sample is the sample corresponding to the starting frequency. There are exactly {C2, C3} samples (number of samples requested) between zero samples. In case there is an actual zero sample, the block length will be wrong, so discard all bad block lengths.

Hermes-Lite Protocol Coverage

This page describes what portions of Hermes data protocol the Hermes-Lite adheres to. This description follows the same order as the Hermes data protocol document.

Protocol - From HPSDR to PC

EP4

Bandscope data from the Hermes-Lite is sent in blocks of 2048 16-bit words where only 12 bis of each word are used. This is 4096 bytes. The actual UDP packets break this down further into chunks of 1024 bytes, so 4 UDP pacekts for a complete contiguous block. This differs from the Hermes in the size of the block, 2048 for the Hermes-Lite, either 8192 or 16384 for the Hermes. This is because the RAM is limited in the BeMicro SDK's Cyclone IV. Software has successfully supported bandscope on the Hermes-Lite.

EP6

For software compatibility, the Hermes-Lite uses the same packet structure as the Hermes to send data to the PC. IQ samples are the same as the Hermes. Mic/Line samples, M1 and M0, are present in the packet but set to 0.

Command & Control

C0[2:0]

PTT, DASH and DOT read 0

C0[7:3]==0000

  • C1 - LT2208 overload is 0, IO1 through IO4 are 1
  • C2 - Mercuy software serial number set to 0 as in Hermes
  • C3 - Penelope software serial number set to 0 as in Hermes
  • C4 - Hermes software serial number set to 31

C0[7:3]==0001

  • C1,C2 - AIN5 reads 200
  • C3,C4 - AIN1 reads 0

C0[7:3]==0010

  • C1,C2 - AIN2 reads 0
  • C3,C4 - AIN3 reads 0

C0[7:3]==0011

  • C1,C2 - AIN4 reads 0
  • C3,C4 - AIN6 reads 1000

C0[7:3]==0100

  • C1,C2,C3,C4 - Set to 0 as in Hermes

Protocol - From PC to HPSDR

For software compatibility, the Hermes-Lite uses the same packet structure as the Hermes to receive data from the PC. IQ samples are the same as the Hermes. Left and right audio samples are present in the packet but ignored.

The Hermes-Lite does not currently support programming of a static IP address into an eeprom. The intent is to use a different eeprom in version 2.0 and eventually support this. Starting with firmversion 20150729, the Hermes-Lite will respond to the set IP command and dynamically set the current IP address.

Command & Control

C0[0]

MOX switches between TX and RX and appears as PTT# on the frontend connector

C0[7:1]==0000000

C1
  • [7:2] Ignored as in Hermes
  • [1:0] Speed is implemented
C2
  • [7:1] 7 bits of user output implemented
  • [0] Normal or Class E mode is ignored
C3
  • [7:5] Alex ignored
  • [4] Random repurposed as RX ADC AGC enable: 1/0 is enabled/disabled
  • [3] Dither repurposed as RX LNA +32dB gain: 0/1 is +32/+0dB
  • [2] Preamp ignored
  • [1:0] Alex ignored
C4
  • [7:6] Ignored as in Hermes
  • [5:3] Number of IQ channels
  • [2] Duplex ignored except for combining TX/RX frequency
  • [1:0] Alex ignored

C0[7:1]==0000001 to C0[7:1]==0001000

Frequency selection as in Hermes

C0[7:1]==0001001

C1
  • [7:0] Drive level sets TX output
C2
  • [7] VNA is implemented starting from hardware v1.22 on
  • [6] Alex ignored
  • [5:2] Hermes filter and tuner select ignored
  • [1] Mic/Line ignored
  • [0] Mic boost ignored
C3

Alex ignored

C4

Alex ignored

C0[7:1]==0001010

C1

Ignored as in Hermes

C2
  • [7] Ignored as in Hermes
  • [6] PureSignal missing?
  • [5] Ignored as in Hermes
  • [4:0] Line In Gain ignored
C3

Ignored as in Hermes

C4
  • [7:6] Ignored as in Hermes
  • [5] Attenuator enabled/disable ignored
  • [4:0] Attenuator value repurposed as 0-32dB gain

C0[7:1] Remaining

Ignored as in Hermes