Send USRP-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of USRP-users digest..."
Today's Topics:
1. Re: Using windows DLL (debug symbols on) gives error (Isaac Gerg)
2. Wrong register address in gen_ad9510_regs.py (Eral T?rkyilmaz)
3. Re: Two usrp receive to file at the same time by using
multi-thread (Eddie Sun)
4. Connect 2 USRP to the same computer (zitouni rafik)
5. Re: Connect 2 USRP to the same computer ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 24 Apr 2012 13:43:33 -0400
From: Isaac Gerg <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: [USRP-users] Using windows DLL (debug symbols on) gives
error
Message-ID:
<cadnn3yv269viaja1tc5kesqehz8zsnarnq1f+zjl0-hundz...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Josh,
I finally resorted to installing windows 7 on my machine and using visual
studio 10. My code works now, however, I would still like a debug version
of uhd.dll. Do you plan on building on anytime soon?
I got UHD with to build with VS 200, but nothing would execute without
crashing.
Thanks,
Isaac
On Thu, Apr 19, 2012 at 6:27 PM, Isaac Gerg <[email protected]> wrote:
> Hi Josh,
>
> No difference and the dll dependency walker stuff looks clean (just
> delay-load stuff which the interweb tells me is okay).
>
> I am building with v90 and not v100 like you. I am trying to build with
> v100 but the dang compiler keeps crashing even for simple hello world stuff.
>
> I might just have to go back linux!
>
> Isaac
>
>
> On Wed, Apr 18, 2012 at 6:48 PM, Josh Blum <[email protected]> wrote:
>
>>
>>
>> On 04/18/2012 03:40 PM, Isaac Gerg wrote:
>> > Hi All,
>> >
>> > I have built a UHD windows DLL that has debug symbols in it. When I
>> try to
>> > use it with my program, i get the following error:
>> > "The application failed to initialize properly"
>> >
>> > Nothing prints to the screen.
>> >
>> > I get this error even running the compiled version of
>> uhd_find_devices.exe
>> > using the debug dll i created. When I use the DLL that comes with the
>> > latest windows build (no debug symbols) from the ettus site, I get a
>> > different error. The program prints the following and then crashes
>> (same
>> > behavior I originally had before building my own uhd.dll with debug
>> > symbols).
>> >
>> > "Win32; Microsoft Visual C++ version 10.0; Boost_104700;
>> > UHD_003.004.001-0-release"
>> >
>> >
>> Those installers were built with msvc 2010. Does installing the
>> equivalent runtime make a difference?
>> http://www.microsoft.com/download/en/details.aspx?id=5555
>>
>> And make sure dependency walker doesnt list any errors (just checking).
>>
>> -josh
>>
>> _______________________________________________
>> USRP-users mailing list
>> [email protected]
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20120424/d53e8b8d/attachment-0001.html>
------------------------------
Message: 2
Date: Tue, 24 Apr 2012 15:49:34 +0000 (UTC)
From: Eral T?rkyilmaz <[email protected]>
To: [email protected]
Subject: [USRP-users] Wrong register address in gen_ad9510_regs.py
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hello,
I discovered a slight mistake in the file
.host/lib/ic_reg_maps/gen_ad9510_regs.py
while messing arround with clock inputs.
Line: 76 - 81
The Clock Select registers are at address 0x45 (hexadecimal!) instead of 45
(decimal)
When testing I fixed this inside the generated file gen_ad9510_regs.hpp and
after that the clock switching (CLK1, CLK2) did work.
Best regards
------------------------------
Message: 3
Date: Wed, 25 Apr 2012 21:55:44 +0800
From: Eddie Sun <[email protected]>
To: "Marcus D. Leech" <[email protected]>
Cc: [email protected]
Subject: Re: [USRP-users] Two usrp receive to file at the same time by
using multi-thread
Message-ID:
<cab6xthncidsa1o3iw1w6ap-rtyyadzlrekxoo_bc7twdbnt...@mail.gmail.com>
Content-Type: text/plain; charset="big5"
Hello,
i change the recv_to_file function by using the code that provide in the
rx_multi_samples.cpp like the following, and i add the line
outfile.write((const char*)&buffs.front(),
num_rx_samps*sizeof(samp_type));
in the while loop because i need to save the data to the file.
My question is, although now i can use two usrp together receive to two
files, but the sampling rate can't not be too fast, my original purpose is
one 4MHz/sec and one 20MHz/sec, but now i can only do one 4MHz and one
10MHz, if i use more faster rate(change 10 to 16 or 20), the program will
stop after several seconds suddenly.
The OS is windows7, the CPU is Intel core i7 and i got a SSD for saving the
files, but still have this problem, can someone help me?
Is the method write to file not good for multi usrp??(because that is the
original code from the rx_samples_to_file.cpp, used for single usrp)
or it has some other possibility cause this problem?
Thanks,
Eddie
template<typename samp_type> void recv_to_file_2usrp(
uhd::usrp::multi_usrp::sptr usrp,
const std::string &file,
double seconds_in_future,
size_t total_num_samps,
){
uhd::rx_metadata_t md;
std::ofstream outfile(file.c_str(), std::ofstream::binary);
//allocate buffers to receive with samples (one buffer per channel)
size_t samps_per_buff =
usrp->get_device()->get_max_recv_samps_per_packet();
std::vector<std::vector<samp_type> > buffs(
usrp->get_rx_num_channels(), std::vector<samp_type>(samps_per_buff)
);
//create a vector of pointers to point to each of the channel buffers
std::vector<std::complex<short> *> buff_ptrs;
for (size_t i = 0; i < buffs.size(); i++)
buff_ptrs.push_back(&buffs[i].front());
//the first call to recv() will block this many seconds before receiving
double timeout = seconds_in_future + 0.1; //timeout (delay before
receive + padding)
size_t num_acc_samps = 0; //number of accumulated samples
while(num_acc_samps < total_num_samps){
//receive a single packet
size_t num_rx_samps = usrp->get_device()->recv(
buff_ptrs, samps_per_buff, md,
uhd::io_type_t::COMPLEX_INT16,
uhd::device::RECV_MODE_ONE_PACKET, timeout
);
//use a small timeout for subsequent packets
timeout = 0.1;
//handle the error code
if (md.error_code == uhd::rx_metadata_t::ERROR_CODE_TIMEOUT) break;
if (md.error_code != uhd::rx_metadata_t::ERROR_CODE_NONE){
throw std::runtime_error(str(boost::format(
"Unexpected error code 0x%x"
) % md.error_code));
}
num_acc_samps += num_rx_samps;
outfile.write((const char*)&buffs.front(),
num_rx_samps*sizeof(samp_type));
}
if (num_acc_samps < total_num_samps) std::cerr << "Receive timeout
before all samples received..." << std::endl;
outfile.close();
}
Marcus D. Leech <[email protected]> ? 2012?4?19???7:34 ???
> On 19/04/12 04:33 AM, Eddie Sun wrote:
> > Hi all,
> >
> > i have a question about Two usrp samples_to_file at a same time
> > by using the MIMO cable, dual ethernet cable mode. The OS is Windows7
> > and using cygwin and MSVC 2010.
> >
> > i modified the rx_samples_to_file by adding an other usrp, and
> > most of the variables i declare two of them to save the second usrp
> > parameter( like declare file2 rate2 freq2....etc), and create two
> > thread, both call the function "template<typename samp_type> void
> > recv_to_file" to realize the purpose.
> >
> > But now i have a problem while running it, when both thread
> > created and go into the while loop of the recv_to_file() successfully
> > and it will show error like "R6010 abort() has been called" and the
> > process stop. i'm not sure if the MIMO setting is right or not. i only
> > know that i can run the process if i comment the "outfile.write((const
> > char*)&buff.front(), num_rx_samps*sizeof(samp_type));" and
> > "outfile.close();" in the recv_to_file().
> >
> > if i don't save the files, the process work fine, but if i put those
> > two lines back, even i slow down the sampling rate to like both
> > 4M/s(My purpose is one 20M/s and one 4M/s), and it still not work. Can
> > some one help me or give me some suggestion?
> >
> > The main changing part from the rx_samples_to_file.cpp of my program
> > is as following:
> >
> > first create the second usrp
> >
> > std::cout << boost::format("Creating the usrp device with: %s...")
> > % args2 << std::endl;
> > uhd::usrp::multi_usrp::sptr usrp2 =
> > uhd::usrp::multi_usrp::make(args2);
> >
> > and add the variable like file2, bw2, rate2, gain2, freq2 to catch the
> > second usrp's parameter. let the first usrp(Master) use the External
> > clock and second usrp(Slave) use the MIMO as clock and time
> >
> > usrp->set_clock_config(uhd::clock_config_t::external(), 0);
> >
> > uhd::clock_config_t clock_config;
> > clock_config.ref_source = uhd::clock_config_t::REF_MIMO;
> > clock_config.pps_source = uhd::clock_config_t::PPS_MIMO;
> >
> > usrp2->set_clock_config(clock_config, 0);
> >
> > usrp->set_time_now(uhd::time_spec_t(0.0), 0);
> > //sleep a bit while the slave locks its time to the master
> > boost::this_thread::sleep(boost::posix_time::milliseconds(100));
> >
> > and i add a global variable struct like
> >
> > void sig_int_handler(int){stop_signal_called = true;}
> > struct usrp_parameter{
> > uhd::usrp::multi_usrp::sptr usrp;
> > std::string file;
> > size_t spb;
> > }usrp_p1,usrp_p2;
> >
> > and use it to save the parameter in the UHD_SAFE_MAIN
> > usrp_p1.usrp=usrp; usrp_p1.file=file; usrp_p1.spb=spb;
> > usrp_p2.usrp=usrp2; usrp_p2.file=file2; usrp_p2.spb=spb;
> >
> > after that i use the command to start the stream
> > usrp->issue_stream_cmd(stream_cmd);
> > usrp2->issue_stream_cmd(stream_cmd2);
> >
> > and create two thread for receiving data at the same time
> >
> > HANDLE hThread[2];
> > unsigned threadID,threadID2;
> > hThread[0] = (HANDLE)_beginthreadex(NULL, 0, &threadfunction1,
> > &usrp_p1, 0, &threadID);
> > hThread[1]= (HANDLE)_beginthreadex(NULL, 0, &threadfunction2,
> > &usrp_p2, 0, &threadID2);
> > WaitForMultipleObjects(THREAD_COUNT,hThread,1,INFINITE);
> > CloseHandle(hThread[0]);
> > CloseHandle(hThread[1]);
> >
> > the threadfunction is like
> >
> > unsigned __stdcall threadfunction1(void* argu) {
> > recv_to_file<std::complex<short> >(usrp_p1.usrp, usrp_p1.file,
> > usrp_p1.spb);
> > _endthreadex(0);
> > return 0;
> > }
> >
> > i narrow down the recv_to_file() variable number from 4 to 3, cuz i
> > only need the short type, i replace the io_type to
> > uhd::io_type_t::COMPLEX_INT16;
> >
> > i'm sure both thread can create successfully and enter the function
> > recv_to_file, by using some printf(); i can confirm that, but i don't
> > know how to fix the "saving the file" problem of this run time error.
> > Did i missing somthing? Or what should i do to debug my program?
> >
> > Thanks,
> > Eddie
> >
> Look at the rx_multi_samples program that comes with the UHD source--it
> is designed to receive multiple
> streams.
>
>
>
>
> --
> Principal Investigator
> Shirleys Bay Radio Astronomy Consortium
> http://www.sbrac.org
>
>
>
> _______________________________________________
> USRP-users mailing list
> [email protected]
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20120425/ce3cfea2/attachment-0001.html>
------------------------------
Message: 4
Date: Wed, 25 Apr 2012 16:40:32 +0100 (BST)
From: zitouni rafik <[email protected]>
To: "[email protected]" <[email protected]>
Subject: [USRP-users] Connect 2 USRP to the same computer
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="utf-8"
Hello,
Can I use two USRP with same host?
On the UHD USRP source/sink I don't have the interpolation/decimation
parameter, Why ?
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20120425/37fe1d53/attachment-0001.html>
------------------------------
Message: 5
Date: Wed, 25 Apr 2012 11:55:02 -0400
From: [email protected]
To: <[email protected]>
Subject: Re: [USRP-users] Connect 2 USRP to the same computer
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Wed, 25 Apr 2012 16:40:32 +0100 (BST), zitouni rafik wrote:
yes, you can use two USRP on the same host, if it's a USB device, you
may have problems due to USB bandwidth/controller contention.
UHD
doesn't use the "decimation/interpolation" way of specifying sample
rate. You specify the sample rate directly. So, if you want to receive
data at 1Msps, you specify 1.0e6 in the sample-rate parameter in the
appropriate UHD source/sink block. UHD will comment if the desired
sample-rate doesn't match one that the hardware can support.
> Hello,
>
> Can I use two USRP with same host?
>
> On the UHD USRP
source/sink I don't have the interpolation/decimation parameter, Why ?
>
> Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20120425/cc56bea2/attachment-0001.html>
------------------------------
_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
End of USRP-users Digest, Vol 20, Issue 22
******************************************