# `VintageNetMobile.Modem`
[🔗](https://github.com/nerves-networking/vintage_net_mobile/blob/v0.12.0/lib/vintage_net_mobile/modem.ex#L6)

A behaviour for modem implementations

# `add_raw_config`

```elixir
@callback add_raw_config(
  VintageNet.Interface.RawConfig.t(),
  config :: map(),
  opts :: keyword()
) ::
  VintageNet.Interface.RawConfig.t()
```

Update the raw configuration for the modem

The incoming raw configuration (first parameter) will have an initial generic
configuration that should be common to most modems. The second parameter is
the normalized VintageNet configuration and the final options are the ones
from VintageNet for determining file paths, etc.

Configuration errors raise exceptions, but it is good practice to catch the
errors in `normalize/1`.

# `normalize`

```elixir
@callback normalize(config :: map()) :: map()
```

Normalize a modem configuration

Modem implementations use this to update the `:modem_opts` key to a canonical
representation. This could be adding default fields, migrating old options,
or deriving parameters to that they need not be computed again.

Configuration errors raise exceptions.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
