Skip to content

Commit b31de42

Browse files
committed
TMO_SHELL: DFU: Changes to get proper update for wifi
Changed the default filename for wifi. Signed-off-by: Kim Mansfield <[email protected]>
1 parent 66fb246 commit b31de42

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

samples/tmo_shell/src/dfu_rs9116w.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ int32_t dfu_wifi_write_image(void)
195195

196196
while (!fwUpgradeDone) {
197197

198-
//printf("dfu_rsi_write_image: RS9116W State = %d\n", rs9116w_app_cb.state);
199198
switch (rs9116w_app_cb.state) {
200199
case RS9116W_INITIAL_STATE:
201200
{

samples/tmo_shell/src/tmo_dfu_download.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ int tmo_dfu_download(const struct shell *shell, enum dfu_tgts dfu_tgt, char *bas
210210
sprintf((char *)dfu_files_rs9116w[0].rfile, "%s.rps",base);
211211
dfu_files = dfu_files_rs9116w;
212212

213-
sprintf(base_url_s,"%srs9116w/",user_base_url_s);
214-
213+
strncpy(base_url_s,user_base_url_s,sizeof(base_url_s)-1);
215214

216215
default:
217216
break;

samples/tmo_shell/src/tmo_shell.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1746,11 +1746,15 @@ int cmd_dfu_download(const struct shell *shell, size_t argc, char **argv)
17461746
return -EINVAL;
17471747
}
17481748

1749-
if (argv[2] == NULL && target > 0) {
1749+
if (argc <= 2 && target == 1) { // have modem
17501750
shell_error(shell, "There are no updates at this time");
17511751
return -EINVAL;
17521752
}
17531753

1754+
if (argc <= 2 && target == 2) { // have wifi
1755+
return tmo_dfu_download(shell, target, "rs9116w/RS9116W.2.7.0.0.39", argv[3]);
1756+
}
1757+
17541758
return tmo_dfu_download(shell, target, argv[2], argv[3]);
17551759
}
17561760

0 commit comments

Comments
 (0)