VintageNetMobile
A VintageNet
technology for using mobile connections.
def deps do
[
{:vintage_net_mobile, "~> 0.1.2"}
]
end
To get this technology running with VintageNet run the following:
VintageNet.configure(
"ppp0",
%{
type: VintageNetMobile,
modem: your_modem,
service_provider: your_service_provider
}
)
or add this to your config.exs
:
config :vintage_net,
config: [
{"ppp0", %{type: VintageNetMobile, modem: your_modem, service_provider: your_service_provider}}
]
Supported modems:
"Quectel BG96"
"Quectel EC25-AF"
Supported service providers:
"Twilio"
"Twilio Super"
System requirements
These requirements are believed to be the minimum needed to be added to the official Nerves systems.
Linux kernel
Enable PPP and drivers for your modem:
CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_HUAWEI_CDC_NCM=m
CONFIG_USB_NET_QMI_WWAN=m
CONFIG_USB_SERIAL_OPTION=m
Buildroot (nerves_defconfig)
Both pppd
and usb_modeswitch
are needed in the nerves_defconfig
:
BR2_PACKAGE_USB_MODESWITCH=y
BR2_PACKAGE_PPPD=y
BR2_PACKAGE_PPPD_FILTER=y
Busybox
Add the following to your nerves_defconfig
:
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="${NERVES_DEFCONFIG_DIR}/busybox.fragment"
and then create busybox.fragment
with the following:
CONFIG_MKNOD=y
CONFIG_WC=y
Custom Modems
VintageNetMobile
allows you add custom modem implementations if the built-in
implementations don't work for you:
config :vintage_net_mobile,
extra_modems: [MyBestLTEEverModem]
Modem implementations need to implement the VintageNetMobile.Modem
behaviour.
This will allow your modem to tie into VintageNetMobile
without having relying
on our supported providers. This is useful for highly custom chatscripts or
non-generic modem implementations.
VintageNet Properties
In addition to the common vintage_net
properties for all interface types, this technology reports the following:
Property | Values | Description |
---|---|---|
signal_rssi | 0-31 or 99 | An integer between 0-31 or 99 |
Serial AT command debugging
If you are running this on a nerves device and have elixircom installed:
iex> Elixircom.run("/dev/ttyUSB2", speed: 115200)
Will allow you to run AT commands. To test everything is okay:
iex> Elixircom.run("/dev/ttyUSB2", speed: 115200)
# type at and press enter
OK
Command | Description |
---|---|
at+csq | Signal Strength |
at+csq=? | Query supported signal strength format |
at+cfun? | Level of functionality |
at+cfun=? | Query supported functionality levels |
at+creg? | Check if the modem has registered to a provider. |
at+cgreg? | Same as above for some modems |
VintageNetMobile
makes it easy to add cellular support to your device.