aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Yashin <yashin.alexander.42@gmail.com>2021-06-23 16:03:38 +0300
committerAlexander Yashin <alexandr.yashin@emlid.com>2021-12-13 13:20:39 +0300
commitf95fb11b93f1bba495670b51ceba04d13966777e (patch)
tree1f57f61208b6702203bc5075abaccd034e0c6554 /include
parent2de0e8958985f40eac1c9ad84f75ae2d75f25e17 (diff)
ublox: add support to SIM hot swap
Main thing that's required to get modem hot-swapping to work is the UDCONF=50,1 command(see u-blox AT-command manual). But there are a lot of u-blox modules which do not support this command. So in this patch, it's supposed that this thing is configured beforehand(Like the UUSBCONF functioning mode) for modules, where SIM hot-swaping feature is possible. For the modems where it's not, the patch will not have any effects. ---- For ublox modems, CIEV: 12(X) messages allow to know if SIM is (un)plugged. The values are encoded as: - 0: no SIM detected - 1: SIM detected It's required from a modem to generate these events about the SIM detection state. To set up these `CIEV: 12,(X)` URC events the `+CMER=1,0,0,1,0` command is used. That command is supported by almost all u-blox modems except SARA-G300/SARA-G310/LEON-G1(For these models the hot-swap feature will not work). As this 12 that is used in CIEV may be completely different in other modules, the test command parsing is quite important to get that index number. So, this logic is also added in cind_simind_format_check_ready function. ---- It seems that it's necessary to issue this `+CMER` set up there despite that the `+CMER` configuration will take place later in the 3GPP interface enabling sequence. Because without it simind indications will not be enabled at all. CMER configuration may be later overwritten by 3GPP interface enabling sequence, but in the worst-case scenario only hot-swap feature will not work.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions