Help with setting up bluetooth on ESP32 board for SparkFun GPS-RTK-SMA board

SparkFun GPS-RTK-SMA board https://www.sparkfun.com/products/16481

ESP32 board https://www.sparkfun.com/products/20168

I have these two products connected and I want to send PointPerfect correction data from my cell phone to the ESP32 over bluetooth and receive nmea gps (over USB Serial or bluetooth?) to SW Maps.

I have the Arduino IDE installed with the ESP32 Arduino Core and have successfully run some of the examples. What example do I need to run for the ESP32 to receive correction data from my phone?

Thanks for your help.

Bruce

You can use this one as a template https://learn.sparkfun.com/tutorials/es … xample-ble

Thanks for the reply TS-Russell.

A brief review of what I have been successful at so far:

I have connected with the GPS receiver module to a com port on my PC running u-center with MQTT client to PointPerfect and have a 3D RTK fix.

I have run the BLE Write example you posted in your reply. The BLE Scanner on my android phone displays the write message in the serial monitor. While I am doing this the ESP32 is not visible as a Bluetooth device on the phone for pairing.

I have followed the GPS-RTK Hookup Guide https://learn.sparkfun.com/tutorials/gp … no-library where they describe:

"how to use the SparkFun u-blox Arduino Library to Read NMEA sentences over I2C using u-blox module (Example 1) It also states that “It is possible to pull get Ntrip data on an Android app and pipe it over a Bluetooth serial device like the Bluetooth Mate Silver. It’s trivial to connect a Bluetooth serial device to the GPS-RTK serial pins.”

But does not describe how to do this with the ESP32.

I think my problem is that I don’t know how to pair my phone to the ESP32 with a Bluetooth connection.

Does this make sense?

Thanks,

Bruce

PointPerfect is not using RTCM3, it will be encrypted SPARTN packets.

With keys you can decrypt on the host, or push keys into the receiver via UBX-RXM-SPARTNKEY commands

Should be able to confirm reception via UBX-RXM-COR / SPARTN

NTRIP w/RTCM3 is simpler, as a) it’s not encrypted, and b) it’s just a data shoveling exercise.

I finally found the solution to make all of this work.

“Getting Started with u-blox Thingstream and PointPerfect” https://learn.sparkfun.com/tutorials/ge … troduction

This solution works by connecting to a Wi-Fi hotspot on my mobile phone instead of using bluetooth. So as long as I have cellphone coverage, I can run SW Maps on the phone and collect GPS data with PointPerfect provided corrections.

There is one change you have to make to the “Arduino Example 18: PointPerfect Client” configuration in the above solution. When you are editing the secrets.h header file, you don’t enter certificate information for the client certificate. You leave it blank.

// → Credentials → Client Certificate

static const char AWS_CERT_CRT PROGMEM = R"KEY(

-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

)KEY";

Instead you download a device .crt file from the PointPerfect web site for your device. I installed the client certificate from the .crt file in Windows. I am not sure if this Windows installation of the certificate is necessary because I did this prior to uploading the code with the Arduino IDE and everything worked.

TS-Russell,

Please review this solution and see if it can be added to the GPS-RTK Hookup Guides for supported GPS boards. That could save others a lot of work looking for this solution.

Thanks,

Bruce

BruceG:
I finally found the solution to make all of this work.

“Getting Started with u-blox Thingstream and PointPerfect” https://learn.sparkfun.com/tutorials/ge … troduction

This solution works by connecting to a Wi-Fi hotspot on my mobile phone instead of using bluetooth. So as long as I have cellphone coverage, I can run SW Maps on the phone and collect GPS data with PointPerfect provided corrections.

There is one change you have to make to the “Arduino Example 18: PointPerfect Client” configuration in the above solution. When you are editing the secrets.h header file, you don’t enter certificate information for the client certificate. You leave it blank.

// → Credentials → Client Certificate

static const char AWS_CERT_CRT PROGMEM = R"KEY(

-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

)KEY";

Instead you download a device .crt file from the PointPerfect web site for your device. I installed the client certificate from the .crt file in Windows. I am not sure if this Windows installation of the certificate is necessary because I did this prior to uploading the code with the Arduino IDE and everything worked.

Correction: I found out that if you open the client certificate .crt file with notepad, you can copy the certificate text and paste it in the code.