Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to create RX/TX split for SoapyHackRF #44

Open
kschepps opened this issue May 23, 2023 · 3 comments
Open

Request to create RX/TX split for SoapyHackRF #44

kschepps opened this issue May 23, 2023 · 3 comments

Comments

@kschepps
Copy link

Since the HackRF is half duplex, it can only work as an RX or TX. Not both. I have two HackRF's. I'm trying to get SoapyMultiSDR to run one HackRF as TX and another as RX, but Soapy is only connecting one as RX and TX then ignoring the other which doesn't work.

If I adjust this source code and change HackRF_Settings.cpp where line 160 reads the below code, I can force the HackRF to be RX or TX once compiled.
For TX:
return (dir == SOAPY_SDR_RX) ? 1 : 0;
For RX:
return (dir == SOAPY_SDR_RX) ? 0 : 1;

However, this will overwrite the SoapyHackRF driver. I need separate drivers for only RX and only TX. My attempts to compile the source as a separate instance by editing the CMakeList has only caused crashes when trying to run.

@tomdionysus
Copy link

tomdionysus commented Nov 29, 2023

I have started work on a Soapy module for HackRF that is intended to allow 2x HackRF One units to be viewed as a single full-duplex device. The code so far is a best-guess draft, I'm waiting for delivery of 2 HackRF One SDRs to continue. @kschepps please feel free to jump on the below and take a look - what I know about real SDR engineering could comfortably be written on quite a small postcard with quite a large pen, and I could use all the help I can get.

This is pre-alpha: https://github.com/tomdionysus/SoapyHackRFDuplex

If I/we get it working, we can submit it to the powers that be at https://github.com/pothosware and hopefully others will find it useful - in my case, because it means I'll be able to build a LTE picocell using srsRAN and open5gs for under USD $250 :)

@kschepps
Copy link
Author

kschepps commented Nov 29, 2023

I got TX and RX working with two HackRF's with an if statement: if serial number equals one of my specific serial numbers then be RX else be TX. I was trying to use it with srsRAN to run an LTE signal. It started with no errors, but no devices would attach. Maybe there's a timing issue? I couldn't figure out how to confirm if the clocks were syncing or if something else was preventing it from working.

@tomdionysus
Copy link

tomdionysus commented Nov 29, 2023

Fair enough. At a guess, the HackRF modules are reporting one half duplex channel each to SoapyMultiSDR, which is likely smart enough not attempt to use them at the same time. Unless you're using TDD (which AFAIK the srsRAN ENB doesn't support) you need full-duplex on the uplink and downlink pair for LTE to work properly - which is why only full duplex devices are natively supported by srsenb. Hence, my attempt at my own module, which reports 2 channels, one TX, one RX, both marked full duplex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants