Not getting GPS satellite lock? Takes a long time to get a 3D fix? Here’s how I change configurations in my GPS modules to improve GPS performance on my FPV drones. If you are having the same issue you can give it a try.
Just to give you an idea how much improvement it gave me, I did it on one of my 5″ with BN220 GPS.
Before this mod, I used to get a 3D fix in around 2 minutes, with a maximum satellites of 14. After applying the settings described in this post, I now get a 3D fix in around 1 minute, with a maximum satellites of 23 (with VTX antenna blasting 1200mW 3cm on top of it!). I also used to get 0 satellite lock inside the house, now I get 8-10 on a good day!
Disclaimer: oscarliang.com is not responsible for any loss or damage caused by following instructions on this page, your use of the information on this page is at your own risk.
If you need help setting up GPS in Betaflight, here is a tutorial.
There are affiliate product links in this post, it doesn’t cost you extra but gives me a small commission when you buy from these links. It helps to keep the website going.
If you don’t want to go through any of these non-sense, just get a new GPS with M10 chip, they perform exceptionally well out of the box compared to M8 chip based GPS like the BN220 and BN880. Here is some testing I’ve done: https://oscarliang.com/gps-review-1/
Which GPS Receiver?
You can configure the Beitian BN220 and BN880 using u-center. BN880 is larger, heavier and more expensive, but it has a built-in compass. Betaflight doesn’t require a compass, so BN220 is generally good enough.
Buy the Beitian BN220 here:
- AliExpress: https://s.click.aliexpress.com/e/_DENus9Z
- Banggood: http://bit.ly/2nD6QxP
- Amazon: https://amzn.to/3Xelr1F
Buy the Beitian BN880 here:
- AliExpress: https://s.click.aliexpress.com/e/_Ddxvybl
- Amazon: https://amzn.to/2BctUgg
If you want to configure your GPS, then the BN180 is a no-go as it doesn’t save configuration changes due to the lack of flash memory.
The software used to program GPS modules is called u-center. For GPS with M8 chips (such as the BN220 and BN880), we need V22.07 (NOT the V2).
Download here: https://www.u-blox.com/en/product/u-center
You will need an FTDI adapter to program the GPS module, it’s only a few bucks.
Buy an FTDI adapter here:
- AliExpress: https://s.click.aliexpress.com/e/_Dl7MLeF
- Amazon: https://amzn.to/3XJjRVk
You can use your flight controller to program your GPS (more later), but you can’t change baud rate. I still recommend getting an FTDI adapter, it’s a versatile and useful tool to have around. You can also use an Arduino board loaded with custom code, but it’s more complicated than using a plug-and-play FTDI adapter. Feel free to google it I won’t go into detail here.
The cable that comes with the BN-220 is plug and play with the FTDI adapter, no soldering required. If you need this cable, you can make it yourself with pre-crimped JST SH1.0 wires: https://amzn.to/3HFWXI8
The connections are:
- 5V to 5V
- GND to GND
- TX to RX
- RX to TX
Make sure to set the jumper to 5V in the FTDI adapter.
Open Device Manager in Windows and pay attention to Ports (COM and LPT). As you connect the FTDI to your computer via USB cable, a new COM port should appear.
Generally, you shouldn’t need to worry about driver if your computer is already working with your flight controller, which means driver is already installed. But if driver is needed, you will see a warning sign icon on that COM port.
Connecting GPS in U-Center
Open u-center, click “Receiver” and enable Autobauding.
In the same dropdown menu, click the first option “Connection“, and select your FTDI COM port. If it works, the connection icon on the top left should turn green. On the bottom, u-center will update the type of GPS chip, COM port, Baudrate and which protocol (NMEA or UBLX) it’s using at the bottom of the screen.
One way to know if the GPS is connected successfully, is to check this window if you are getting any data through. If not, wait a minute, if still nothing, try a different baud rate and check your wiring.
Backup and Restore Configurations
Make sure you backup your current GPS configurations before making any changes, if anything goes wrong you can go back.
Go to Tools, Receiver Configuration.
To backup, select a location to save the file and click “Transfer GNSS -> File“. A new window will pop up to show progress, ignore errors “message rejected” which is normal.
To restore configuration, go to Tools, Receiver Configuration, select the configuration file that you want to restore, and hit “Transfer file -> GNSS“.
If you have multiple GPS modules, you can also save the optimized configuration and just apply it to all of your GPS without repeating the whole process.
How to Save Configuration Changes
To see all the GPS options you can change, go to “View“, and “Configuration View“.
On the left hand pane are all the GPS settings, and on the right are the option values and parameters for that setting.
To save changes you made permanently, involves two steps:
- After you change a setting, click “Send” at the bottom of the screen. However this will only save it temporally.
- To permanently save the changes, you have to also go to “CFG (Configuration)“, then select “Save current configuration“, and click “Send” again.
Why is this?
The initial “Send” will apply the change to the GPS, however it’s not yet written to the GPS memory (non-volatile RAM, aka NVRAM), so when you restart the GPS (power cycle), all changes will be lost and revert to the original setting. Only when you go to CFG, select save current configuration and send, will write the changes to the NVRAM. This feature allows you to test settings without bricking your GPS.
The settings we want to change are:
- Baud Rate
- Refresh Rate
- Satellite Constellations
- Power Mode
Maybe your GPS already comes with optimal settings, in which case you don’t need to change it.
GPS modules might be pre-configured for different applications by the manufacturer, therefore you might want to do a factory reset before playing with the config. It’s up to you.
Go to View -> Configuration View, select “CFG (Configuration)” on the left, select “Revert to default configuration” on the right, and press “Send” at the bottom. This will restore the factory settings to your GPS (written to NVRAM), but you can always restore the original settings that I showed you how to back up earlier.
Go to “PRT (Ports)” in View -> Configuration View.
Select the following options:
- Target: 1- UART 1
- Protocol in: 0+1+2 UBX+NMEA+RTCM2
- Protocol out: 0+1 UBX+NMEA
- Baudrate: 57600
Then click on SEND at the bottom left of the window. Do not save it to NVRAM yet!
Since you have changed baud rate from 9600 to 57600, u-center is no longer communicating with the GPS. If you try to save this setting to NVRAM now, it won’t work (after a power cycle it will revert to the previous value 9600). You must disable “Autobauding” in the Receiver dropdown menu, and change your connection baud rate in u-center to 57600 before saving configuration to NVRAM.
Betaflight supports the following baudrate: 9600, 19200, 38400, 57600, 115200. A higher baudrate is required for faster refresh rate we want to increase later. Generally, setting baudrate to 57600 is enough for 5Hz refresh rate. Some even use 115200 with 10Hz refresh rate, but 5Hz and 57600 works great for me.
Increasing refresh rate will increase power consumption and use more resources in the GPS module. The default is 1Hz, but we can increase it to 5Hz for more frequent update.
Go to View -> Configuration View -> RATE (Rates).
Change the “Measurement Period” value from 1000ms to 200ms, it will update the “Measurement frequency” from 1Hz to 5Hz. Now save it to NVRAM.
You should also notice the blue LED on your BN220 flashes faster (5 times a second instead of once per second).
Adding Galileo Constellation
The M8 chip is capable of receiving signal from several constellations of satellites, including:
- GPS (USA) – 31 Satellites
- GLONASS (Russia) – 23 satellites
- GALILEO (Europe) – 24 satellites
- BEIDOU (China) – 44 satellites
You can select up to 3 systems, and usually Galileo isn’t enabled by default, so we want to use that to increase the number of satellite we can see.
Go to View -> Configuration ->GNSS (GNSS Config), and apply these settings. This is the config that came with one of the BN220 and it works really well (much better than others that weren’t using the same settings), so I just continue to use these settings on all my GPS.
Basically just check everything under Configure, under Enable uncheck Beidou, IMES, QZSS, and check everything under Signals. set the number of channels to use to 32.
The default power mode is set to “Balanced“, I prefer to set this to “Full Power“! I suppose it will use more power but it would be negligible for our drones since GPS uses very little power compared to the motors :)
Dynamic Platform Model
The different dynamic platform model settings adjusts the navigation engine for different applications. The settings improve the receiver’s interpretation of the measurements and thus provide a more accurate position output. Setting the receiver to an unsuitable platform model for the given application environment is likely to result in a loss of receiver performance and position accuracy.
In Nav5 (Navigation 5) => Dynamic Model, select “0 – Portable”, which supposedly has better accuracy than the Betaflight default (Airborne <4g).
Saving Optimized Config
Make sure you have written the settings to the flash memory as described in here.
Then save the optimized configuration as a file by going to Tools => Receiver Configuration. Enter a file name such as “BN220-optimized.txt”. Click the option “Transfer GNSS -> File“.
After you have finished setting up your GPS receiver, disconnect it by either clicking on the green connection icon on the top left, or the disconnect option in the Receiver menu before unplugging the USB cable or disconnecting the GPS from the FTDI adapter.
Betaflight GPS Settings
After configuring your GPS, you need to make some small changes in Betaflight.
- Set protocol to UBLOX
- Disable “Auto Baud” (in Configuration tab)
- Set the Baudrate to 57600 (in Ports tab)
- Enable “Use Galileo” (in Configuration tab), for older Betaflight that don’t have this option in the GUI, you can enter this in CLI: set gps_ublox_use_galileo = on
Now, restart the quad by removing battery / USB cable and connecting it again.
Configurating GPS via FC
Once you’ve mounted the GPS in the drone, it’s not easy to remove it or change the wiring to use an FTDI adapter. Fortunately you can also use your flight controller to program it. You just need to connect the USB cable to the FC, no need to touch the wiring. However you won’t be able to change Baud Rate this way, but that’s fine if you have already optimized baudrate previously with an FTDI adapter.
Connect USB cable to FC. If the USB cable isn’t powering the GPS, then you have to plug in a LiPo to power the drone, but make sure to REMOVE PROPELLERS FIRST! And consider using a fan to prevent the VTX from overheating
Open Betaflight Configurator, and hit the Connect button, remember the COM port for your FC. Go to the CLI tab and enter this command, gpspassthrough (uart number -1) (GPS baudrate).
For example, if your GPS is connected to UART6 with baudrate 57600:
gpspassthrough 5 57600
In Betaflight 4.4, “gpspassthrough” has been removed, use the command “serialpassthrough” instead.
Close the configurator (click the cross at the top right) to free up the COM port for u-center to connect. Open u-center, connect the flight controller COM port and set baudrate to 57600.
When you disconnect the LiPo and USB cable, your FC will automatically quit serial passthrough mode.
Betaflight Auto Config Rewrites Settings
Thanks to “A” in the comment section who pointed out the fact that Betaflight actually rewrites some of our GPS config when auto config is enabled, so we should disable auto config. However you cannot simply disable it without making a “compatible” configuration.
To do this, you have to
- Export your optimized config
- Connect the GPS to Betaflight (so it will auto config your GPS), export the config again
- Compare the two files and see what Betaflight changed
- We want to keep our optimized config and leave the rest the same as the Betaflight config
Here I will explain in a bit more detail.
Now that you have updated your GPS with optimized settings, connected the GPS to the FC (with Auto Config option enabled), Betaflight should have already overwritten your GPS config. That’s exactly what we want. Go back to u-center, and export the config file, give it a name like “BF-Autoconfig.txt”.
Now open the two config files we saved (optimized.txt and BF-autoconfig.txt), and do a compare (it’s a plugin in Notepad++), you can see exactly what settings Betaflight changed from our optimized config.
Copy all the lines starting with “CFG-MSG” from BF-autoconfig.txt file (the one that has been over-written by Betaflight) and replace them in our optimized config. Do not copy/replace any other lines!
Save this config file as “optimized-final.txt”.
Now back to u-center, and load this config file “optimized-final.txt”. Don’t forget to check the option “Store configuration into BBR/Flash” (or you could also go to CFG (configuration) and click the Send button there to save changes to the flash memory), otherwise your config will be lost when you power off the GPS.
Then disconnect the GPS and power off the quad.
We should now disable “Auto Config” in Betaflight GPS settings. But before we do that, make sure you disconnect the GPS from the flight controller so it doesn’t over-write our GPS again! Power cycle the flight controller.
You can now connect the GPS to the quad and check if it’s working by going to the GPS tab in Betaflight Configurator (also check the GPS icon on top).
That’s it. Let me know if this helped you get more satellites and faster lock. If you want you can always restore your original settings if you made a back up.
Mine can’t seem to work, whenever I have finished setting up the U-center and it is working beautifully in the u-center I get 10 satellites in just a few seconds and save the current configuration. I have merged the auto-config file from Betaflight as well. when I connected the GPS to the quad again I disabled auto-config and auto-baud in Betaflight and changed the baud rate. it doesn’t work. The GPS logo on the top just doesn’t active. I don’t know what’s wrong. Any Idea
Greetings Oscar. When I click on Galileo on the BN-220 and send, it does not save and the GNSS immediately returns to its original settings. Thanks for your help Tom
Hello Oscar. Thank you for answer.
I suspect the case is in my sample. As i look at configuration, Galileo protocol is missing in my device.
All other settings are saved successfull after “CFG->Save current configuration”, but for very short time – about 1 hour.
I do not understand, must normal BN-220 has flash memory for long time storage of settings? In seller device description wrote that it has a Flash.. My older BN-180 support Galileo, but have simmilar behavior by saving custom settings – storage time is about 1h. How work a battery? Is it rechargeable? How long time can it work?
I am going write to seller, but i do not understand, how that must work in normal device.
…. yes, you are right. i’ve bought invalid BN-220 device. I’ve made refund and wait new GPS receiver. As i’ve understood, my invalid device does not has flash memory. Like BN-180, it store users settings while battery work. The battery is a semistor. It is rechargeable from receivers power source.
I have bought new BN-220 GPS receiver. I try to set my settings using u-center. I have some problem. My receiver does not support Galileo. My custom settings (port frequency, rate) are reseted after small time. Can you help me, what that mean? I have broken device?
Are you saying it doesn’t save the setting when you enable Galileo? Does your GPS save other settings? Make sure you follow my instructions on how to save settings to BRB. If it’s not saving any settings maybe the battery is dying.
I’ve tested 3 BN220 recently and they all work as expected.
If nothing works maybe get another BN220 from a different seller if you are desperate about getting Galileo to work.
Hi. I think you can simplify the process to disable autoconfig in betaflight a bit.
1. You should of course backup your gps setting like in one of your first steps.
2. You can actually move directly to connect gps through your FC and betaflight with autoconfig turned on. Now your gps has changes made by BF and you can can set your own settings (like power level, refresh rate etc.). Then you should save your settings to gps and disconnect FC.
3. Disconnect your gps from FC, launch betaflight and turn off autoconfig for gps.
This way you don’t have to compare files and make changes in them by yourself.
By the way, I’m trying to work now with flywoo’s gm10 module. You can actually use the older u-center software for it too. Most of its settings works with new chipset (at least with flywoo’s model, not sure about other brands).
Hello! I try to setup Beitian BN-220 GPS. I can not save checked state of Enabled checkboxes for Glonass and Galileo option in GNSS Config panel. These installed checkboxes are reset when i press Send button. Why, can you help me?
for those who use Betaflight Configurator 10.9.0 with Betaflight Firmware version 4.4.x, there is no command “gpspassthrough” in CLI. Use command “serialpassthrough” instead.
if your GPS connected to RX-2/TX-2 then in Betaflight Ports Tab it should be set on UART2.
Therefore in CLI the command is :
serialpassthrough 1 57600
serialpassthrough – passthrough serial data data from port 1 to VCP / port 2
  [none||reset]   
