nerves-networking / vintage_net_mobile

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

Support modem and user chatscript additions #70

Closed fhunleth closed 4 years ago

fhunleth commented 4 years ago

It's really useful to be able to add or override commands in the chatscripts. This lets you do modem and application-specific things without creating custom modem modules or adding little used features to vintage_net_mobile.

Both modems and users can add lines to the chatscript. User additions take precedence. I.e., modem-specific additions are listed first and then user-provided ones are run. That allows users to override anything. The additions happen immediately before the PPP connect step.

Here's an example configuration:

    %{
      type: VintageNetMobile,
      modem: your_modem,
      vintage_net_mobile: %{
        service_providers: [
          %{apn: "wireless.twilio.com"}
        ],
        chatscript_additions: "OK AT+KSIMSEL=4"
      }
    }