Reading GNSS from UART returns nothing - how to debug

So! VCC must be 3V3 pin. 5V pin did not even turn up the GPS module despite the documentation in which I read that both are possible.

RX TX on board of ESP32-S Wroom cannot be used and apparently not any GPIO can be configured for UART. I used GPIO 1 and 2 for TX and RX and it works. WORKS!

That does not mean I found how to read debug logs…

I have confirmed from WAVESHARE support that GPIO for UART is TX17, RX18 and are shared on the chip A7670. I think that Waveshare board has to be configured with ESP IDF because the hardware is different to ESP32 for which ESP home is programmed.

1 Like

Congrats, sounds like you are working now, but if you are still curious to inspect the logs you may need this.

Plus set this to VERY_VERBOSE

You are looking in the right place for logs. It’s where you got the ones you’ve pasted from.

[20:45:01][D][uart_debug:158]: <<< "\x03\x00\x05\xB9\x02\xA1\x02\xD5\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00\xA0G\x05\x87\x02\xBD1@\x91\x1Ey\x13i\r\xE2\v\xAA\x06\x14\x06A\x06\xFD\x02E\x04\xA8\x02*\x02\x80\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x002\xD9\x12\x92\xBA\xB8D>\x12\x1D\x81\x13J\fY\f5\a\xB4\x05:\x06\xFD\x02\xA4\x03\xE9\x02\x90\x02\x81\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00e(\xBD|\x11\xC9}D\xB2\x1E1\x13\xD5\fz\v\x9D\x06%\x06\x90\x05\x01\x04\xE1\x04\xDD\x02\xD4\x01D\x02\xF8\x
[20:45:01][D][uart_debug:158]: <<< “\xF2\xF1#\x00\x01#\x00\xFD\xA5\x9A\xA3\xA0\xBE\x05?A\x1E\x05\x14@\r\x84\fQ\a\xF5\x05\x01\x06A\x03\xB9\x03\xDA\x02\x02\x02\xA8\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00\x85\x9B\rO\x10\xE2\xB4F\x89 \xA2\x11b\f\xDA\t\xED\x04\xA4\x05\xF2\x02\xC9\x01J\x02\xA9\x00\xF4\x00\x82\x00\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00m\x18-S\x19\xD99F\xF4!@\x12i\rq\v\x9D\x06Z\a\xC1\x04\x04\x03\xD9\x03\xE2\x01\x15\x02\b\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00\xD5m\xFDNh\xD
[20:45:01][D][uart_debug:158]: <<< " #E\x14\xE2\r\xA1\f\x1A\at\a\xF5\x05\xAD\x03\xA2\x04A\x02\xA8\x02\x9A\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00*%\xCABB\xD6II\xD2"\x9D\x13\xD0\rP\f\x84\a$\ar\x05M\x03\xD5\x04\xB4\x02"\x03\xC8\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00\xE4\x93\x11\x02\xD5\xD4\x11F\xA1!\x84\x14\b\x0F\x02\rM\b\xE1\a\xB4\x05M\x03H\x05\xAD\x02\xF5\x02\xD5\x02\xF8\xF7\xF6\xF5\xF4\xF3\xF2\xF1#\x00\x01#\x00\xCA\xA6\x95J9\xC8\x12C\xD5\x1F=\x13\x8D\r\x82\f]\a\x80\x06\xD2\x06\x89”

1 Like

I am wondering what are the pins RX TX called for on ESP boards while they should not be used for UART? I was trying even others, I think 9,10, 56, 57 and some others. Are some descriptions at the pins necessary to become UART interface? I was looking for that information but nothing found. Choosing GPIO1 and 2 was just a luck, I tried those that are close on the ESP32 board.
image

http://wiki.fluidnc.com/en/hardware/ESP32-S3_Pin_Reference

This is the usual go to resource for esp32 pins. I think there are other versions for newer esp32 variants. I’m not so sure about them. The table with info on gpios is a good resource.

From what I understand the RX and TX pins are usually the default for UART0 and so are usually used by the serial logger, and sharing it can sometimes cause problems. See hardware uarts.

Therefore sometimes it’s better to use other pins for your uart.

This is another good overview of esp32s.

I spent dozens of hours, procrastinating from my everyday job, to reach success by luck.

The ESP Home/UART Bus page says: “Any pair of GPIO pins can be used, as long as they support the proper output/input modes." What are >>>proper input/output modes”?

Elsewhere, they write that GPIO 1 and 3 could overlap with logger uart, I did not know that logger needs to have its own uart, which is probably the one that we should NOT use. However, these pins vary between boards, better not to mention them. These are the devils in the detail.

1 Like

So, I am at the end of the road, which is finally successful.

There were two experiments: make the Waveshare board work on ESP home and build a GPS tracker with the ESP32-S3 board. The latter was achieved as said, the waveshare is a bit different.

Waveshare operates on AT commands (does not produce NMEA messages) over uart with the GPS which is integrated into the LTE module A7670, which is actually SIM7600 chip.

I went through the documentation very carefully and realized that I need a custom c++ component for ESP Home for both: GPS and LTE (common GPS modules produce NMEA, Waveshare has an antenna and the module is on one chip with LTE). As I am not a programmer, I just did my best to understand the logic and possible architecture and then I wrote very specific prompt to ChatGPT o3mini designed for coding, who wrote the c++ library and some additional configurations (even GPS sensors have to be in the c++ of course because you cannot use TinyGPS library). It took me about five loops with some errors and the board is up. Yes, five loops, I feel this as a revolution. Previous models were not able to even have a solid discussion with me, this was amazing cooperation.

The AI won’t write it entirely, you must understand what you are doing and know specifics (Waveshare have differences in AT commands, such as powering it up, there is double SS) but without AI, I would write it down in a month. However, couple of such experiments and I will become coding myslef.

1 Like

and here is the final solution to it by professionals, as expected, only ESP IDF:
[modem] pppos tcp/ip for uart modem (esp-idf only) by oarcher · Pull Request #6721 · esphome/esphome

1 Like

Nice work and good on you for sharing back and raising a request.