Tom-McDermott / gr-hpsdr

gnuradio interface module for HPSDR Hermes / Metis, and Red Pitaya (using OpenHPSDR protocol 1)
Other
16 stars 19 forks source link

possible problem in HermesProxy.cc #20

Closed F4HTB closed 2 years ago

F4HTB commented 2 years ago

Hello,

When the code start we call HermesProxy::HermesProxy to initialise. HermesProxy::HermesProxy is calling UpdateHermes(); to send registers.

in UpdateHermes function we call only for two receivers at this moment: Ligne 875 to 883.

BuildControlRegs(0, buffer);
metis_write(ep, buffer, length);
BuildControlRegs(4, buffer);
metis_write(ep, buffer, length);

BuildControlRegs(0, buffer);
metis_write(ep, buffer, length);
BuildControlRegs(6, buffer);
metis_write(ep, buffer, length);

this must be modified for all numbers of rx right?

Tom-McDermott commented 2 years ago

Hi - thank you for looking at the code and suggesting improvements. It's gratifying to receive bug reports and feature improvements.

I think that this change is perhaps not necessary. The register update code eventually calls all of the receiver registers in sequence. This occurs in HermesProxy::PutTxIQ()) about lines 1108-1112. This should set all configured receivers, and update them as the frequewncy changes.

The module was tested for 4 functional receivers on Hermes with tuning about 2 years ago, and there have been no substantive changes in this area since then. I should go back and re-test, but lack time right now.

Did you encounter a failure of the higher-umber receivers? Did the pull request you propose fix a particular problem that was encountered?

-- Tom, N5EG

F4HTB commented 2 years ago

Sorry Tom, i just see your response. I use two redpitaya with seven receivers. I noticed this because I wrote a little software based on your libs that allows me to send the I/Q stream directly into an alsa loopback. As I initialize my seven rx directly and don't change anything afterwards, I noticed this.

Tom-McDermott commented 2 years ago

Hi Olivier, I interpret that you are trying to use the modules as libraries. I'm glad that you are able to use them in your code. I would interpret this as a feature request rather than a bug.

In gnuradio the modules derive transmit timing and transmit FIFO fill level from the receive samples. In addition they provide dynamic updating of the receiver frequencies, antenna selection, etc.. So modification of how the register sequencing occurs could break those functions. Thus I would prefer to leave this issue closed.

-- Tom, N5EG