Open Bucknalla opened 4 years ago
@Bucknalla that would be wonderful! What sort of validation do you have in mind? The way this repo is structured there are both "checks" and "diagnostics". The former is used for expressing something to the user directly (some degraded state), while the latter is used to collect extra data for later investigation or for an expert to review.
It's a good question regardless. I just merged this week a check that is ignored if no hardware is available (https://github.com/balena-io/device-diagnostics/blob/master/scripts/checks.sh#L59-L75), so perhaps that's a jumping off point?
Let me know how I can help you!
@xginn8 it would be great to report things like network strength, protocol (i.e. LTE/3G/etc.) maybe report the APN settings? I've often had devices that say they have network access but in reality what NetworkManager appears to show is just that the device has just registered on a network rather than actually able to TX/RX; a simple check for this would be great too.
My concern about ignoring the cellular modem is, how does this differentiate between there not being physical hardware for a cellular modem and if the cellular modem has completely failed?
[alidaodendaal] This issue has attached support thread https://jel.ly.fish/#/31e90b68-811c-4e1d-9665-ac3b01e6f689
@Bucknalla I finally got around to playing with a modem locally. What I'd like to propose would be a check that does a few things:
If a modem is attached, we'll run a (dedicated) check that:
If the OS detects no modem, that check will be turned off (which is gross, but a signal in and of itself).
We will also pull the descriptive output of mmcli -m 0
and mmcli -L
into our diagnostics logs for further debugging.
Is there anything else you think is missing? The clunkiest bits for me is that this probably belongs as a test in the larger check_networking
, but since that masks successful tests, we'll want it to live outside of that check. Also the negation logic is weird, but I can't think of a better way.
@xginn8 I agree, it feels like it should live in check_networking
but I think this way does make sense. I'm wondering if there's a clean way for us to ping a server over the modem and to confirm that we have network access? Additionally I'm not sure what the logic is like for detecting the presence of SIM cards, in mmcli, but that may also be interesting for the health check?
[ab77] This issue has attached support thread https://jel.ly.fish/3d651196-426a-4850-80b9-464ade24b5f4
@xginn8 I'm interesting in contributing some tests to support validating cellular modem behaviour. Is that something considered in the realms of what device-diagnostics should support?
If so, how would that behaviour be handled; would we want to enable cellular modem health checks via a flag or should it be something that the diagnostic script could extract from network/modem manager and ignore if it cannot find a cellular modem?