What is the Receive Power of HackRF?The maximum RX power of HackRF One is -5 dBm.
--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/927344037.3793776.1643426785380%40mail.yahoo.com.
--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/1036172984.3885074.1643477101188%40mail.yahoo.com.
To safely test HL2 broadband transmit and receive, I've found that the HL2 receive capability is good enough that I can connect both HL2's to 2 different 50 Ohm dummy loads that are near each other, and receive on one HL2 what I transmit on the other. For weaker signal testing I move the 2 dummy loads farther apart and use lower maximum amplitude samples (down to a fraction of 1 bit, dithered).
UDP traffic to/from the HL2 has to go in both directions to reliably get past my network router and WiFi firewalls. So I always use HL2 duplex from my Raspberry Pi's and iOS devices. Never tried duplex off.
To get my FFT out of the loop, I optionally capture raw data from the HL2 to a file, and then can later replay that data from a file to my FFT/spectrum/waterfall/etc. experiments. I also synthesized known spectrum data for file playback, so I could view known signals in the waterfall for debug, and compare them to HL2 captured data.
I can answer some of this.The protocol spec is described at https://github.com/softerhardware/Hermes-Lite2/wiki/Protocol, you should read the USB_protocol_V and Metis documents linked in the first paragraph. Then read the rest of the article explains the HL2 specific additions and interpretations of the base protocols.After the discovery phase, and the commands which start, stop, set number of receivers, and sample rate, which are all fairly transparent, comes the sample streaming phase.
Notes on the sequence 0xef, 0xfe, 0x05 in ethernet frames
The 0xef, 0xfe, 0x05 sequence indicates a special command sent to port 1025
The definitive source code for what is recognized by the HL2 is in the dsopenhpsdr1.v file around lines 183 to 195: https://github.com/softerhardware/Hermes-Lite2/blob/master/gateware/rtl/dsopenhpsdr1.v
My interpretation of (and comments on) the sequence 0xef, 0xfe, 0x05
It's a mechanism to send a command to the SDR on the alternate port 1025 regardless of whether or not the start command has been sent
Python function 'command()' in hermeslite.py shows the message sent is: bytes([0xef,0xfe,0x05,0x7f,addr<<1])+cmd+bytes([0x0]*51) where command can be either a 32 bit number or a four byte sequence
'addr' corresponds to C0 and 'cmd' corresponds to C1 C2 C3 C4 of the main openhpsdr protocol

The code for controlling the HL2 is hard to read in any language because it is continuously sending transmit packets and continuously handling receive packets. The HL2 is controlled through headers in transmit packets. The HL2 communicates back through headers in the receive packets. The interaction between the two streams gets really hairy when sending i2c commands and waiting for acknowledgement.
The HL2 shuts down if enough transmit packets don't arrive, it assumes it is out of control and returns to the stopped state.
The Metis Start packet is <0xEFFE><0x04>< Command><60 bytes of 0x00> where Command bit[0] starts the radio and bit[1] starts the wideband data as in protocol 1. The HL2 also uses bit[7] to disable the internal watchdog timer. The watchdog timer requires that the host computer send regular commands to keep the HL2 running. This ensures that the HL2 doesn't continue sending data if the host computer program crashes. Setting bit[7] disables this feature. It is useful for some receive-only programs such as CW skimmer.
The receive packets continue to deliver the specified number of receivers at the specified sample rate until the radio is stopped. If you want to reduce the cpu load on your rpi, then reduce the number of receivers and/or reduce the sample rate. I believe you can run with 0 receivers if you like.
I believe that duplex is simply switching the cable modem chip between simplex and duplex modes. The receiver samples will all be zero during transmit if you operate simplex, but they will continue arriving at the rate required for the specified number of receivers and sample rate, which could be a lot of zeros.
Using the USB_protocol_V document and the Metis document and the wiki page, you can compute exactly the volume of UDP receive packets your rpi can expect for any combination of number of receivers and sample rate.
I could be out of date, it's been several years, but I don't see any hints of change as drastic as you want.The idea that duplex=0 should mute the receiver samples is interesting, except that it would break all the existing HL2 software. It would be thrown into a panic when the receiver stopped sending samples at the rate specified by the protocols. Lots of code uses the number of received packets to time the sending of transmit packets.
One comment, the place in the code that branches off of the value 8'h05 is to support the secondary port 1025 communication. That is an extension to openhpsdr. I actually did not want to document it in the spec as I don't think software should make use of it. It is more of a debug port only for hermeslite.py. The file hermeslite.py is the best documentation for its use.

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/1930005782.4339361.1643640405350%40mail.yahoo.com.
For HPSDR Connector[1] (which works with OpenWebRX and so is receive-only) I chose to simply send dummy TX packets to keep the watchdog timer happy. I thought that might help compatibility with other HPSDR radios, but I don't know whether that's actually true.

Sending UDP packets to the HL2 continuously (at the unused audio rate) usually reports back status far more promptly if the network route becomes unreachable, faster than waiting for a receive data underflow time-out. The additional CPU load for sending packets, compared to handling the received IQ samples, is negligible.

rdp@pmax:~/code/sdr/Patroclus/Patroclus.Avalonia$ dotnet restoreDetermining projects to restore...Restored /home/rdp/code/sdr/Patroclus/Patroclus.Avalonia/Patroclus.Avalonia.csproj (in 16.38 sec).rdp@pmax:~/code/sdr/Patroclus/Patroclus.Avalonia$ dotnet run
/home/rdp/code/sdr/Patroclus/Patroclus.Avalonia/Controls/MultiSpinner.cs(127,33): warning CS0672: Member 'MultiSpinner.OnTemplateApplied(TemplateAppliedEventArgs)' overrides obsolete member 'TemplatedControl.OnTemplateApplied(TemplateAppliedEventArgs)'. Add the Obsolete attribute to 'MultiSpinner.OnTemplateApplied(TemplateAppliedEventArgs)'. [/home/rdp/code/sdr/Patroclus/Patroclus.Avalonia/Patroclus.Avalonia.csproj]
/home/rdp/code/sdr/Patroclus/Patroclus.Avalonia/ViewModels/FakeHermesNewProtocol.cs(53,14): warning CS0414: The field 'FakeHermesNewProtocol.hermesCodeVersion' is assigned but its value is never used [/home/rdp/code/sdr/Patroclus/Patroclus.Avalonia/Patroclus.Avalonia.csproj]/home/rdp/code/sdr/Patroclus/Patroclus.Avalonia/ViewModels/FakeHermesNewProtocol.cs(265,14): warning CS0414: The field 'FakeHermesNewProtocol.actualPacketCount' is assigned but its value is never used [/home/rdp/code/sdr/Patroclus/Patroclus.Avalonia/Patroclus.Avalonia.csproj]00000089
