-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Diagnostics] Signal strength/quality #1423
[Diagnostics] Signal strength/quality #1423
Conversation
…, TS 25.133, TS 36.133
…and scale if necessary
… The reserved parameter is now used for cellular_signal_t
… when reporting signal quality parameters
…l strength/quality
…s. We can now enable this on Photon as well
- Adding net.sigstr: signal strength Q8.8 0-100 (%) - Adding net.sigstrv: signal strength value, signed Q16.16 access technology dependent - Adding net.sigqual: signal quality Q8.8 0-100 (%) - Adding net.sigqualv: signal quality value, signed Q16.16, access technology dependent - Adding net.at: access technology. Enum: - 0: UNKNOWN - 1: WIFI - 2: GSM - 3: EDGE - 4: UMTS/UTRAN/WCDMA/3G - 5: CDMA - 6: LTE
Since this changes WiFI.RSSI() for the Core, I wonder if you could also check #985 and #921 please! |
} | ||
|
||
inf->rssi = rssi * 100; | ||
inf->snr = INT_MIN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should have flags to indicate which fields are supported.
break; | ||
} | ||
} | ||
return res; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps factor out fetching the data from the modem from computing the percentages so that the computation can be more easily tested.
} | ||
|
||
inf->rssi = rssi * 100; | ||
inf->snr = INT_MIN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add flags to explicitly indicate which fields are supported?
inf->snr = (rssi - noise) * 100; | ||
inf->noise = noise * 100; | ||
|
||
inf->strength = std::min(std::max(2 * (rssi + 100), 0L), 100L) * 65535 / 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similarly here, please consider factoring out fetching the signal values from the normalization code.
#endif | ||
system_tick_t ts_ = 0; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea, since the higher level wiring APIs access the signal data field by field.
submission notes
Solution
Steps to Test
N/A
Example App
N/A
References
Completeness