Ok, so indeed two issues:
1) Applications unable to retrieve network status of ofono based modems:
That's because the only way to retrieve that information, currently, is indeed via ofono:
src/systeminfo/linux/qnetworkinfo_linux.cpp:
===
...
case QNetworkInfo::GsmMode:
case QNetworkInfo::CdmaMode:
case QNetworkInfo::WcdmaMode:
case QNetworkInfo::LteMode:
case QNetworkInfo::TdscdmaMode:
#if !defined(QT_NO_OFONO)
qDebug() << "getting network status for modem";
if (QOfonoWrapper::isOfonoAvailable()) {
if (!ofonoWrapper) ofonoWrapper = new QOfonoWrapper(this); QStringList modems = ofonoWrapper->allModems();
if (interface < modems.size()) { QString modem = ofonoWrapper->allModems().at(interface);
if (!modem.isEmpty()) return ofonoWrapper->networkStatus(modem);
}
}
#endif
break;
===
Status, following the oFono doc:
string Status [readonly]
The current registration status of a modem.
The possible values are: "unregistered" Not registered to any network "registered" Registered to home network "searching" Not registered, but searching "denied" Registration has been denied "unknown" Status is unknown "roaming" Registered, but roaming
Which is what we want indeed.
Now before we go and implement another method to provide the information we need, why do you think GetProperties reveals too much information for the apps?
2) The issue with Mako, when ofono is disabled, is that it returns NoNetworkAvailable for wlan because mako's driver fails to report the proper signal via /proc/net/wireless. As a quick workaround (due the broken drivers), I'd suggest trusting only on
/sys/class/net/wlan0/carrier instead.
Ok, so indeed two issues: linux/qnetworki nfo_linux. cpp: :GsmMode: :CdmaMode: :WcdmaMode: :LteMode: :TdscdmaMode: QT_NO_OFONO) :isOfonoAvailab le()) {
ofonoWrapper = new QOfonoWrapper( this);
QStringLis t modems = ofonoWrapper- >allModems( );
QString modem = ofonoWrapper- >allModems( ).at(interface) ;
return ofonoWrapper- >networkStatus( modem);
1) Applications unable to retrieve network status of ofono based modems:
That's because the only way to retrieve that information, currently, is indeed via ofono:
src/systeminfo/
===
...
case QNetworkInfo:
case QNetworkInfo:
case QNetworkInfo:
case QNetworkInfo:
case QNetworkInfo:
#if !defined(
qDebug() << "getting network status for modem";
if (QOfonoWrapper:
if (!ofonoWrapper)
if (interface < modems.size()) {
if (!modem.isEmpty())
}
}
#endif
break;
===
Status, following the oFono doc:
string Status [readonly]
The current registration status of a modem.
The possible values are:
"unregistered " Not registered to any network
"registered" Registered to home network
"searching" Not registered, but searching
"denied" Registration has been denied
"unknown" Status is unknown
"roaming" Registered, but roaming
Which is what we want indeed.
Now before we go and implement another method to provide the information we need, why do you think GetProperties reveals too much information for the apps?
2) The issue with Mako, when ofono is disabled, is that it returns NoNetworkAvailable for wlan because mako's driver fails to report the proper signal via /proc/net/wireless. As a quick workaround (due the broken drivers), I'd suggest trusting only on net/wlan0/ carrier instead.
/sys/class/
Follows the patch: o/linux/ qnetworkinfo_ linux.cpp b/src/systeminf o/linux/ qnetworkinfo_ linux.cpp o/linux/ qnetworkinfo_ linux.cpp o/linux/ qnetworkinfo_ linux.cpp :NetworkStatus QNetworkInfoPri vate::getNetwor kStatus( QNetworkInfo: : open(QIODevice: :ReadOnly) ) {
char state; read(&state, 1) == 1) && trength( QNetworkInfo: :WlanMode, interface) > -1)) {
return QNetworkInfo: :HomeNetwork;
diff --git a/src/systeminf
index effdc93..03649c1 100644
--- a/src/systeminf
+++ b/src/systeminf
@@ -869,8 +869,7 @@ QNetworkInfo:
if (carrier.
if ((carrier.
- (state == '1') &&
- (networkSignalS
+ (state == '1')) {
}
}