Windows 10 Tablet QNetworkConfigurationManager not online if WIFI
-
after years developing apps for Android and iOS I recently added Windows10 64 bit.
thx to Qt my QtQuickControls2 apps are running on Windows10 with less changes in UI
will blog about this later
for my windows 10 support I only need .exe for desktop app - no UWP apps
on a fresh Windows 10 pro 64 bit I installed:- MSVC 2017 CE
- Qt 5.12 RC - MSVC 2017
to deploy the app: - vcvars64.bat
- windeployqt --qmldir Y:\myApp\qml Y:\build-myApp-Desktop_Qt_5_12_0_MSVC2017-Release\release
myApp.exe is working on - my development environment (macOS 10.13.6 + Parallels VM - Windows 10 pro 64 bit)
- a customer Windows 10 pro Touch device
both connected via LAN
now the problem:
customers testing the app reporting that the app only works in LAN, but not connected to WIFI adapters
I'm checking isOnline checking the onlineStateChanged SIGNAL from QNetworkConfigurationManager - same as on Android
(on iOS I'm using OBJ-C ReachabilityListener)
any ideas what can be wrong in windows ?
will get a Windows 10 Tablet with WIFI next week to do more detailed tests
-
@ekkescorner said in Windows 10 Tablet QNetworkConfigurationManager not online if WIFI:
I'm checking isOnline checking the onlineStateChanged SIGNAL from QNetworkConfigurationManager - same as on Android
(on iOS I'm using OBJ-C ReachabilityListener)I don't follow. Do you see the wifi as a configured interface at all? Or is it only that you can't connect to it?
-
@kshegunov there are no active configurations listed if connected via WIFI, if connected via LAN, Ethernet configuration is active.
Browser can access internet in both cases: WIFI and LAN
unfortunately I don't have a windows device here with WIFI adapter - next week I'll get a customer device.
Developing since 40 yrs now, but never did Windows development before ;-)
on Android WIFI connection works wellfound something similar: https://stackoverflow.com/questions/48768295/qnetworkconfigurationmanagerallconfigurations-doesnt-list-wlan
as soon as I'll have a device here I can explore it in detail
-
Developing since 40 yrs now, but never did Windows development before ;-)
are you really sure you wanne start now? ;)
-
@aha_1980 hehe ;-)
one of my best customers running my QQC2 apps on Android and iOS now also needs to run the apps on Windows 64 pro 64 Touchscreens - so there's no way around
thx to Qt I can use the same src
have adjusted the UI, mastered the deployment process (Qt Installer Framework on TODO), all works well from devices connected to LAN, but fails on WIFI -
Hi,
I think QTBUG-65586 might be of interest.
-
The wifi bearer plugins were disabled from the regular build due to network performance issues due to the scanning being performed. For windows, you can compile the nativewifi bearer plugin, install it into your Qt being used, and it will work.
-
@SGaist thx mentioning this bug. on iOS I'm using native classes (ReachabilityListener.mm) - is there a way to use native windows classes same way ?
-
@lorn.potter I have no idea how I should compile the wifi bearer plugins.
couldn't imagine that such basic stuff - detect if device connected via wifi - doesn't work -
@lorn.potter found qnativewifibearer.dll here: https://www.dllme.com/dll/files/qnativewifibearer_dll.html
my customers copied the dll into release/bearer folder and now it is working.now it would be a good question HowTo compile the dll by myself instead of downloading from web
-
@ekkescorner
I'm surprised, that should be part of the qt installationpath\to\Qt\5.XX.X\msvc20XX\plugins\bearer
but I noticed it's absence in my installation as well! I still have it in my original deployment folder from one of the older versions, apparently.
-
@J.Hilk I don't have older installation folders for windows - just started Windows development after years of android/iOS/ (BB10)
-
If you want only the plugin it should be enough to run
qmake
from the Qt distribution you're using in the plugin folder and thennmake
/mingw32-make
... -
@kshegunov I don't have mingw - only installed MSVC2017 and Qt 5.12
-
@ekkescorner said in Windows 10 Tablet QNetworkConfigurationManager not online if WIFI:
@kshegunov I don't have mingw - only installed MSVC2017 and Qt 5.12
That's fine, I just didn't know what compiler you chose. So you invoke
nmake
(msvc's version ofmake
) after callingqmake
. Unless there's some oddity it should compile. You are probably also going to need the Windows SDK for the import library files and headers and such. -
@kshegunov as a mobile-app-developer and IDE-user and no-cmdline-expert I have no idea what parameters I have to set for qmake ;-)
this is the content of my plugins/bearer folder where the native wifi plugin is missed
-
@J.Hilk perhaps the easiest way for me is to download an older version of Qt and copy the dll
what was your newest version of Qt where the native wifi dll was contained ? -
To be absolutely frank, I rarely compile on windows, and I haven't really checked the mentioned plugin in detail, so I'm of little help here. But I took a quick peek and the
nativewifibearer
uses the private classes, so you almost certainly would need to build Qt from scratch to be sure everything is as it should be binary-wise. If you decide to do that, before actually building you should add whatever plugin you want to theSUBDIRS
variable at the end of theqtbase/src/plugins/bearers/bearers.pro
file. -
@kshegunov thx. think I don't want to do this ;-)
will see to copy the dll from an older Qt version and open bug report -
@ekkescorner said in Windows 10 Tablet QNetworkConfigurationManager not online if WIFI:
@J.Hilk perhaps the easiest way for me is to download an older version of Qt and copy the dll
what was your newest version of Qt where the native wifi dll was contained ?I have no idea, I usually remove older versions from my hd.
The creation date is june 2017, so 5.9 LTS ?