nerves-networking / vintage_net_mobile

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

Remove service providers look up #33

Closed mattludwigs closed 4 years ago

mattludwigs commented 4 years ago

Remove the service provider lookup and spec related code. This allows us not to have to main a database of service providers and makes the configuration values more simple for custom modems.

This changes the configuration to stop using a modem string name, and just pass the modem module. I know there has been some back and forth, but since we are removing the service provider lookup it seemed like a better configuration option. I am open to suggestions, but I am leaning towards it as of right now.

On the Elixir side, it feels nicer to just use a module, but I know the main reason we wanted to use strings was for when people wanted to display the modem information in a UI. However, I think if we wanted there are other options to do this in the future.

Removing the looks ups allowed us to remove the spec callback, which to me felt awkward to start with.

One thing that I would suggest, although I did not do this yet in the PR, is to change service_providers to apns maybe? Most of the service provider information is not really needed it seems, not even for setting the PDP context. If we wanted to provide more information to the PDP context configuration it would be better to add that via another configuration field(s). The PDP context slams together APN, protocol information (IPv4, IPv6, ect.), compression, and static IP configuration. Also, my guess is if the modem is not officially supported, that is to say, it is a custom modem, the normal use case is to hard code this information into the chatscript that implementation uses.

mattludwigs commented 4 years ago

@fhunleth I am closing this.