gps-sdr-sim icon indicating copy to clipboard operation
gps-sdr-sim copied to clipboard

Why HackRF seems to send datas but smartphone receive nothing (or for a few seconds only)

Open xxxxxaaaaaaaannnn opened this issue 4 years ago • 7 comments

Hello,

I will explain you here why you see your HackRF sending data and your phone doesn't pickup anything or in more common cases, your GPS Test app detect them and after a few seconds they are all gone (no fix).

I tested this on Android only.

TL;DR :

Android has an anti spoof GPS mechanism and you may want to go into airplane mode, which will really disable BlueTooth/Wi-Fi/GSM localisation and thus will trust your GPS faked signals anyway.

Long story : My guess is that Android embed a new feature that allows you to unlock your phone when you are at home without using any pin code or pattern. Since this feature exists, they need to make sure that the phone isn't receiving fake GPS signals to get a free unlock. Even if your phone doesn't have the feature, it might be included in the Android build you have.

Even if your phone is set in mode "GPS only, don't use Wi-Fi", your phone will still use Wi-Fi/Bluetooth/GSM to compare with your GPS location, if the difference is too important, GPS will be discarded.

You can try two thing to asses if you are suffering from that :

  1. the easiest is (after configuring your phone in GPS only mode in your settings), put your phone in Airplane mode, start your hackrf_transmit and run GPS Test. It should work :)
  2. You can spoof your GPS not too far from where you are really, but I've noticed that 100 meters is already too much ; I guess only tip #1 works.

You also need to make sure you ran gps-sdr-sim with the latest brdc and with the -b 8 argument, this is required for HackRF.

About the transmission power of hackrf_transfer, this doesn't really matter, I just tuned the power (-x ) to be received on my phone but not too much to annoy my neighbors.

Now if you ask the question on how to use it without Airplane mode because you want to cheat on an application or game, I have no clue. Depending on your phone, you may start the game with Airplane mode enable and then disable it after the game is running. It works for me but not on my friend's phone (new generation).

Good luck !

xxxxxaaaaaaaannnn avatar Mar 08 '20 09:03 xxxxxaaaaaaaannnn

I also found that if you add parameter -C -4 to hackrf_transmit, it works much better, but I don't know why.

xxxxxaaaaaaaannnn avatar Mar 15 '20 10:03 xxxxxaaaaaaaannnn

Thanks for the clarification. I have tried with 3 devices, none gets fix :/ they start losing satelites in view and then lose the fix, not sure why.

What parameters do you use for -x ?

eried avatar Apr 27 '20 22:04 eried

The hackrf need a tcxo to keep it on the good frequency and simulate the frequency drift of the sats.

Télécharger Outlook pour Androidhttps://aka.ms/ghei36


From: Erwin Ried [email protected] Sent: Monday, April 27, 2020 6:36:25 PM To: osqzss/gps-sdr-sim [email protected] Cc: Subscribed [email protected] Subject: Re: [osqzss/gps-sdr-sim] Why HackRF seems to send datas but smartphone receive nothing (or for a few seconds only) (#240)

Thanks for the clarification. I have tried with 3 devices, none gets fix :/ they start losing satelites in view and then lose the fix, not sure why.

What parameters do you use for -x ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/osqzss/gps-sdr-sim/issues/240#issuecomment-620271444, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIJP75V3IRZ2M6SF256QYKTROYCGTANCNFSM4LDX4VNA.

petem001 avatar Apr 27 '20 22:04 petem001

I have a TCXO, an external "0.5" one. Downloaded the latest brdc for today (brdc1180.20n), is there is anything else to test?

eried avatar Apr 27 '20 22:04 eried

Did you try generating fake signal with 8 bit I/Q data format? link

michalsternadel avatar May 04 '20 17:05 michalsternadel

Did you try generating fake signal with 8 bit I/Q data format? link

Yes, at the end I had some success :) using SatGen free nmea generator https://github.com/eried/portapack-havoc/wiki/GPS-Sim#example-1

After a while 2 of my 4 devices point to that fake position :D

eried avatar May 04 '20 17:05 eried

无标题 The coordinate cannot be spoofed on Xiaomi phone. It can be seen from the internal app that there is no GPGGA message. I don't know how to create a gpgga signal, but I think if someone can think about and create some signals for gpgga, this may be solved.

whysoft avatar Dec 05 '21 10:12 whysoft