[USRP-users] ERROR_CODE_ALIGNMENT (Multi-channel alignment failed) for 2 channel receiving with USRP2 and BasicRx

Craig Tong craigtong04 at gmail.com
Mon Oct 27 05:04:43 EDT 2014


Hi

I'm wondering if anyone can give me some pointers.

I'm trying to get 2 separate channels out of a USRP2 using the 
respective RF connectors on the BasicRx daughter board.

Currently its returning ERROR_CODE_ALIGNMENT (Multi-channel alignment 
failed) and I'm not getting any data out.

The relevant lines of code are:

m_pUSRP->set_rx_subdev_spec(uhd::usrp::subdev_spec_t("A:A A:B"));


uhd::stream_args_t oStreamArgs("sc16", "sc16"); //Use 16 bit complex shorts

std::vector<size_t> vChannelsNumbers;

vChannelsNumbers.push_back(0);

vChannelsNumbers.push_back(1);

oStreamArgs.channels = vChannelsNumbers;

m_pUSRPRxStreamer = m_pUSRP->get_rx_stream(oStreamArgs);


Then I'm also setting and checking the RTC on the USRP but I don't 
imagine this changes anything.

boost::posix_time::ptime oEpoch(boost::gregorian::date(1970,1,1));

boost::posix_time::time_duration oDurationSinceEpoc = 
boost::posix_time::microsec_clock::universal_time() - oEpoch;

uhd::time_spec_t oTimeNow(time_t(oDurationSinceEpoc.total_seconds()), 
long(oDurationSinceEpoc.fractional_seconds()), 
double(boost::posix_time::time_duration::ticks_per_second()));


m_pUSRP->set_time_now(oTimeNow);

uhd::time_spec_t oUSRPTime = m_pUSRP->get_time_now(); //Confirm time set


And the stream command
uhd::stream_cmd_t 
oStreamCmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
oStreamCmd.stream_now = true;

m_pUSRPRxStreamer->issue_stream_cmd(oStreamCmd);

The recv function doesn't return any data. If I change the 
vChannelNumber vector to contain only 0 or 1 then the code work but only 
the first of the 2 buffers passed to recv(...) is filled as is to be 
expected. The data rate into the PC is also half is this case so is 
seems like data is being streamed in the 2 channel case its just somehow 
misaligned (by timestamp?) according the UHD library.

If anyone has any ideas I would greatly appreciate it.

Kind regards

-- 
Craig Tong
Radar Remote Sensing Group
Department of Electrical Engineering
University of Cape Town

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141027/e14071e9/attachment-0002.html>


More information about the USRP-users mailing list