3

I've got a USRP X310, currently with just one daughterboard, a WBX-120. I'm writing some C which needs to operate the radio full duplex - I receive on RF A RX2 and transmit on RF A TX/RX.

But I'm confused as to how I identify which number channels I use, because I was under the impression that the function uhd_usrp_set_tx_subdev_spec essentially attached my TX path to a particular channel. So if I call uhd_usrp_set_rx_subdev_spec and then uhd_usrp_set_tx_subdev_spec with A:0 as the subdevice, am I getting RX on channel 0 and TX on channel 1, or am I getting both on channel 0?

What happens when I add the second daughterboard, to be an SBX-120? In pseudocode I will be calling:

uhd_usrp_set_rx_subdev_spec("A:0")
uhd_usrp_set_tx_subdev_spec("A:0")
uhd_usrp_set_rx_subdev_spec("B:0")
uhd_usrp_set_tx_subdev_spec("B:0")

Will these then be channels 0, 1, 2, 3? What happens if I change the order of calling uhd_usrp_set_xx_subdev_spec?

Kevin Reid AG6YO
  • 24,195
  • 7
  • 48
  • 101
Walkingbeard
  • 141
  • 4

1 Answers1

1

The TX channels are separate from the RX channels. Hence, there will be a singkle, dual-stream RX streamer, and a single, dual-stream TX streamer.

The subdev strings in your pseudocode aren't doing what you want; docs. You also don't need them – if you request a dual-stream streamer, the default behaviour is to count them ascendingly.

So, if you just get two dual-channel RX streams with uhd_usrp_get_rx_stream, you just use a uhd_stream_args_t that has its n_channels field set to 2. Same for uhd_usrp_get_tx_stream.

Marcus Müller
  • 15,225
  • 22
  • 44
  • Thanks Marcus, but I'm not sure I've explained myself correctly. I did read the page on configuration before posting, but I'm still confused. You are saying that, when referring to either streamer, the WBX will be channel 0 and the SBX channel 1? – Walkingbeard Jul 31 '17 at 09:38
  • That doesn't make sense to me because, when using the `uhd_rx_streamer_recv` function, there is no parameter for the channel. The data coming in on the WBX and on the SBX are completely different. How is this distinguishable? – Walkingbeard Jul 31 '17 at 09:42
  • _recv will fill two buffers at once when called upon a steamer that was configured for two streams! – Marcus Müller Jul 31 '17 at 09:47