summaryrefslogtreecommitdiffstats
path: root/boot.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-07-19 00:56:25 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-07-19 01:28:33 +0200
commit63058d5bdb8a50fe650a7b91f6c6e29bdaf583b9 (patch)
tree8f6421038b0ff586cc0e99981ed35109c55cc736 /boot.c
parent9af74e1e2707bee3dcbf1008682566d330418d8a (diff)
downloadqmi-ril-63058d5bdb8a50fe650a7b91f6c6e29bdaf583b9.tar.gz
qmi-ril-63058d5bdb8a50fe650a7b91f6c6e29bdaf583b9.tar.bz2
qmi-ril-63058d5bdb8a50fe650a7b91f6c6e29bdaf583b9.zip
various fixes and improvements, mostly for EFS sync
EFS data is sometimes successfully received and the modem stays online because the reset after the sync works (even if the EFS sync itself fails). EFS data is not yet written to the partition. This needs to be implemented. When EFS data is read, timeouts are now checked and the data is read in chunks which mirrors the behaviour of the kickstart tool. Strangely enough, occasionally after receiving the first package, that is below the maximum size, a timeout happens and the complete data is never received during all runs. Either the modem is not sending the complete data for whatever reason or there is still something wrong with the command chain. Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'boot.c')
-rw-r--r--boot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/boot.c b/boot.c
index d22de18..4198f90 100644
--- a/boot.c
+++ b/boot.c
@@ -53,7 +53,7 @@ int configure_tty(int *tty_fd, time_t timeout_sec, long int timeout_usec)
timeout.tv_sec = timeout_sec;
timeout.tv_usec = timeout_usec;
- rc = select(tty_dev+1, NULL, &fds, NULL, &timeout);
+ rc = select(tty_dev+1, &fds, NULL, NULL, &timeout);
if (rc <= 0) {
printf("failed to set timeout\n");
return -1;
@@ -69,6 +69,7 @@ int main()
int mdm_dev, tty_dev;
int mode;
struct sah_data_end_ack data_end_ack;
+ int hellos = 0;
int rc;
mdm_dev = open(MDM_DEVICE, O_RDONLY | O_NONBLOCK);
@@ -141,7 +142,7 @@ int main()
}
while (1) {
- rc = handle_memory_debug(tty_dev);
+ rc = handle_memory_debug(tty_dev, &hellos);
if (rc < 0) {
printf("error during modem operation\n");
return -1;