3
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ which daughterboard type $\endgroup$ Jul 28, 2017 at 15:44
  • $\begingroup$ Hey Kevin, thanks for the edit, but OP doesn't mention he's using GNU Radio, and both the usage of the C API and the fact that he's manually setting subdev specs point out that's not the case :) so I removed the gnuradio tag! $\endgroup$ Jul 28, 2017 at 18:05
  • $\begingroup$ @MarcusMüller Whoops. Thanks for catching that. $\endgroup$
    – Kevin Reid AG6YO
    Jul 28, 2017 at 18:15

1 Answer 1

1
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ 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? $\endgroup$ Jul 31, 2017 at 9:38
  • $\begingroup$ 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? $\endgroup$ Jul 31, 2017 at 9:42
  • $\begingroup$ _recv will fill two buffers at once when called upon a steamer that was configured for two streams! $\endgroup$ Jul 31, 2017 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .