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

Wifi non functional on Kobo Glo HD #4387

Closed
rtega opened this Issue Dec 8, 2018 · 27 comments

Comments

Projects
None yet
4 participants
@rtega
Copy link

rtega commented Dec 8, 2018

  • KOReader version: 12.0 and 11.1
  • Device: Kobo glo HD

Issue

When enabling wifi it says "scanning..." and then just a gray bar appears. I can't select my network. On the version previous to 11.0 it worked more or less flawless.

Steps to reproduce

crash.log (if applicable)

shows just:
12/08/18-08:54:18 INFO Kobo WiFi: enabling WiFi
12/08/18-08:55:44 INFO Kobo WiFi: disabling WiFi
12/08/18-08:55:48 INFO Kobo WiFi: enabling WiFi
12/08/18-08:56:26 INFO Kobo WiFi: disabling WiFi

@NiLuJe

This comment has been minimized.

Copy link
Member

NiLuJe commented Dec 8, 2018

Ye olde and weyrd Glo HD wpa-supplicant? Pinging @poire-z ;).

In the meantime, double-check that your usual networks are still being selected/saved in Nickel, as it may help ;).

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

What do you mean by the version previous to 2018.11 exactly? 2018.10? I'm afraid I don't see anything wifi-related here:

v2018.10.07-beta...v2018.11

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

It says: v2015.11-1800-g0924b57_2018_07-29
On this version the wifi works though I get the grey bar about 1 in 4 times.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

I'm on KSM 9 btw.

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

July's a bit further back; I'll have a look later.

@poire-z

This comment has been minimized.

Copy link
Contributor

poire-z commented Dec 8, 2018

Have you, by (mal)chance, upgraded your Kobo firmware?
I found out Wifi from KOReader or KSM didn't work on newer firmwares, see #4227 (comment) #4153 (comment)
Found no solution and went back to an older firmware.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

I don't see anything about wifi between July and October either.

v2018.07.29-beta...v2018.10.07-beta

Could you perhaps give the October release a go to narrow it down further?

@poire-z

This comment has been minimized.

Copy link
Contributor

poire-z commented Dec 8, 2018

4.7.10413 was for me among the newest problematic firmwares on GloHD.
Sure you haven't upgraded from <=4.6 to this one recently?

Does wifi ap scan in KSM show something ?
If it doesn't, OK, not koreader specific. Unless there is really a past KOReader version that did work, in which case we'd like to know which. Have you reinstalled that old version today on 4.7.10413?

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

@poire-z nope. I must have upgraded about a year ago so that definitely is not the reason. The old release works OK today (been using it all day).

Wifi ap scan in KSM shows my network as it should.

I'll try the October release. I'll be back to report on that soon.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

Nope, october release doesn't work either. I'll have a try with a fresh install of the release I'm using.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

Tried a fresh install of the release that works here. The difference is the following:

  • When I hit "Wi-Fi connection" it asks whether I want to turn wifi on, I hit yes
  • It scans and then it shows the infamous grey bar with no networks
  • I hit "Wi-fi connection" again and it asks whether I want to turn wifi on, I hit yes
  • It scans and pronto it shows the available networks which work
    Sometimes I don't have to try twice enabling Wi-Fi and I get the networks on the first scan.

When I try one of the releases that don't work:

  • When I hit "Wi-Fi connection" it asks whether I want to turn wifi on, I hit yes
  • It scans and then it shows the infamous grey bar with no networks
  • When I hit "Wi-Fi connection" again, the Wi-Fi connection square is turned on and it asks whether I want to turn wifi off
    I can try as many times as I want, I never seem to be getting the list of available networks. If I don't opt to turn wifi off and chose network info it has IP 127.0.0.1

I hope that clarifies what could be going on.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

The relevant code is in frontend/ui/network/manager.lua and definitely has changed.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

I guess this line
https://github.com/koreader/koreader/blob/master/frontend/ui/network/manager.lua#L127
should read something like
local wifi_status = NetworkMgr:isWifiOn() and NetworkMgr:isOnline()
as should line 125

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

It's definitely intentional move to allow connecting to the wifi without being online, though why that was tacked on like that is unclear to me. I should be more vigilant about that precisely for this reason, because something like Sony support doesn't exactly say "wifi change" when looking at commit messages.

It might, however, need to read something like isWifiOn() and isConnected().

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

I changed those lines as I suggested and lo and behold, it works again.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

Works with isConnected() as well. Also tested on the latest release.

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

Could you submit a PR with the latter change please?

The difference between the two is that isConnected() only checks if it can reach the default gateway (the router it's supposedly connected to), while isOnline() checks if it can retrieve an IP for dns.msftncsi.com, which is the same method used by Microsoft Windows to check whether it has internet connectivity.

I used that specific method because I presumed it's more likely to be trustworthy than using koreader.rocks, though I don't really know if it is. ;-)

Anyway, we basically used to be too pedantic about having Internet connectivity, which got in the way of local transfers.

@NiLuJe

This comment has been minimized.

Copy link
Member

NiLuJe commented Dec 8, 2018

Wasn't the change intended to avoid the delay inherent to isConnected that it added to the menu?

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

Good point. I repeat, that's why I like smaller commits, whether they're in small PRs or well organized rebased bigger PRs with multiple commits. Makes it clear while looking at the logs and while using git blame. ;-)

What I'm mostly confused about is how this count impact, well, anything at all other than the menu loading speed really.

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

Mmm, not on git I'm sorry.

@NiLuJe

This comment has been minimized.

Copy link
Member

NiLuJe commented Dec 8, 2018

c.f., #4192 for the original discussion ;).

In PRSTUX's case, it could apparently be a softlock, not just a delay ;).

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

Well, that completely slipped my mind. Thanks!

@NiLuJe

This comment has been minimized.

Copy link
Member

NiLuJe commented Dec 8, 2018

That said, OTOH, isConnected should handle that case sanely, unlike isOnline, FWIW ;).

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

Nice, now it would be nice to have it scan twice in case the first scan doesn't show any results so I don't have to hit "Wi-Fi connection" twice every time I want to go on the net. The second scan usually doesn't take so long before it gives results.

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Dec 8, 2018

Well yeah, I passed that -w2 very much on purpose. :-)

@rtega

This comment has been minimized.

Copy link

rtega commented Dec 8, 2018

Well, that doesn't do much in this case. It looks like in the file common/lj-wpaclient/wpaclient.lua it doesn't get the list it should be getting. On second try it does. I can solve this crudely by letting it scan twice in frontend/ui/network/manager.lua in function showNetworkMenu:
Well, that doesn't do much in this case. It looks like in the file common/lj-wpaclient/wpaclient.lua it doesn't get the list it should be getting. On second try it does. I can solve this crudely by letting it scan twice in frontend/ui/network/manager.lua in function showNetworkMenu

        if (table.getn(network_list) == 0) then
            --UIManager:show(InfoMessage:new{text = err})
            --return
            network_list, err = self:getNetworkList()
        end

But that's a crude solution of course.

NiLuJe added a commit to NiLuJe/koreader that referenced this issue Jan 8, 2019

NiLuJe added a commit to NiLuJe/koreader that referenced this issue Jan 8, 2019

NiLuJe added a commit to NiLuJe/koreader that referenced this issue Jan 9, 2019

@NiLuJe NiLuJe closed this in #4461 Jan 9, 2019

NiLuJe added a commit that referenced this issue Jan 9, 2019

Implement workarounds for/from #4387 to better handle WiFi menu
corner-cases on some Kobo devices

Fix #4387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment