Skip to content

Commit

Permalink
Merge branch 'sevenrx' to master
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-McDermott committed Jul 11, 2017
2 parents 00b83f1 + df99ffe commit a1e3692
Show file tree
Hide file tree
Showing 14 changed files with 681 additions and 396 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
########################################################################
cmake_minimum_required(VERSION 2.6)
project(gr-hpsdr CXX C)

#### Enable c++ 11 For lists Added July 2017
set(CMAKE_CXX_FLAGS "-std=c++11")


enable_testing()

#select the release build type by default to get optimization flags
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
gr-hpsdr
========

gnuradio 3.7 modules for HPSDR Hermes / Metis.
gnuradio 3.7 modules for OpenHPSDR Hermes / Metis and Red Pitaya using the OpenHpsdr protocol. July 2017

* hermesNB sources decimated downconverted 48K-to-384K receiver complex stream(s), and sinks one 48k sample rate transmit complex stream.
* hermesWB sources raw ADC samples as a vector of floats, with vlen=16384. Each individual vector contains time contiguous samples. However there are large time gaps between between vectors. This is how HPSDR produces raw samples, it is due to Ethernet interface rate limitations between HPSDR and the host computer.

The modules are compatible with version 3.7 of gnuradio and versions of Hermes firmware 1.8 through at least 3.1. It will not be compatible with the new HPSDR protocol under development that could be released for Hermes perhaps sometime in 2015.
The modules are compatible with version 3.7.x of gnuradio and Hermes firmware version 1.8 through 3.2 (known as OpenHPSDR
protocol 1). It is not compatible with the new OpenHPSDR protocol 2.

Updated to merge the 'alex' branch into 'master'. This adds fields to control Alexaries (Alex) LPF and HPF filters, transmit and receive antenna selection, and 6m LNA. Verbose mode ON prints out the rough (uncalibrated) Alex Forward power and Reverse power measurements in the console area.
Updated to increase the maximum number of receivers to 7. Hermes only supports 4 receivers due to limited FPGA capacity. Red Pitaya with the OpenHPSDR protocol supports 6 receivers. Note that beyond 4 receivers and 384k sample rate exceeds 100 Mb/s Ethernet interface capacity.

If no Alex module is present (just Hermes/Metis) then the Alex control fields will have no effect, and the Verbose mode will produce nonsense for Fwd and Rev power measurements, but valid Hermes FPGA revision string.

Expand All @@ -19,14 +20,21 @@ To build:

mkdir build
cd build
cmake ../
cmake ..
make
sudo make install
sudo ldconfig

Note:
-----
Note: the build configuration writes files to locations prefixed with /usr/local which is appropriate for gnuradio that has been installed and built from source. If gnuradio was installed from a binary (for example using apt-get) it may expect Out-Of-Tree modules to be installed in a different location. If so the cmake command may need to be modified to change the desired installation path:

cmake .. -DCMAKE_INSTALL_PREFIX=/the-prefix-to-utilize


Release Tags:
-------------

* v1.0 - An older version provided for backwards compatibility (for gnuradio 3.7.2 to 3.7.9, and Ubuntu 14.04).
* v1.1 - Supports 1 or 2 receivers, gnuradio 3.7.10 and later, and Ubuntu 16.04. The buffer handling in this version is more efficient than v1.2 and later, but that may not be important in your application.
* v1.2 - Supports 1 to 7 receivers. Your actual hardware likely supports fewer than 7 receivers. Hermes supports 4, Red Pitaya 6. More than 4 receivers / 384k requires the use of gigabit Ethernet.

Sept 3, 2016 -- Upon upgrade to Xenial (Ubuntu 16.04.1) and gnuradio 3.10, some swig-->python type checking changed. If you are using either 16.04,
or gnuradio 3.10, then git checkout the xenial310 branch rather than master, and build that instead.

68 changes: 57 additions & 11 deletions grc/hpsdr_hermesNB.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
<category>hpsdr</category>
<flags>throttle</flags>
<import>import hpsdr</import>
<make>hpsdr.hermesNB($Rx0F, $Rx1F, $TxF, $RxPre, $PTTmode, $PTTTx, $PTTRx, $TxDrive, $RxSmp, $Intfc, $CkS, $AlexRA, $AlexTA, $AlexHPF, $AlexLPF, $Verbose, $num_outputs,$MACAddr)</make>
<make>hpsdr.hermesNB($Rx0F, $Rx1F, $Rx2F, $Rx3F, $Rx4F, $Rx5F, $Rx6F, $Rx7F, $TxF, $RxPre, $PTTmode, $PTTTx, $PTTRx, $TxDrive, $RxSmp, $Intfc, $CkS, $AlexRA, $AlexTA, $AlexHPF, $AlexLPF, $Verbose, $num_outputs, $MACAddr)</make>
<callback>set_Receive0Frequency($Rx0F)</callback>
<callback>set_Receive1Frequency($Rx1F)</callback>
<callback>set_Receive2Frequency($Rx2F)</callback>
<callback>set_Receive3Frequency($Rx3F)</callback>
<callback>set_Receive4Frequency($Rx4F)</callback>
<callback>set_Receive5Frequency($Rx5F)</callback>
<callback>set_Receive6Frequency($Rx6F)</callback>
<callback>set_Receive7Frequency($Rx7F)</callback>
<callback>set_RxSampRate($RxSmp)</callback>
<callback>set_RxPreamp($RxPre)</callback>
<callback>set_PTTMode($PTTmode)</callback>
Expand Down Expand Up @@ -38,6 +44,42 @@
<value>7200000</value>
<type>real</type>
</param>
<param>
<name>Rcvr 2 Frequency, Hz.</name>
<key>Rx2F</key>
<value>7200000</value>
<type>real</type>
</param>
<param>
<name>Rcvr 3 Frequency, Hz.</name>
<key>Rx3F</key>
<value>7200000</value>
<type>real</type>
</param>
<param>
<name>Rcvr 4 Frequency, Hz.</name>
<key>Rx4F</key>
<value>7200000</value>
<type>real</type>
</param>
<param>
<name>Rcvr 5 Frequency, Hz.</name>
<key>Rx5F</key>
<value>7200000</value>
<type>real</type>
</param>
<param>
<name>Rcvr 6 Frequency, Hz.</name>
<key>Rx6F</key>
<value>7200000</value>
<type>real</type>
</param>
<param>
<name>Rcvr 7 Frequency, Hz.</name>
<key>Rx7F</key>
<value>7200000</value>
<type>real</type>
</param>
<param>
<name>Transmit Frequency, Hz.</name>
<key>TxF</key>
Expand Down Expand Up @@ -97,7 +139,7 @@
<type>int</type>
</param>
<param>
<name>Num Rcvrs (1 or 2)</name>
<name>Num Rcvrs (1 .. 7)</name>
<key>num_outputs</key>
<value>1</value>
<type>int</type>
Expand Down Expand Up @@ -252,7 +294,7 @@
</param>

<check>$num_outputs >= 1</check>
<check>2 >= $num_outputs</check>
<check>7 >= $num_outputs</check>

<!-- Make one 'sink' node per input. Sub-nodes:
* name (an identifier for the GUI)
Expand All @@ -276,23 +318,26 @@
</source>

<doc>
This block is the HPSDR Hermes/Metis module.
It supports one or two receivers and one transmitter in the Narrow Band
(digital downconversion) mode.
This block is the HPSDR Hermes/Metis module, protocol_1.
It supports one transmitter. It supports one through seven
receivers, your hardware probably supports less than 7 receivers.
Hermes supports 4 receivers maximum.
Red Pitaya supports 6 receivers maximum.

*RxSamp = 48000, 96000, 192000, or 384000
*RxPreamp = 0 (Off), or 1 (On)
*PTTMode = 0 (TxOff), 1 (Vox on Txframe contents), or 2 (TxOn)
*PTTOffMutesTx = 0 (Tx always emits), 1 (Tx IQ is zeroed when PTT is Off)
*PTTOnMutesRx = 0 (Rx always receives), 1 (Rx IQ is zeroed when PTT is On)
*TxDrive = 0..255 (0 is minimum (but not zero) drive, 255 is maximum drive)
Rcvr0 corresponds to out0, Rcvr1 corresponds to out1.
Rcvr0 corresponds to out0, Rcvr1 corresponds to out1.
*Interface = the ethernet interface to use.
Example: "eth0" {including quote marks}.
*Clock Source = HPSDR Clock Selector - 1 byte-> assigned to one register.
byte->C1 when C0 = 0. Allows selection of clock and mic sources. Only upper
6 bits are used (lower 2 bits are overwritten by receive sample speed
selection. Hermes ignores this register. Default value selects Mercury.
Example: "0xfc" {including quote marks}
byte->C1 when C0 = 0. Allows selection of clock and mic sources. Only upper
6 bits are used (lower 2 bits are overwritten by receive sample speed
selection. Hermes ignores this register. Default value selects Mercury.
Example: "0xfc" {including quote marks}
*Alex Tx Ant = selects transmit antenna (Tx1, Tx2, or Tx3).
*Alex Rx ant = selects receive antenna connector, or Tx antenna via T/R relay.
*Alex Tx LPF = selects transmit Low Pass Filter. Auto tracks the Transmit Frequency.
Expand All @@ -302,5 +347,6 @@
select the first detected Metis/Hermes regardless of it's MAC Address.
MACAddr is a string (and must be enclosed in quotes).
Update: 03-13-2014: Reverse transmit I and Q samples (FPGA reverses them).
Update: July 2017 - increase receivers supported to 7.
</doc>
</block>
15 changes: 12 additions & 3 deletions include/hpsdr/hermesNB.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
* Copyright 2013-2015 Thomas C. McDermott, N5EG
* Copyright 2013-2017 Thomas C. McDermott, N5EG
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -46,15 +46,24 @@ namespace gr {
* class. hpsdr::hermesNB::make is the public interface for
* creating new instances.
*/
static sptr make(int RxFreq0, int RxFreq1, int TxFreq, bool RxPre,
int PTTModeSel, bool PTTTxMute, bool PTTRxMute,
static sptr make(int RxFreq0, int RxFreq1, int RxFreq2, int RxFreq3,
int RxFreq4, int RxFreq5, int RxFreq6, int RxFreq7,
int TxFreq, int RxPre,
int PTTModeSel, int PTTTxMute, int PTTRxMute,
unsigned char TxDr, int RxSmp, const char* Intfc,
const char * ClkS, int AlexRA, int AlexTA,
int AlexHPF, int AlexLPF, int Verbose, int NumRx,
const char* MACAddr);

void set_Receive0Frequency(float); // callback
void set_Receive1Frequency(float); // callback
void set_Receive2Frequency(float); // callback
void set_Receive3Frequency(float); // callback
void set_Receive4Frequency(float); // callback
void set_Receive5Frequency(float); // callback
void set_Receive6Frequency(float); // callback
void set_Receive7Frequency(float); // callback

void set_TransmitFrequency(float); // callback
void set_RxSampRate(int); // callback
void set_RxPreamp(int); // callback
Expand Down
2 changes: 1 addition & 1 deletion include/hpsdr/hermesWB.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace gr {
* class. hpsdr::hermesWB::make is the public interface for
* creating new instances.
*/
static sptr make(bool RxPre, const char* Intfc, const char * ClkS,
static sptr make(int RxPre, const char* Intfc, const char * ClkS,
int AlexRA, int AlexTA, int AlexHPF, int AlexLPF,
const char* MACAddr);

Expand Down
Loading

0 comments on commit a1e3692

Please sign in to comment.