nerves-networking / vintage_net_mobile

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

Add signal strength calculations #55

Closed fhunleth closed 4 years ago

fhunleth commented 4 years ago

This improves the signal quality property by:

  1. Renaming the current RSSI report to ASU (arbitrary strength unit) since that's more accurate. ASU's are confusing since they change definition based on GPRS, UMTS, and LTE. And they appear to change based on modem. ASUs are still reported since if anyone doesn't trust our calculations, they can use it raw.
  2. Add signal_4bars that gives a number 0-4 that maps to the number of bars that you'd display on a cell phone to show signal strength. The conversion is subjective, but it's a start.
  3. Add signal_dbm that converts ASU to dBm. This is unfortunately confusing too since it's only RSSI on GPRS connections. UMTS changed what's being measured and then LTE changed it again.
  4. Added references for anyone maintaining the code or getting confused by the reports

Here's an example:

   {["interface", "ppp0", "mobile", "signal_asu"], 21},
   {["interface", "ppp0", "mobile", "signal_4bars"], 4},
   {["interface", "ppp0", "mobile", "signal_dbm"], -71},