GPS on USRP

Hi,
I am a newbie to USRP, and still struggling to get it working on my
windows machine. I am trying to use cygwin. I reckon that many ppl have
already acquired and tracked GPS on USRP. Waht I want to do is to
capture GPS IF samples (e.g. at IF=5 MHz) and use a software receiver to
process those IF samples on PC. Any suggestions to start?!..

Faisal A. KhanDoctral CandidateUniversity of New South WalesNSW 2052,
Sydney, AustraliaP) +61-2-93854208 M)+61-401-260728

Faisal,

I’m at Purdue University working toward using the USRP for GNSS
applications. Check my understanding: are you wanting to use the USRP
to record, say, L1 band samples directly to a data file? Would you be
performing all of the signal acquisition and tracking in post-processing
with a separate software tool?

I’m working on Linux (Debian), but we aught to be able to trade notes.
If you’ve got a working installation of GNU Radio, I can show you how to
record samples.

–Paul

Hi Faisal,

I’m also working with GNU Radio for GNSS applications. A good start
could be
a recording of samples into datafiles and then post-process the data in
the
way that you feel more comfortable (the book [1] comes with a DVD with a
complete GPS L1 receiver implemented in MATLAB, all GNU code). Once you
get
familiarized with the processing, you can try to implement the receiver
in
GNU Radio.

At least, this is the way I’m following. Any suggestion would be
welcome.

Cheers,
Carles.

[1] Kai Borre, Dennis M. Akos, Nicolaj Bertelsen, and Peter Rinder, A
Software-Defined GPS and Galileo Receiver: A Single-Frequency Approach
(Applied and Numerical Harmonic Analysis). Birkhäuser Boston; 1 edition
(November 9, 2006)

That is a great reference book. The Matlab code actually works and
generates a fix. Here is a link to some Over The Air captures,
including
GPS.

http://www.kd7lmo.net/ground_gnuradio_ota.html

Hi,

Check :

www.gps-sdr.com

Regards,

Firas

Paul C. wrote:

If you’ve got a working installation of GNU Radio, I can show you how to

to process those IF samples on PC. Any suggestions to start?!..


Join Lavalife for free. What are you waiting for?
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9.ninemsn.com.au%2Fclickthru%2Fclickthru.act%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den_AU%26a%3D30288&_t=764581033&_r=email_taglines_Join_free_OCT07&_m=EXT


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


View this message in context:
http://www.nabble.com/GPS-on-USRP-tp15751956p15772984.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Firas A. wrote:

Hi,

Check :

www.gps-sdr.com

Regards,

Firas
This is Great work.
It sound like you’ve got GPS working for the most part. And in a
multi-threading way. Which is very good.

Is the gps-sdr work-in-progress code available anywhere yet. I could
only find the USRP_UNO.tar code which seems to be only the C++ dbs-rx
+USRP
port.

A developer branch directory on the gnuradio svn server would probably
be a nice place for it.

Greetings,
Martin

Hi Paul,
Finally I got a working system of USRP radio. The FM radio example runs
smoothly (atleast opens up and captures nothing:giving errors like
"usb_control_msg failed: usb_control_msg failed: sending control message
failed, win error, A device attached to the system is not functioning
<— Is this ok? I am using cygwin, gnu-3.1.1 and python 2.5)!?

Now, I would like to record IF samples and use Kai Borre Matlab based
GPS receiver to solve for position. Should we proceed with sample
recording. Can you guide me for this? Faisal A. KhanDoctral
CandidateUniversity of New South WalesNSW 2052, Sydney, AustraliaP)
+61-2-93854208 M)+61-401-260728

Date: Fri, 29 Feb 2008 12:45:29 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRPFaisal,I’m at Purdue University working
toward using the USRP for GNSS applications. Check my understanding:
are you wanting to use the USRP to record, say, L1 band samples directly
to a data file? Would you be performing all of the signal acquisition
and tracking in post-processing with a separate software tool?I’m
working on Linux (Debian), but we aught to be able to trade notes. If
you’ve got a working installation of GNU Radio, I can show you how to
record samples.–PaulPhaysal Khan wrote:

Hi,I am a newbie to USRP, and still struggling to get it working on my
windows machine. I am trying to use cygwin. I reckon that many ppl have
already acquired and tracked GPS on USRP. Waht I want to do is to
capture GPS IF samples (e.g. at IF=5 MHz) and use a software receiver to
process those IF samples on PC. Any suggestions to start?!.. Faisal
A. KhanDoctral CandidateUniversity of New South WalesNSW 2052, Sydney,
AustraliaP) +61-2-93854208 M)+61-401-260728

