I've been trying to connect a GPS receiver (Navspark NS-RAW for the matter) with both an ESP32-S3-DevkitC-1 v1.0 board using the native USB port. I have to do so because, although the GPS microcontrollar has a serial interface, the board only directly exposes the TXD on the available pins. The RXD is only available on a micro-usb through a UART bridge.
The GPS board can be interfaced with the PC by means of a software provided by the provider or by directly sending commands in binary form with a software like Realterm. Both work fine, so the GPS board is ok and I understand the communication protocol.
According to the manufacturer of the GPS board, if connected with a device functioning as an ESP host (the ESP in this case) it should behave in the same way it does when connected to the PC. This might sound pretty obvious, but it's the first time I try this. I connect the ESP32 with the PC using the UART micro USB connector and the GPS board through pins 19 and 20 on the ESP32. I listen to the TXD pin of the GPS board with a logic analyzer. The board sends its position with 1Hz, as it should do unless told otherwise, so it's powered on and working.
I'm using this example program in the Arduino IDE for my tests:
https://github.com/espressif/arduino-es ... Serial.ino
This program should redirect any data going into the UART port to the native USB. So, theoretically, the GPS board should be receiving any commands I send from the PC. Unfortunaly the GPS board doesn't react to them. This commands are correct, as the GPS reacts to them as expected when directly connected to the PC, but not when interfacing with the ESP. Swapping D+ and D- doesn't change anything.
When I reset the ESP32 I get this per the UART port:
Code: Select all
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4
USB UNPLUGGED