From ad1d6e5d3e73ebba95d2ff014f6242345983d64b Mon Sep 17 00:00:00 2001 From: ArenM Date: Sat, 11 Sep 2021 13:42:59 -0400 Subject: [PATCH] gnss: increase upload timeout to 10 seconds The timeout for QFUPL defaults to 5 seconds which is about how long it takes to upload data under ideal circumstances. I'm not sure if this will actually have an effect, the docs say " The time waiting for data to be inputted to USB/UART. The default value is 5. Unit: s." which could be the time before the first byte is received. --- src/gnss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gnss.c b/src/gnss.c index 2a1b38a..0145606 100644 --- a/src/gnss.c +++ b/src/gnss.c @@ -14,6 +14,7 @@ #define BUFFER_SIZE 256 #define UPLOAD_DELAY_US 10000 +#define UPLOAD_TIMEOUT_S 10 #define RESCHEDULE_IN_SECS 30 static void gnss_step(struct EG25Manager *manager); @@ -280,8 +281,8 @@ static void init_assistance_data_upload_start(struct EG25Manager *manager, lseek(manager->gnss_assistance_fd, 0, SEEK_SET); /* Start upload */ - g_snprintf(value, BUFFER_SIZE, "\"RAM:%s\",%ld\r\n", - manager->gnss_assistance_file, size); + g_snprintf(value, BUFFER_SIZE, "\"RAM:%s\",%ld,%d", + manager->gnss_assistance_file, size, UPLOAD_TIMEOUT_S); g_message("Initiate GNSS assistance data upload: %s", value); at_append_command(manager, "QFUPL", NULL, value, NULL, init_assistance_data_upload_ready);