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

Antenna selection #3

Open
zaninime opened this issue Nov 27, 2022 · 4 comments
Open

Antenna selection #3

zaninime opened this issue Nov 27, 2022 · 4 comments

Comments

@zaninime
Copy link

I own a SDRPlay RSPdx that features three antenna ports. The library here mostly works fine with a simple addition to the device list, but it is lacking the antenna selection feature, as far as I can tell.

Things I tested:

  • miri_fm doesn't have an option for changing the antenna, same as miri_sdr
  • SoapyMiri also doesn't expose the different antennas the way SoapySDRPlay does.

This is my current output from the device probing command:

Probe device
[INFO] Opening SDRplay RSPdx :: 00000001...

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=MIRI
  hardware=RSP1
  index=0
  origin=https://github.com/ericek111/SoapyMiri

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 0 Tx
  Timestamps: NO
  Other Settings:
     * Offset Tune - MiriSDR Offset Tuning Mode
       [key=offset_tune, default=false, type=bool]
     * Bias Tee - GPIO8 pin enable (bias tee)
       [key=biastee, default=false, type=bool]
     * HW flavour - HW variant of the RSP1
       [key=flavour, default=false, type=string, options=(Default, SDRplay)]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: NO
  Supports AGC: YES
  Stream formats: CS16, CF32
  Native format: CS16 [full-scale=65536]
  Stream args:
     * Buffer Size - Number of bytes per buffer, multiples of 512 only.
       [key=bufflen, units=bytes, default=36864, type=int]
     * Ring buffers - Number of buffers in the ring.
       [key=buffers, units=buffers, default=15, type=int]
     * Async buffers - Number of async usb buffers (advanced).
       [key=asyncBuffs, units=buffers, default=0, type=int]
  Antennas: RX
  Full gain range: [0, 206] dB
    Automatic gain range: [0, 103, 1] dB
    LNA gain range: [0, 1, 1] dB
    Baseband gain range: [0, 59, 1] dB
    Mixer gain range: [0, 19, 19] dB
    Mixbuffer gain range: [0, 24, 6] dB
  Full freq range: [0, 2000] MHz
    RF freq range: [0, 2000] MHz
  Sample rates: 1.3, 1.536, 2.048, 5, 6, 7, 8, 9, 10, 12 MSps
  Filter bandwidths: 0.2, 0.3, 0.6, 1.536, 5, 6, 7, 8 MHz

If you have any pointers how to make this a reality, it would be highly appreciated.

@zaninime
Copy link
Author

Hey @ericek111, do you have any idea on this one?

@ericek111
Copy link
Owner

Looking at some PCB photos I found online and the binary API, I think the inputs are switched using a GPIO extender connected to the MSI.2500. I'm a little bit afraid that the other tuner would need to be initialized from scratch: https://www.sdrplay.com/wp-content/uploads/2018/05/RSPduo-Introduction-V3.pdf

So, it seems you'd need to write 0xRRVV4940, with RR being the register (0x13 for reg. 16) and VV being the bitfield set accordingly:

reg19, RSP1A:
(1 << 0) : DAB notch
(1 << 2) : broadcast notch, 1 for disable
(1 << 4) : biasT

reg19, RSP2:
(1 << 0) : biasT
(1 << 6) : notch
(1 << 7) : notch

reg18, RSP2:
(1 << 0) : ant
(1 << 1) : ant
(1 << 2) : ant
(1 << 6) : external reference

reg18, rspdx:
(1 << 1) : bias T
(1 << 2) : antenna 1
(1 << 3) : antenna 2
(1 << 4) : broadcast notch
(1 << 7) : DAB notch

@zaninime
Copy link
Author

Thanks a lot for the answer and sorry for the long delay, at the moment this is out of reach for me. I'd leave the issue open for posterity, but I can't pursue this any further right now.

@dashxdr
Copy link

dashxdr commented Feb 26, 2024

Do you have any pointers to MSI2500 documentation? The libmirisdr-5 code doesn't have any headers... and it just writes magic hex values into registers. The MSI001 is pretty well documented.

I have a slightly different version of the msi-sdr, the frequency bands + tuning don't match the two existing "flavours" and I'd like to add support for it.

I'm messing with it and keep running into awful frequency aliasing... I'm trying to grab 8 mhz samples to scan a large swath of RF space, but unless I choose a decent LO frequency it's a mess... I think I need to choose sample rate and LO frequency together to avoid as many aliased frequencies as possible... but the MSI2500 handles the sampling and it's not clear how to program it.

Any advice or suggestions would be greatly appreciated!

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

3 participants