Commit f380fcc
drivers: modem_cellular: fix handling of
`+C*REG:` may be received as AT read command answer
or unsolicited notification.
Their syntax differs, and even the overall parameter count varies
depending on what `<n>` is used in the `AT+CEREG=` write command.
To handle all cases properly, check the parameter count and
the presence of the `<tac>` parameter (which is a string and
thus begins with `"`) to figure out what is the position of `<stat>`.
Signed-off-by: Tomi Fontanilles <[email protected]>+C*REG answers1 parent a30e41f commit f380fcc
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
464 | | - | |
465 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
466 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
467 | 472 | | |
468 | 473 | | |
469 | 474 | | |
| |||
472 | 477 | | |
473 | 478 | | |
474 | 479 | | |
475 | | - | |
| 480 | + | |
476 | 481 | | |
477 | 482 | | |
478 | 483 | | |
| |||
0 commit comments