Closed andrmarkv closed 8 years ago
Please try the following two commands that HughAndersonNUS managed to sample at 2.5MHz in #31:
./gps-sdr-sim -v -e brdc0420.16n -b 16 -s 2500000 -l 1.362334,103.992769,100 ./tx_samples_from_file --args="master_clock_rate=50e6" --file gpssim.bin --type short --rate 2500000 --freq 1575420000 --gain 0 --repeat
Regarding your questions:
Hello Takuji,
Thank you very much for your quick response and answers.
I tried suggested commands:
/gps-sdr-sim -v -e brdc0420.16n -b 16 -s 2500000 -l 1.362334,103.992769,100
./tx_samples_from_file --args="master_clock_rate=50e6" --file gpssim.bin --type short --rate 2500000 --freq 1575420000 --gain 0 --repeat
linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown
UHD Warning:
Unable to set the thread priority. Performance may be negatively affected.
Please see the general application notes in the manual for instructions.
EnvironmentError: OSError: error in pthread_setschedparam
Creating the usrp device with: master_clock_rate=50e6...
-- Detected Device: B200
-- Operating over USB 3.
-- Initialize CODEC control...
-- Initialize Radio control...
-- Performing register loopback test... pass
-- Performing CODEC loopback test... pass
-- Asking for clock rate 50.000000 MHz...
-- Actually got clock rate 50.000000 MHz.
-- Performing timer loopback test... pass
Using Device: Single USRP:
Device: B-Series Device
Mboard 0: B200
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: FE-RX2
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: FE-TX2
Setting TX Rate: 2.500000 Msps...
Actual TX Rate: 2.500000 Msps...
Setting TX Freq: 1575.420000 MHz...
Actual TX Freq: 1575.420000 MHz...
Setting TX Gain: 0.000000 dB...
Actual TX Gain: 0.000000 dB...
Checking TX: LO: locked ...
Press Ctrl + C to stop streaming...
Again, I can see red light on B200 but phone (actually I am testing with several phones) show no satellite at all.
In your answers option 3 (GNSS-SDR) sounds interesting, but I have same fundamental question that goes with it. Can I use same USRP device to transmit and receive at the same time. To test it I built a simple Flow Graph in GRC using only two blocks: USRP source and waterfall sink. I can run that flow graph only when I am not replaying stream using tx_samples_from_file utility. Each one of them (my flow graph or tx_samples_from_file) runs separately but if I, for example, try to run flow graph and at the same time start tx_samples_from_file it shows me following error:
./tx_samples_from_file --args="master_clock_rate=50e6" --file gpssim.bin --typeshort --rate 2500000 --freq 1575420000 --gain 0 --repeat
linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown
UHD Warning:
Unable to set the thread priority. Performance may be negatively affected.
Please see the general application notes in the manual for instructions.
EnvironmentError: OSError: error in pthread_setschedparam
Creating the usrp device with: master_clock_rate=50e6...
Error: LookupError: KeyError: No devices found for ----->
Device Address:
master_clock_rate: 50e6
That is why I am afraid that option 3 (GNSS-SDR) is not going to be helpful in my situation.
What else can you suggest to help me with troubleshooting.
Thanks Andrey
Sorry I'm not a USRP user and unable to answer your USRP/GRC related question.
GNSS-SDR should work with the RTL-SDR dongle. http://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/ It's cheap and very handy.
Hello Takuji,
I finally managed to make it all work. There were several problems that were introducing difficulties:
tx_samples_from_file --args="master_clock_rate=50e6" --file gpssim.bin --type short --rate 2500000 --freq 1575420000 --gain 80 --repeat
it works but when I use
./gps-sdr-sim-uhd.py -t gpssim.bin -s 2500000 -x 80
it ether does not work at all or I am getting only one, two green bars in the GPS Test android app. Rest of the bars are grey and phone never locks to GPS. My guess is that there is something wrong with clock rate as tx_samples srcipt shows on the screen
-- Asking for clock rate 50.000000 MHz...
-- Actually got clock rate 50.000000 MHz.
but gps-sdr-sim-uhd.py script shows
-- Asking for clock rate 40.000000 MHz...
-- Actually got clock rate 40.000000 MHz.
./gps-sdr-sim -v -e brdc0420.16n -b 16 -s 2500000 -l 1.362334,103.992769,10
when I was missing them during generation of the gpssim.bin situation was similar to problem 2 - all lines in the GPS Test where grey and phone was not locking to GPS.
Having said all that I managed to use USRP b200 now to simulate fake location using commands:
./gps-sdr-sim -v -e brdc3020.16n -b 16 -s 2500000 -l 1.362334,103.992769,100
tx_samples_from_file --args="master_clock_rate=50e6" --file gpssim.bin --type short --rate 2500000 --freq 1575420000 --gain 80 --repeat
Thank you for a great tool Andrey
Thanks for the tip.
I understand that you need to specify the sampling frequency with "-s" option, but it is a bit unclear to me why you need "-b".
The sampling data format is 16-bit I/Q as default, and the code should generate the same binary file without "-b" option.
Are you sure that you need both the "-b" and "-s" options to make it work?
@osqzss
I test the code on my B210. It works fine without “-b”.
Confirming it works without -b option.
Takuji, one more question if you don't mind before resolving that issue. Do you know why during simulation phone, according to the GPS Test application, is loosing 3D GPS fix time to time. Application still might show a lot of green bars but it looses GPS for 10-15 seconds. Then, usually, it recovers back.
Could it be related somehow to the fact that I am replaying same data stream over and over and it is somehow detected by the phone, for example trough value of the time extracted from the GPS signals?
I am attaching several screenshots captured during simulation. They show normal status with 3D fix, then situation when I have 2D fix and finally no fix at all. All these screens where captured within single 5 minutes interval.
Once again Thank you
I haven't seen any intermittent loss of navigation solutions with my bladeRF and ASUS ZenFone 2 setup. It is hard to tell what exactly causes your issue.
In your first picture, the signal strength looks still too high. Please add more attenuation and keep it somewhere around 50dBHz or lower.
Hello Takuji,
I decreased gain value of the tx_samples_from_file tool (I made it 40) which resulted in the levels of the sattelite signals going down to about 30-40. I do not have any attenuators so all my configuration is based only on the software settings.
I also did much more testing and it looks like there are two reasons why GPS Test app shows loss of locaton:
One more time thank you for you software and i believe you can close my ticket as resolved
Andrey
Hi Andrey,
Glad to hear that it is now working smoothly. Enjoy happy hacking!
Hi,
I am able to generate GPS Signal using below commands
./gps-sdr-sim -v -e brdc3020.16n -b 16 -s 2500000 -l 1.362334,103.992769,100 tx_samples_from_file --args="master_clock_rate=50e6" --file gpssim.bin --type short --rate 2500000 --freq 1575420000 --gain 80 --repeat
I am using USRP B200. My requirement is to generate Gps Signal for Fix on daily basis with that date i could able to achieve it by arg -T now while generating gpsbin.
problem what i am facing is the fix is not consistent some time its getting fixed but some time its not.So how could i make it consistent to get continuous gps fix,
Devj
this is an old topic. when i search in internet about how to use B210 simulate gps signal the most likely useful content is this topic but after i try as it suggested in this topic there are still many cellphone that can not detect the simulated gps signal. finally i find this https://github.com/kobekobe1234567/gps-sim-ui which is a windows ui programme that works with b210 however it need a external 10Mhz clock. i use Chinese produced B210 and a 0.01PPM 10MHZ OCXO it works very well for any cellphone or GPS module the location is very accurate. for some cell phone you need to uncheck the "use current time" check box otherwise the cellphone can not be spoof.
Hello Takuji,
I am trying to use pgs-sdr-sim using USRP B200. I was able to compile your code, generate gpssim.bin file for static location and tried to transmit it using both gps-sdr-sim-uhd.py and tx_samples_from_file. When I start transmission process my B200 shows red light next to RX/TX antenna so I assume it does transmit something. I do not get any error and only UHD thread priority warning message during all my steps but when I use AndroidTS GPS Test or another android app called GPS Test by Chartcross Limited both of these apps shows me zero satellites (see screen shots). I am very new to SDR – that is my first real SDR project.
I was trying to follow instructions from your README.md file and then all advices and commands discussed in the ticket 31 (https://github.com/osqzss/gps-sdr-sim/issues/31) but still no success – my phone (actually couple of phones) do not show any satellites.
In addition to your advice I would like to get your help with several more questions that might be helpful and relevant to my situation:
Below are commands and their outputs that might give you clues into what I am doing wrong
2.1 using tx_samples_from_file program:
2.2 using gps-sdr-sim-uhd.py script:
Thank you Andrey