Hi,
I am using a GSM and GPS module along with ESP32.
Following is my configuration for UART.
UART1 - TX: 21, RX: 13 - GSM Module
UART2 - TX: 23, RX: 22 - GPS Module.
I am Using PPPoS client with the GSM module.
The GPS works fine till the GSM module starts communicating.
I do not receive any data from the GPS once the GSM module starts communicating.
I have checked the data at the GPS module. It continues to send the data but ESP32 does not receive it.
Has Anyone else faced such an issue?
Regards
UART2 Stops Recieving Data
Re: UART2 Stops Recieving Data
After Further investigation,
When there is a lot of traffic on UART1, Some characters on UART2 are not received from the GPS module.
What could be the issue? And how do I tackle this?
Regards
When there is a lot of traffic on UART1, Some characters on UART2 are not received from the GPS module.
What could be the issue? And how do I tackle this?
Regards
Re: UART2 Stops Recieving Data
I have captured the data from a USB to serial cable to the GPS and using ESP32 and here are the results
ESP32 :
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*01,01,02,ANTSTATUS=OPEN*2B
0,,,M,,M,,*4F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPGLL,,,,,003232.799,V,N*7GA,003233.799,,,,,0,0,,,M,,M,,PEN*2B
$GPRMC,003233.799,V,,,,,0.00,0.00,060180,,,N*44
USB to Serial:
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,003232.799,,,,,0,0,,,M,,M,,*4F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPGLL,,,,,003232.799,V,N*7D
$GPTXT,01,01,02,ANTSTATUS=OPEN*2B
$GPRMC,003233.799,V,,,,,0.00,0.00,060180,,,N*44
ESP32 :
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*01,01,02,ANTSTATUS=OPEN*2B
0,,,M,,M,,*4F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPGLL,,,,,003232.799,V,N*7GA,003233.799,,,,,0,0,,,M,,M,,PEN*2B
$GPRMC,003233.799,V,,,,,0.00,0.00,060180,,,N*44
USB to Serial:
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,003232.799,,,,,0,0,,,M,,M,,*4F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPGLL,,,,,003232.799,V,N*7D
$GPTXT,01,01,02,ANTSTATUS=OPEN*2B
$GPRMC,003233.799,V,,,,,0.00,0.00,060180,,,N*44
Re: UART2 Stops Recieving Data
You don't say how you are reading serial data, post your code
Re: UART2 Stops Recieving Data
This is how i read Data from UART
char *readLine(uart_port_t uart) {
static char line[1024];
int size;
memset(line , 0 , sizeof(line));
char *ptr = line;
while (1) {
size = uart_read_bytes(uart, (unsigned char *) ptr, 1, 1000/portMAX_DELAY);
if (size == 1) {
printf("%c" , ptr[0]);
if (*ptr == '\n') {
ptr++;
*ptr = 0;
return line;
}
ptr++;
} // End of read a character
} // End of loop
} // End of readLine
char *readLine(uart_port_t uart) {
static char line[1024];
int size;
memset(line , 0 , sizeof(line));
char *ptr = line;
while (1) {
size = uart_read_bytes(uart, (unsigned char *) ptr, 1, 1000/portMAX_DELAY);
if (size == 1) {
printf("%c" , ptr[0]);
if (*ptr == '\n') {
ptr++;
*ptr = 0;
return line;
}
ptr++;
} // End of read a character
} // End of loop
} // End of readLine
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 351 guests