nerves-networking / vintage_net_mobile

Mobile networking for VintageNet
Apache License 2.0
27 stars 11 forks source link

Support multiple service provider configurations #36

Closed mattludwigs closed 4 years ago

mattludwigs commented 4 years ago

I tested with Twilio super sims and their base sim cards on both the BG96 and EC25-AF.

The PDP context id is generated as we iterate through the list, but I wonder if we wanted to add that field the service provider info map? The reason for this field is that some AT commands allow you to work with a particular PDP context, so this is the way to identify which context you are trying to use in those AT commands.

fhunleth commented 4 years ago

Is there a use case that requires knowing pdp context indices? If not yet, then I'd rather defer the implementation until then. What you did here seems good to me.

mattludwigs commented 4 years ago

The more I think about it modems have only a valid range of ids that are allowed. For example, for both the BG96 and EC25-AF they only allow 1-24 and 100-179, so if I had 25 service providers then the 25th one wouldn't work.

It seems impractical for someone to randomly configure 24+ service providers, so I am okay with leaving as-is for now. The modems can kinda validate this but cannot just do length on the service provider list due to the gap between 25 and 99.

Thoughts?

fhunleth commented 4 years ago

I'm not sure what you want to do. The only choices we have are to return error or ignore options that don't work.