vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.94k stars 719 forks source link

Human readable state or percentage would make also sense #494

Open slavino opened 3 years ago

slavino commented 3 years ago

https://github.com/vshymanskyy/TinyGSM/blob/b0e363c536b24250f3045aed7bd9a005dd1b2a66/examples/AllFunctions/AllFunctions.ino#L220

https://m2msupport.net/m2msupport/atcsq-signal-quality/

Maybe assigning percentage to range?

Example

Value   RSSI dBm    Condition
2   -109    Marginal
3   -107    Marginal
4   -105    Marginal
5   -103    Marginal
6   -101    Marginal
7   -99 Marginal
8   -97 Marginal
9   -95 Marginal
10  -93 OK
11  -91 OK
12  -89 OK
13  -87 OK
14  -85 OK
15  -83 Good
16  -81 Good
17  -79 Good
18  -77 Good
19  -75 Good
20  -73 Excellent
21  -71 Excellent
22  -69 Excellent
23  -67 Excellent
24  -65 Excellent
25  -63 Excellent
26  -61 Excellent
27  -59 Excellent
28  -57 Excellent
29  -55 Excellent
30  -53 Excellent

Maybe call it getSignalQualityPercentage https://github.com/vshymanskyy/TinyGSM/blob/b0e363c536b24250f3045aed7bd9a005dd1b2a66/src/TinyGsmModem.tpp#L209

SRGDamia1 commented 3 years ago

Seems reasonable. Someday I might get around to it.