Join Lavalife for free. What are you waiting for?

Find it at www.seek.com.au Your Future Starts Here. Dream it? Then be
it!

Hi,
yes, I can run the test and it says at the end
Max USB/USRP throughput = 32MB/sec

although it gives that error msg 3 times for each usb throughput check
(3 times for each 2M, 4M, 8M, 16M and 32M).

I am using DBSRX daughter card, which covers the GPS band, and this is
physically installed. I think we are ready to move forward. Faisal A.
KhanDoctral CandidateUniversity of New South WalesNSW 2052, Sydney,
AustraliaP) +61-2-93854208 M)+61-401-260728

Date: Mon, 3 Mar 2008 17:02:18 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRP
I’d start by running usrp_benchmark_usb.py It’s a USB speed test
script, and it will verify proper communication with the USRP. The
script is located in /usr/local/share/gnuradio/examples/usrp/ on my
Linux installation.Do you have a DBSRX daughter card to receive GPS
frequencies? If that’s physically installed and the test script
mentioned above runs, we can move on.–PaulPhaysal Khan wrote:

Hi Paul,Finally I got a working system of USRP radio. The FM radio
example runs smoothly (atleast opens up and captures nothing:giving
errors like "usb_control_msg failed: usb_control_msg failed: sending
control message failed, win error, A device attached to the system is
not functioning <— Is this ok? I am using cygwin, gnu-3.1.1 and python
2.5)!? Now, I would like to record IF samples and use Kai Borre Matlab
based GPS receiver to solve for position. Should we proceed with sample
recording. Can you guide me for this? Faisal A. KhanDoctral
CandidateUniversity of New South WalesNSW 2052, Sydney, AustraliaP)
+61-2-93854208 M)+61-401-260728

Date: Fri, 29 Feb 2008 12:45:29 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRPFaisal,I’m at Purdue University working
toward using the USRP for GNSS applications. Check my understanding:
are you wanting to use the USRP to record, say, L1 band samples directly
to a data file? Would you be performing all of the signal acquisition
and tracking in post-processing with a separate software tool?I’m
working on Linux (Debian), but we aught to be able to trade notes. If
you’ve got a working installation of GNU Radio, I can show you how to
record samples.–PaulPhaysal Khan wrote:

Hi,I am a newbie to USRP, and still struggling to get it working on my
windows machine. I am trying to use cygwin. I reckon that many ppl have
already acquired and tracked GPS on USRP. Waht I want to do is to
capture GPS IF samples (e.g. at IF=5 MHz) and use a software receiver to
process those IF samples on PC. Any suggestions to start?!.. Faisal
A. KhanDoctral CandidateUniversity of New South WalesNSW 2052, Sydney,
AustraliaP) +61-2-93854208 M)+61-401-260728

Join Lavalife for free. What are you waiting for?

Find it at www.seek.com.au Your Future Starts Here. Dream it? Then be
it!

Listen now! New music from the Rogue Traders.

I’d start by running usrp_benchmark_usb.py It’s a USB speed test
script, and it will verify proper communication with the USRP. The
script is located in /usr/local/share/gnuradio/examples/usrp/ on my
Linux installation.

Do you have a DBSRX daughter card to receive GPS frequencies? If that’s
physically installed and the test script mentioned above runs, we can
move on.

–Paul

Paul C. wrote:

I recommend running the example “usrp_wfm_rcv.py”, located in
/usr/local/share/gnuradio/examples/usrp/ on my Linux installation. It’s
essentially a limited spectrum analyzer.

You’re probably referring to “usrp_fft.py”, which gets installed into
the user’s path (well, $prefix/bin), so it can be run from anywhere.

I really don’t think you should be getting any error messages. Could
you copy the entire error message into an email? I might not be able to
identify the problem, but maybe someone else on the list can. In the
mean time, let’s verify receipt of a test signal through the USRP.

I recommend running the example “usrp_wfm_rcv.py”, located in
/usr/local/share/gnuradio/examples/usrp/ on my Linux installation. It’s
essentially a limited spectrum analyzer. Hopefully you’ve got access to
a signal generator. Start with a test signal at -40 dBm or so, at L1
(1575.42 MHz) for good measure. The program will likely automatically
select your DBSRX card, but if you need to set specific options, use the
‘-help’ flag on the command line to see the options. Do you get errors
running this? If so, tell me exactly what they are.

–Paul

Hi,
I used usrp_fft, and I can see a CW at 1575.42MHz, so it means that it
is in the working condition, although I still get the same error msg
once everytime i run anything. It says
$python usrp_fft.py -f 1.57542G
usb_contro_msg failed: usb_control_msg: sending control message failed,
win error: A device attached to the system is not functioning.

But as I said, that I can see the generated CW on the usrp_fft graph,
and the CW displayed on this graph follows the changes in frequency and
amplitude made from signal generator, then I think we can ignore this
error msg. We should be ready to move forward.

I am trying to use usrp_rx_cfile.py which I have altered as: u =
usrp.source_c (0, options.decim, 1, gru.hexint(options.mux), 0)
u.set_rx_freq (0, options.ddc_freq) u.set_pga (0, options.gain)
u.set_pga (1, options.gain) c2r=gr.complex_to_real() dst =
gr.file_sink (gr.sizeof_float, options.output_file) #fg.connect (u,
dst) fg.connect(u,c2r,dst)also, I am saving data to file as:
self.dst = gr.file_sink(gr.sizeof_float, filename)
as the data is no more complex.
Now if I connect GPS antenna to my usrp board and run
python usrp_rx_cfile.py -c 1574.015M -o gps_IF_real_samples.dat
where IF = 1575.42M - 1574.015M =1.405M

this should give me a file consisting of real IF samples of GPS data, ok
to use with Kai Borre software receiver. but this isn’t happening! :S

Am I usring usrp_rx_cfile.py incorrectly or do I need to implement any
filtering around this frequency?.. or I am missing a very basic thing
here!?
Faisal A. KhanDoctral CandidateUniversity of New South WalesNSW 2052,
Sydney, AustraliaP) +61-2-93854208 M)+61-401-260728

Date: Tue, 4 Mar 2008 15:16:17 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRP
I really don’t think you should be getting any error messages. Could
you copy the entire error message into an email? I might not be able to
identify the problem, but maybe someone else on the list can. In the
mean time, let’s verify receipt of a test signal through the USRP.I
recommend running the example “usrp_wfm_rcv.py”, located in
/usr/local/share/gnuradio/examples/usrp/ on my Linux installation. It’s
essentially a limited spectrum analyzer. Hopefully you’ve got access to
a signal generator. Start with a test signal at -40 dBm or so, at L1
(1575.42 MHz) for good measure. The program will likely automatically
select your DBSRX card, but if you need to set specific options, use the
‘-help’ flag on the command line to see the options. Do you get errors
running this? If so, tell me exactly what they are.–PaulPhaysal Khan
wrote:

Hi,yes, I can run the test and it says at the end Max USB/USRP
throughput = 32MB/sec although it gives that error msg 3 times for each
usb throughput check (3 times for each 2M, 4M, 8M, 16M and 32M). I am
using DBSRX daughter card, which covers the GPS band, and this is
physically installed. I think we are ready to move forward. Faisal A.
KhanDoctral CandidateUniversity of New South WalesNSW 2052, Sydney,
AustraliaP) +61-2-93854208 M)+61-401-260728

Date: Mon, 3 Mar 2008 17:02:18 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRPI’d start by running usrp_benchmark_usb.py
It’s a USB speed test script, and it will verify proper communication
with the USRP. The script is located in
/usr/local/share/gnuradio/examples/usrp/ on my Linux installation.Do you
have a DBSRX daughter card to receive GPS frequencies? If that’s
physically installed and the test script mentioned above runs, we can
move on.–PaulPhaysal Khan wrote:

Hi Paul,Finally I got a working system of USRP radio. The FM radio
example runs smoothly (atleast opens up and captures nothing:giving
errors like "usb_control_msg failed: usb_control_msg failed: sending
control message failed, win error, A device attached to the system is
not functioning <— Is this ok? I am using cygwin, gnu-3.1.1 and python
2.5)!? Now, I would like to record IF samples and use Kai Borre Matlab
based GPS receiver to solve for position. Should we proceed with sample
recording. Can you guide me for this? Faisal A. KhanDoctral
CandidateUniversity of New South WalesNSW 2052, Sydney, AustraliaP)
+61-2-93854208 M)+61-401-260728