BT 220T not recognized in Device manager as a COM.
hola oscar saludos , tengo unGPS TBS M8.2 GLONASS ¿puedo realizar este proceso para obtener mejor rendimiento en mi GPS?
Conjunto de chips: ublox UBX-M8030
Memoria flash para guardar la configuración.
Frecuencia: L1, 1575,42 MHz; L2,1561.10MHZ ； L3,1602.00MHZ
Tasa de baudios: 4800bps-921600bps (predeterminado: 9600bps)
Canal – 72 canales
Sensibilidad – (Seguimiento: -164dBm) | (Captura: -159dBm) | (Arranque en frío – 147dBm)
Arranque en frío: promedio de 26 segundos
Inicio en caliente: promedio de 24 segundos
Arranque en caliente – Promedio de 1 segundo
Precisión – (Posición horizontal: Autónoma <2 m de promedio) | (SBAS <2,0 m de media) | (Señal de pulso de tiempo: RMS 30 ns)
Altura máxima – 50000 m
Velocidad máxima – 500 m / s
Aceleración máxima – ≦ 4G
Frecuencia de actualización: 1-10 Hz
Tamaño – 20 x 22 x 6 mm
Peso – 5,2 g
Voltaje de entrada: 3.3V-5V
Hi, I can not write any setup on my hglrc m80. It comunicates correctly and I can see recieved data but can not write anything. Could you help me?
Some GPS just doesn’t work with u-center or doesn’t have memory to save settings. Too many people have reported this mod doesn’t work on the M80, so it’s probably just that. I have only tested BN220 with this mod.
Hi, I tested these improvements with a BN 180 and a M80:
_ M80: modifications were not saved because there is button battery, therefore there is no way to save the setting in memory.
Datasheet is mentionning Galileo capacity, but as firmware calibration doesn’t enable it, no way to get Galileo sats.
_ BN 180: there is a battery so possible to save, with lot of difficulties (difficulties to get data from UART, etc.), I succeed to perform upgrades.
I have ordered a BN220 to replace the M80.
I had limited success with my HGLRC M80 pro. the BN880 however was significantly improved by following this guide.
Nice Article, like always.
I bought a new GPS M10 chip flywoo(red) which uses the new u-center 2 software. Settings are difficult to find, but its possible. Also it’s not possible to save actual config. My Reseach, maybe its helpful:
Device Configuration -> Advanced configuration:
– CFG-RATE (set timing, already to 0,1s)
– CFG-SIGNAL (enable systems/channels)
– CFG-UART1 (Baudrate, 115200 already seems to be default)
Change settings and click set. The “configuration changes” list will be build. If finished click send. After testing/finished klick Save on Configuration actions on the left to store in ram+BBR.
Maybe something is wrong…no guarantee :-)
Question: Are you sure its better to use glonass instead of beidou gnss? My research shows (for germany) that beidou has much more sats available independent of day-time. The m10 chip can handle 4 instead of 3 parallel. Therefore I would activate GPS+Galileo+SBAS -> and now the question Glonass OR Beidou? I think beidou would be better.
Looking forward to read your m10 review :-)
Another thing you can enable is AssistNow Autonomous.
By default, satellites are saved for a certain amount of time. This setting ups the retention time to like 6 days.
“AssistNow Autonomous provides aiding information without the need for a host or external network
connection. Based on previous broadcast satellite ephemeris data which has been downloaded to and
stored by the GNSS receiver, AssistNow Autonomous automatically generates accurate satellite
orbital data (“AssistNow Autonomous data”) that is usable for future GNSS position fixes. The
concept capitalizes on the periodic nature of GNSS satellites: their position in the sky is basically
repeated every 24 hours. By capturing strategic ephemeris data at specific times over several days,
the receiver can predict accurate satellite ephemeris for up to six days after initial reception.”
If you have a fancier GPS, the AssistNow Offline which requires some sort of storage on the device, it lets you download a dataset of satellite data which will help assist in getting satellite fixes.
Also, depending on the number of satellite constellations, you may want to adjust the polling rates.
The BN-880 is a much better GPS as it has an active antenna vs the passive antenna on the lower models. You get fixes a lot better.
I have an older ‘Beitian 220’ GPS that came with an Eachine few years ago. I did try Assistnow Autonomous, my gps positioned not ideally on quad would sometimes take almost 10 minutes to get 8+ sats… I went through the hassle of registering on u-blox for the Assistnow Offline token, uploaded a week worth of data to the flash (surprised this one has flash onboard – It seems to have room for multiple weeks worth of the offline data), now locks happen in 1 to 3 minutes. Some GPS are not genuine u-blox, some don’t have flash or battery backup… When shopping for future gps I will ensure it has flash, bat, and is genuine.
Where you mentioned messages rejected in relation to backing up the firmware… I noticed I got that any time the refresh rate was high and/or the baudrate was low. And when I checked the backup file there seemed to be lines missing so it seems like those errors are the computer asking for each setting line by line and not having enough time to get some of the responses. If I increased the baud rate or decreased the refresh rate it fixed it but I’d need to remember to change it if I used the backup file. Great article though. It seems like this was something many people had tried but not understood very well. Id be interested to see what settings inav and betaflight temporarily change. If anyone knows please send me a link
PS if you need an idea for a new article I’d love too see a how to on using the spectrum analyzer function in ucenter to check for interference from things like hd cams. I’m not certain things like the m8n or even m10s can even use this functionally but if they can this would be super helpful. If you can’t find any info on this just say so and I’ll find a link to it.
holy shoot I am getting 13 satellites in my basement! why isn’t this the default config in Betaflight? IT SHOULD BE!
I already posted this in Discord some days ago. I think they already take a look there:
Hmm really interesting!
Meybe a feature request could be added in Betaflight GutHub and Inav Git hub to automatically set those parameters ar boot. or at least have them available in th CLI??
When I switch this command: Protocol out: 0 UBX, in my bn880, the blue led stops flashing… and once there, betaflight won’t recognize the gps, even with the auto setup on. I have had to chose 0 + 1… to make it flash again. Is it any particular issue of the bn880?
don’t worry about that one, just select 0+1, shouldn’t be any performance difference.
FYI – You can still change the baud rate using an FC – you just need connect initially using your desired baud rate via the ports tab AFAIK – just turn off auto baud to begin with as it’s not really a great system. At least that’s my process and it’s verified to work via ucenter in my case (i just run 115k/10hz). Also you need to turn off auto-config in BF otherwise it will issue configuration commands over your existing ones. Depending on the version of BF that will bring update rates back to 5hz most likely even though practically everything supports 115k and 10hz. For instance, turning on Galileo in BF will disable QZSS. Although most pilots won’t benefit from QZSS anyways unless you live in a very specific region of the word. Also you’ll need to set the protocol to UBLOX permanently.
I did a video how I did it so that the config is not overwritten from. Betaflight
One more point, if you select auto config in betaflight could it be that some gps internal settings are overwritten again
Maybe this needs to switch off ore a exlenation would be quite cool what will be overwritten/changes from betaflight!?
Can I use my CP2102 tool for this?
Can you maybe store your settings file here, so that I can directly flash your settings for bn 220?
u-blox.com/en/ This is a resource for Datasheets if you don’t know if your GPS module is flashable or not.