Can anyone provide advice for getting Example 12 (Use UART) working for an ESP32 device and the Zed-F9P? I am using the LoRa Gateway 1-Channel as my ESP32 device. The modifications I have made are as follows:
Modified SoftwareSerial to HardwareSerial:
// #include <SoftwareSerial.h>
// SoftwareSerial mySerial(10, 11); // RX, TX. Pin 10 on Uno goes to TX pin on GPS module.
#include <HardwareSerial.h>
HardwareSerial mySerial(2);
Changed the mySerial.begin at 38400 baud:
Serial.println("GPS: trying 38400 baud");
// mySerial.begin(38400);
mySerial.begin(38400, SERIAL_8N1);
if (myGPS.begin(mySerial) == true) break;
Changed the mySerial.begin at 9600 baud:
Serial.println("GPS: trying 9600 baud");
// mySerial.begin(9600);
mySerial.begin(9600, SERIAL_8N1);
I have not made any other modifications to the original example. The modified code compiles and uploads, but I get stuck in a loop between trying the two baud rates. For the hardware hookup I have tried attaching TX2 and RX2 from the F9P to every combination of pins on the ESP32 that I can reasonably think of. I’ve also explicitly declared TX and RX pins in the mySerial.begin call with similar results. I can connect to the F9P in u-center without issues, and I’ve verified that the Ports configuration tab has both UART1 and UART2 outputting RTCM3 at 38400 baud with 8 databits, 1 stopbit, and no parity.
Has anyone been able to get this to work?