esp-idf-GPS-Repeater icon indicating copy to clipboard operation
esp-idf-GPS-Repeater copied to clipboard

GPS Module Initialisation option

Open raintonr opened this issue 3 years ago • 11 comments

Thank you so much for this awesome utility. I built a Bluetooth gateway in one afternoon with ESP32 + Neo-M8:

image

The only thing missing, at least in this context, is an option to write configuration settings to the GPS module at power on.

Scenario is this: the Neo-M8 can allegedly support concurrent reception from 3 GNSS but that isn't default behaviour (default is GPS & GLONASS). The most economic version of this package is the NEO-M8M which does not include flash so if one therefore wants to use something other than default GPS & GLONASS the command to switch GNSS in use has to be sent at power on.

raintonr avatar Jun 17 '22 18:06 raintonr

Where can I find command documentation for using anything other than the default GPS and GLONASS?

nopnop2002 avatar Jun 18 '22 01:06 nopnop2002

The spec is here: https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_UBX-13003221.pdf

Seems like UBX-CFG-GNSS is the required command.

There may be some clues in this project (only just found this - I should have experimented with it before boxing up my project and installing in a vehicle - doh!) https://gpsd.gitlab.io/gpsd/ubxtool.html (https://gitlab.com/gpsd/gpsd)

raintonr avatar Jun 18 '22 07:06 raintonr

Thank you for information.

Seems like UBX-CFG-GNSS is the required command.

To try this, I need to buy NEO-M8M.

nopnop2002 avatar Jun 18 '22 08:06 nopnop2002

If you could suggest where to start I could try and make some changes and if they work submit a PR?

raintonr avatar Jun 18 '22 08:06 raintonr

Thank you for your offer.

Unfortunately, the current code cannot send UART.

It needs to be reviewed from the ground up.

nopnop2002 avatar Jun 18 '22 11:06 nopnop2002

At first thought, one could place some code in app_main() to open UART, write command string, close UART and carry on a usual.

I would imagine an optional 'GPS init command string' configuration option would be needed (along with TXD pin). If this is set, the string is sent to the GPS module on power-up, otherwise ignored.

Do you see any problem with such an inclusion?

raintonr avatar Jun 18 '22 12:06 raintonr

That looks like a good idea. I'll try it.

nopnop2002 avatar Jun 18 '22 13:06 nopnop2002

There is a utility here http://wiki.openmoko.org/wiki/Neo_FreeRunner_GPS (see UBX protocol section) for appending header & calculating checksum for these devices, so the use case for me would be:

  1. Figure out exactly what UBX-CFG-GNSS I need.
  2. Use ubxgen.py script from above page to create necessary ublox configuration packet.
  3. Copy/paste configuration packet into build configuration for esp-idf-GPS-Repeater.
  4. Connect TX and configure TX Pin.
  5. Rebuild & flash updated esp-idf-GPS-Repeater.
  6. Cross fingers! ;)

raintonr avatar Jun 18 '22 17:06 raintonr

  1. Figure out exactly what UBX-CFG-GNSS I need.

There are some good clues here: https://github.com/renatobo/bonogps/blob/main/hardware/GPS/README.md#gps-sbas

raintonr avatar Jun 18 '22 18:06 raintonr

I can parse nmea messagens to send over bluetooth?

jessejgm avatar Sep 13 '22 18:09 jessejgm

@jessejgm

I can parse nmea messagens to send over bluetooth?

Yes. It works for GPS Server for Bluetooth GPS. It works for Acceptor.

I use this initiator. https://play.google.com/store/apps/details?id=googoo.android.btgps

nopnop2002 avatar Sep 13 '22 22:09 nopnop2002