nerves-networking / vintage_net_mobile

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

Handle disconnected +CREG responses #65

Closed fhunleth closed 4 years ago

fhunleth commented 4 years ago

This fixes an issue where the system would report unhandled +CREG responses to the log when cellular wasn't connected. The current handling is simplistic and only updates VintageNet properties to remove stale information about the network.

Before pppd disconnects, the properties look like this:

{["interface", "ppp0", "mobile", "access_technology"], "No Service"},
{["interface", "ppp0", "mobile", "band"], ""},
{["interface", "ppp0", "mobile", "channel"], 0},
{["interface", "ppp0", "mobile", "signal_4bars"], 0},
{["interface", "ppp0", "mobile", "signal_asu"], 99},
{["interface", "ppp0", "mobile", "signal_dbm"], -113},

Once pppd disconnects, the first three go away as well as the lac, cid, carrier name, etc. The signal level ones are handled by another monitor.