nerves-networking/vintage_net_qmi

Configure modem based on ICCID

Closed this issue · 3 comments

It's possible to manually configure modems depending on where they're deployed, but it would be nicer to automate this. It turns out that the ICCID can be used to do that. For example, one ICCID range could map to using one APN and another ICCID range could map to another.

One example of this is described at https://www.twilio.com/docs/iot/supersim/check-a-device-has-super-sim, but it seems to be similar for other SIM providers.

Any thoughts about how the :vintage_net config for this would look.

Current we have:

{ifname, %{type: VintagetNetQMI, vintaget_net_qmi: %{services_providers: [%{apn: "provider"}]}}}

Do you think that having the services providers fields as a list like with maps like this:

%{apn: binary(), iccid_start: binary(), iccid_end: binary()}

Also, we could just say if you pass %{apn: "super"} we can change to make sure that the SIM is indeed a super SIM. Maybe that would be a good first pass at anything.

if apn is super and the iccid is super then do connect
else cannot connect and log a helpful message as for why this wont connect

How about:

%{apn: binary(), only_iccid_prefixes: [binary()]}

like

%{apn: "super", only_iccid_prefixes: ["8988307", "8988323"]}

Fixed in v0.2.13