Date: Fri, 29 Feb 2008 12:45:29 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRPFaisal,I’m at Purdue University working
toward using the USRP for GNSS applications. Check my understanding:
are you wanting to use the USRP to record, say, L1 band samples directly
to a data file? Would you be performing all of the signal acquisition
and tracking in post-processing with a separate software tool?I’m
working on Linux (Debian), but we aught to be able to trade notes. If
you’ve got a working installation of GNU Radio, I can show you how to
record samples.–PaulPhaysal Khan wrote:

Hi,I am a newbie to USRP, and still struggling to get it working on my
windows machine. I am trying to use cygwin. I reckon that many ppl have
already acquired and tracked GPS on USRP. Waht I want to do is to
capture GPS IF samples (e.g. at IF=5 MHz) and use a software receiver to
process those IF samples on PC. Any suggestions to start?!.. Faisal
A. KhanDoctral CandidateUniversity of New South WalesNSW 2052, Sydney,
AustraliaP) +61-2-93854208 M)+61-401-260728

Join Lavalife for free. What are you waiting for?

Find it at www.seek.com.au Your Future Starts Here. Dream it? Then be
it!

Listen now! New music from the Rogue Traders.

Join Lavalife for free. What are you waiting for?

Hi,
I used usrp_fft, and I can see a CW at 1575.42MHz, so it means that it
is in the working condition, although I still get the same error msg
once everytime i run anything. It says
$python usrp_fft.py -f 1.57542G
usb_contro_msg failed: usb_control_msg: sending control message failed,
win error: A device attached to the system is not functioning.

But as I said, that I can see the generated CW on the usrp_fft graph,
and the CW displayed on this graph follows the changes in frequency and
amplitude made from signal generator, then I think we can ignore this
error msg. We should be ready to move forward.

I am trying to use usrp_rx_cfile.py which I have altered as: u =
usrp.source_c (0, options.decim, 1, gru.hexint(options.mux), 0)
u.set_rx_freq (0, options.ddc_freq) u.set_pga (0, options.gain)
u.set_pga (1, options.gain) c2r=gr.complex_to_real() dst =
gr.file_sink (gr.sizeof_float, options.output_file) #fg.connect (u,
dst) fg.connect(u,c2r,dst)also, I am saving data to file as:
self.dst = gr.file_sink(gr.sizeof_float, filename)
as the data is no more complex.
Now if I connect GPS antenna to my usrp board and run
python usrp_rx_cfile.py -c 1574.015M -o gps_IF_real_samples.dat
where IF = 1575.42M - 1574.015M =1.405M

this should give me a file consisting of real IF samples of GPS data, ok
to use with Kai Borre software receiver. but this isn’t happening! :S

Am I usring usrp_rx_cfile.py incorrectly or do I need to implement any
filtering around this frequency?.. or I am missing a very basic thing
here!?
Faisal A. KhanDoctral CandidateUniversity of New South WalesNSW 2052,
Sydney, AustraliaP) +61-2-93854208 M)+61-401-260728

Date: Tue, 4 Mar 2008 15:16:17 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRP
I really don’t think you should be getting any error messages. Could
you copy the entire error message into an email? I might not be able to
identify the problem, but maybe someone else on the list can. In the
mean time, let’s verify receipt of a test signal through the USRP.I
recommend running the example “usrp_wfm_rcv.py”, located in
/usr/local/share/gnuradio/examples/usrp/ on my Linux installation. It’s
essentially a limited spectrum analyzer. Hopefully you’ve got access to
a signal generator. Start with a test signal at -40 dBm or so, at L1
(1575.42 MHz) for good measure. The program will likely automatically
select your DBSRX card, but if you need to set specific options, use the
‘-help’ flag on the command line to see the options. Do you get errors
running this? If so, tell me exactly what they are.–PaulPhaysal Khan
wrote:

Hi,yes, I can run the test and it says at the end Max USB/USRP
throughput = 32MB/sec although it gives that error msg 3 times for each
usb throughput check (3 times for each 2M, 4M, 8M, 16M and 32M). I am
using DBSRX daughter card, which covers the GPS band, and this is
physically installed. I think we are ready to move forward. Faisal A.
KhanDoctral CandidateUniversity of New South WalesNSW 2052, Sydney,
AustraliaP) +61-2-93854208 M)+61-401-260728

Date: Mon, 3 Mar 2008 17:02:18 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRPI’d start by running usrp_benchmark_usb.py
It’s a USB speed test script, and it will verify proper communication
with the USRP. The script is located in
/usr/local/share/gnuradio/examples/usrp/ on my Linux installation.Do you
have a DBSRX daughter card to receive GPS frequencies? If that’s
physically installed and the test script mentioned above runs, we can
move on.–PaulPhaysal Khan wrote:

Hi Paul,Finally I got a working system of USRP radio. The FM radio
example runs smoothly (atleast opens up and captures nothing:giving
errors like "usb_control_msg failed: usb_control_msg failed: sending
control message failed, win error, A device attached to the system is
not functioning <— Is this ok? I am using cygwin, gnu-3.1.1 and python
2.5)!? Now, I would like to record IF samples and use Kai Borre Matlab
based GPS receiver to solve for position. Should we proceed with sample
recording. Can you guide me for this? Faisal A. KhanDoctral
CandidateUniversity of New South WalesNSW 2052, Sydney, AustraliaP)
+61-2-93854208 M)+61-401-260728

Date: Fri, 29 Feb 2008 12:45:29 -0500From: [email protected]:
[email protected]: [email protected]: Re:
[Discuss-gnuradio] GPS on USRPFaisal,I’m at Purdue University working
toward using the USRP for GNSS applications. Check my understanding:
are you wanting to use the USRP to record, say, L1 band samples directly
to a data file? Would you be performing all of the signal acquisition
and tracking in post-processing with a separate software tool?I’m
working on Linux (Debian), but we aught to be able to trade notes. If
you’ve got a working installation of GNU Radio, I can show you how to
record samples.–PaulPhaysal Khan wrote:

Hi,I am a newbie to USRP, and still struggling to get it working on my
windows machine. I am trying to use cygwin. I reckon that many ppl have
already acquired and tracked GPS on USRP. Waht I want to do is to
capture GPS IF samples (e.g. at IF=5 MHz) and use a software receiver to
process those IF samples on PC. Any suggestions to start?!.. Faisal
A. KhanDoctral CandidateUniversity of New South WalesNSW 2052, Sydney,
AustraliaP) +61-2-93854208 M)+61-401-260728

Join Lavalife for free. What are you waiting for?

Find it at www.seek.com.au Your Future Starts Here. Dream it? Then be
it!

Listen now! New music from the Rogue Traders.

Join Lavalife for free. What are you waiting for?

Phaysal Khan wrote:

I used usrp_fft, and I can see a CW at 1575.42MHz, so it means that it is
in the
working condition, although I still get the same error msg once everytime
i run
anything. It says
$python usrp_fft.py -f 1.57542G
usb_contro_msg failed: usb_control_msg: sending control message failed,
win
error: A device attached to the system is not functioning.

Under Windows (both Cygwin and MinGW) I get this message every time I
start
a GNU Radio application that uses the USRP. I haven’t been able to
figure
out why, but it doesn’t seem to affect the operation of the USRP or GNU
Radio.

– Don W.

It would be helpful to know exactly what you mean by “this isn’t
happening.” What /does/ happen? Anything? Do you get a data file?
Have you tried recording and plotting a simple test sinewave?

You could also very easily convert the data in MATLAB.

–Paul

On Wed, Mar 05, 2008 at 03:15:16PM -0500, Paul C. wrote:

I used usrp_fft, and I can see a CW at 1575.42MHz, so it means that it is
I am trying to use usrp_rx_cfile.py which I have altered as:
u = usrp.source_c (0, options.decim, 1, gru.hexint(options.mux), 0)
u.set_rx_freq (0, options.ddc_freq)
u.set_pga (0, options.gain)
u.set_pga (1, options.gain)
c2r=gr.complex_to_real()
dst = gr.file_sink (gr.sizeof_float, options.output_file)
#fg.connect (u, dst)
fg.connect(u,c2r,dst)
also, I am saving data to file as:

Phaysal,

If you are using only u.set_rx_freq, your modifications have removed
the ability to set the LO on the daughterboard.

Eric

If you are using only u.set_rx_freq, your modifications have removed> the ability to set the LO on the daughterboard.No, I am not using set_rx_freq. I am just using usrp_rx_cfile which uses

r = self.u.tune(0, self.subdev, options.freq)

I am using the version at
http://www.gnuradio.org/trac/browser/gnuradio/trunk/gr-utils/src/python/usrp_rx_cfile.py

Eric