I am trying to interface a uBlox unit (a common one from eBay, e.g. this one) to a ESP32 module. First time connection everything works - using simple serial commands I can see the data arriving at the default baud rate (9600). But I want to be able to switch the uBlox unit into a low-power mode and I have tried using the Ublox_GNSS library to change settings. But if I try this, there is no response from the unit. Worse still, after I try the basic serial ouput stops working. The LED is still flashing at around 1 Hz so it is rceiving GPS data; it just won't send it out on the TX lne.
I have tried this twice now with two separate uBlox modules; the same thing has happened each time. I have a third but don't want to try again until I know what I am doing wrong, as the first two seem to be useless now. With these non-functioning units, I have tried putting them back to factory settings by shorting the backup battery / supercap so that they are down to less than 200mV but still no joy.
The problem isn't just an incorrect baud rate; I have used a scope to monitor the TX output and there is simply no action, it just sits at 3.3V.
Has anyone successfully changed settings on one of these units (using an Arduino, not using the uBlox u-center PC program)? If so, what code did you use please?
I have no experience of that library, but if you have used it, did you follow the advice given for that library;
Troubleshooting
If you get in trouble or want to try different configurations you can use the serial_bridge.ino example and control the module using u-blox u-center. This example simply bridge the serial USB over the UART connected to the u-blox module defined on the #define interfaces.
Thanks for the hint. I have now used U-center with a serial bridge to my third uBlox unit and received coordinates . I then swapped back to one of the 'non-working' units and discovered it had the UBX protocol set (as the library is designed to do) but won't respond to UBX requests. However I have managed to use the u-center software to switch back to NMEA protocol, and restored the stream of coordinate data ![]()
So it appears that the library is at fault; it changes the protocol to UBX but then fails to use it correctly. I will investigate further, but the fact that the github page has zero issues suggests that it is very little used.
Not sure why you would want to put the GPS into on-demand UBX mode either.
What evidence is there that this saves power ?
Not in itself, but AFAIK the UBX mode is needed to switch the module into its low-power settings. NMEA is just a one-way service, no method of sending data to the module - unless I'm wrong here?
You are.
You can send a UBX command at any time, no need to put the GPS into 'UBX Mode'
Maybe, but seems that when NMEA is enabled the device is constantly getting (and sending) new coordinates every second, so hardly a low-power mode (I only want a new position every minute or so).
Anyway, I have now discovered that the library I was using does not support the uBlox 6 series, only 8 series. Specifically the UBX-NAV-PVT command (to ask for coordinates) isn't in the series 6 command set. Seems I can only use the UBX-NAV-SOL command which returns data in ECEF format, which I will have to convert to lat/long myself.
So I've learned a lot today but I'm puzzled that, since the neo 6M is so cheap and easy to get hold of, there aren't more Arduino libraries available for it - all the articles about it just use the NMEA data stream.
Time to write and publish my own library when I have everything working!
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.