Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-03-2024, 07:30 PM   #1
MulletGoneViral
Member
MulletGoneViral began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour
Clara colour not connecting to wifi - Koreader throws error

I have a new kobo clara colour that I recently had to factory reset for another problem. It worked fine for a while, but recently when connecting to a new wifi network, the wifi has stopped working.

I was using koreader, and I connected to the wifi as normal. Everything worked fine. Then I put the kobo to sleep, and when I woke it up again the wifi was off, as it should be. I turned it back on and koreader threw an error:

./luajit: frontend/util.lua:1092: attempt to get length of local 'str' (a nil value)

I exited koreader and tried to connected via the normal kobo menu. It scanned for a while and said no wifi networks found. I tried to manually enter the network details, I got the error 'could not connect, please try again'. I rebooted the kobo and repeated the same steps and got the same results.

Is there anyway I can reset the wifi settings? Is there a known fix to this? I don't think this is a problem with koreader, but I don't know what else it could be.
MulletGoneViral is offline   Reply With Quote
Old 08-03-2024, 07:44 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,889
Karma: 76440364
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I wonder if you might have an invalid wpa_supplicant file on the device.

Years ago I came up with a patch to recreate that file. See https://www.mobileread.com/forums/sh...d.php?t=247678




Sent from my Pixel 7a using Tapatalk
PeterT is offline   Reply With Quote
Advert
Old 08-03-2024, 07:56 PM   #3
MulletGoneViral
Member
MulletGoneViral began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour
Update: deleted network.lua, launched koreader again, and it worked (but only on koreader)! I connected to the network again, disconnected, tried again, annnnnnd it crashed.

What is going on?

The contents of network.lua is as follows, (some info redacted ofc):

return {
["WifiName"] = {
["flags"] = "[WPA2-PSK-CCMP][WPS-AUTH][ESS]",
["password"] = "Password",
["psk"] = "thenetworkpsk",
["ssid"] = "WifiName",
},
["Other old wifi"] = {
["flags"] = "[ESS]",
["password"] = "",
["ssid"] = "Other old wifi",
},
}
MulletGoneViral is offline   Reply With Quote
Old 08-03-2024, 08:01 PM   #4
MulletGoneViral
Member
MulletGoneViral began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour
Quote:
Originally Posted by PeterT View Post
I wonder if you might have an invalid wpa_supplicant file on the device.

Years ago I came up with a patch to recreate that file. See https://www.mobileread.com/forums/sh...d.php?t=247678


Sent from my Pixel 7a using Tapatalk
Sorry I didnt see your post. I'll look into that
MulletGoneViral is offline   Reply With Quote
Old 08-03-2024, 08:07 PM   #5
MulletGoneViral
Member
MulletGoneViral began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour
Quote:
Originally Posted by PeterT View Post
I wonder if you might have an invalid wpa_supplicant file on the device.

Years ago I came up with a patch to recreate that file. See https://www.mobileread.com/forums/sh...d.php?t=247678




Sent from my Pixel 7a using Tapatalk
Well it didn't work, but I think it might be something along those lines. I tried going into wifi settings and pressing delete networks, but it just got stuck on 'retrieving known networks"
MulletGoneViral is offline   Reply With Quote
Advert
Old 08-03-2024, 09:00 PM   #6
MulletGoneViral
Member
MulletGoneViral began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour
So i tried to track down the error.

This boi here is fed a null somehow:

function util.fixUtf8(str, replacement)
local pos = 1
local len = #str

By this other boi here:

-- Next, look for our own preferred networks...
local err_msg = _("Connection failed")
if not success then
for dummy, network in ipairs(network_list) do
if network.password then
-- If we hit a preferred network and we're not already connected,
-- attempt to connect to said preferred network....
logger.dbg("NetworkMgr: Attempting to authenticate on preferred network", util.fixUtf8(ssid, " "))

And then we have this (just before that up there ^^^) which makes me think something's going on with the wpa_supplement:

table.sort(network_list,
function(l, r) return l.signal_quality > r.signal_quality end)

-- true: we're connected; false: things went kablooey; nil: we don't know yet (e.g., interactive)
-- NOTE: false *will* lead enableWifi to kill Wi-Fi via _abortWifiConnection!
local success
local ssid
-- We need to do two passes, as we may have *both* an already connected network (from the global wpa config),
-- *and* preferred networks, and if the preferred networks have a better signal quality,
-- they'll be sorted *earlier*, which would cause us to try to associate to a different AP than
-- what wpa_supplicant is already trying to do...
-- NOTE: We can't really skip this, even when we force showing the scan list,
-- as the backend *will* connect in the background regardless of what we do,
-- and we *need* our complete_callback to run,
-- which would not be the case if we were to just dismiss the scan list,
-- especially since it wouldn't show as "connected" in this case...
for dummy, network in ipairs(network_list) do
if network.connected then
-- On platforms where we use wpa_supplicant (if we're calling this, we probably are),
-- the invocation will check its global config, and if an AP configured there is reachable,
-- it'll already have connected to it on its own.
success = true
ssid = network.ssid
break
end
end

So somehow ssid turned out to be a nil value and it got yeeted into a function that doesn't like nil values. But that's all koreader stuff, so it doesn't explain what's happening on the stock reader. So that makes me think that something has gone bad that both koreader and normal kobo use to connect to the wifi. But then how come I can connect to the wifi by deleting the network.lua file, and what's the kobo equivalent of that file? This problem has something to do with known networks, but what?

I am really confused. And frustrated cause I literally just factory rest my kobo and I realllllly dont want to do it again. ugh.
MulletGoneViral is offline   Reply With Quote
Old 08-03-2024, 09:52 PM   #7
MulletGoneViral
Member
MulletGoneViral began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour
Well I factory reset it annnnnnd now its bricked. Can't connect to the wifi so cant do anything. Yays killed a brand new clara. I cannot believe this.
MulletGoneViral is offline   Reply With Quote
Old 08-05-2024, 07:31 AM   #8
MulletGoneViral
Member
MulletGoneViral began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour
Must've been a faulty update because I downgraded and updated again and wifi works now. I might have a faulty memory chip though, because I've been having problems that point to corruption. My database has killed itself twice now and now this problem is most likely because the file to the wifi configs couldn't be found/was corrupted. If that's the case I'll get a new kobo on warranty hopefully.
MulletGoneViral is offline   Reply With Quote
Old 08-05-2024, 07:33 PM   #9
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,356
Karma: 4753060
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
This PR is very similar to your observations:
https://github.com/koreader/koreader...ent-2269544149

Otherwise, just open a ticket on GitHub. Make sure to enable verbose logging and reproduce the crash, then provide the crash.log file. Everything is explained in the ticket template.
mergen3107 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Skipping forced registration on Libra Colour and Clara Colour shyhermit Kobo Reader 48 12-04-2024 01:56 PM
UK: Clara Colour on sale PeterT Deals and Resources (No Self-Promotion or Affiliate Links) 0 06-26-2024 09:08 PM
"Error communicating with device" on Kobo Clara w Koreader jd2733 Devices 2 01-17-2021 11:45 AM
2 content.opf, one throws error, other doesn't mrmikel ePub 2 09-29-2014 05:47 PM
Starting content server throws an error 55 valiant66 Calibre 4 06-09-2009 11:40 AM


All times are GMT -4. The time now is 11:12 PM.


MobileRead.com is a privately owned, operated and funded community.