Mobileread
KO reader Calibre wireless cannot connect
#1  jasius 01-13-2021, 03:09 AM
I'm using Version 2020.12-108 I just updated my ereader tonight, but it's been weeks since I've been able to get my Calibre wireless connection working, it used to work flawlessly until recently.

I get the message "Cannot connect to calibre server"

Are there any ports I should be forwarding to make it work on my router? Nothing has really changed on my side of things.

I'm wondering why this excellent feature seemingly randomly stopped working for me.

I appreciate any help.

I go to Calibre and select "Start wireless device connection" leave everything blank and then click OK then go to my "new:Calibre wireless connection" and then Connect"

This method worked for almost a year, now suddenly with recent update it's stopped working.

I tried automatic and manual with a ip and a port number, and it still doesn't work.
Reply 

#2  NiLuJe 01-13-2021, 01:03 PM
(This is unlikely to be Kobo-specific, we have a dedicated KOReader forum. Or, better, GitHub).

That said, I can't really tell you much without logs. (c.f., opening a new GitHub issue for all the gory details).

EDIT: Meh. There's not really much logging going on in the Calibre plugin on that front :/.

So, generic obvious questions: is the Calibre instance running on the same network as your device, and is that network sane or heavily filtered or something?

Try entering the actual IP/port manually instead of relying on auto discovery in KOReader, as some networks may make that unreliable.
Reply 

#3  pazos 01-13-2021, 03:46 PM
Quote jasius
I go to Calibre and select "Start wireless device connection" leave everything blank and then click OK then go to my "new:Calibre wireless connection" and then Connect"
The "new" part sounds fishy. The menu sorter adds "new" to menu elements that don't belong to any known category. Unless you manually edited your reader or filemanager menu entries time ago please check there's a single plugin called "calibre.koplugin" in /mnt/onboard/.adds/koreader/plugins. The old one was called "calibre-companion.koplugin" or something like that.

About network topology: ip/port works always (as long as you can ping the ip of the calibre server from your kobo). Auto-discovery relies on your router, as it needs to broadcast the connection attempt to all the devices on your network.

Auto-discovery can be flaky if you use some sort of wifi extender, different subnets or certain firewall rules.
Reply 

#4  jasius 01-15-2021, 03:11 AM
Quote pazos
The "new" part sounds fishy. The menu sorter adds "new" to menu elements that don't belong to any known category. Unless you manually edited your reader or filemanager menu entries time ago please check there's a single plugin called "calibre.koplugin" in /mnt/onboard/.adds/koreader/plugins. The old one was called "calibre-companion.koplugin" or something like that.

About network topology: ip/port works always (as long as you can ping the ip of the calibre server from your kobo). Auto-discovery relies on your router, as it needs to broadcast the connection attempt to all the devices on your network.

Auto-discovery can be flaky if you use some sort of wifi extender, different subnets or certain firewall rules.
I've never manually edited my anything on the KO Reader, I just keep it up to date all the time.

I have recently added a wifi extender, so I tried to connect to my main router wirelessly and that didn't resolve the issue.

I have both

plugins\calibre.koplugin
contains: (all .lua)
_meta
extensions
main
metadata
search
wireless

plugins\calibrecompanion.koplugin
contains: (all .lua)
_meta
main


I appreciate your help, I hope we can get to the bottom of this one.

As for my firewalls, all are pretty lax, but I'm asking which ports I need to open in case adding them manually will work.

As I stated, I've given my wireless an IP and tried to manually enter said IP in my kobo reader and that hasn't worked.
Reply 

#5  pazos 01-15-2021, 06:31 AM
Ah, that explains the "new" in the name. You can remove "plugins\calibrecompanion.koplugin" if you wish. I will mark is as obsolete, to disable it from menus even when it is there.

About the network: port forwarding is something you do between your public IP and some IP behind the NAT. Is not applicable here.

Even with a wifi extender you should be able to ping the computer that runs calibre from everywhere in your local network, including your kobo.

You can test if you're able to ping from your kobo using the terminal plugin and typing
Code
ping -c1 ip_of_calibre
If you're able to ping the computer then use manual address/port and set the address accordly. Leave the port as default (9090) IIRC.

If you're not able to ping the computer from your Kobo the calibre plugin won't work.
Reply 

#6  jasius 01-18-2021, 01:44 AM
Quote pazos
Ah, that explains the "new" in the name. You can remove "plugins\calibrecompanion.koplugin" if you wish. I will mark is as obsolete, to disable it from menus even when it is there.

About the network: port forwarding is something you do between your public IP and some IP behind the NAT. Is not applicable here.

Even with a wifi extender you should be able to ping the computer that runs calibre from everywhere in your local network, including your kobo.

You can test if you're able to ping from your kobo using the terminal plugin and typing
Code
ping -c1 ip_of_calibre
If you're able to ping the computer then use manual address/port and set the address accordly. Leave the port as default (9090) IIRC.

If you're not able to ping the computer from your Kobo the calibre plugin won't work.
Thank you again for your help.

The Ping command came back with 13ms.

I tried MANUAL but it still won't connect to Calibre, if this never worked ever I'd just shrug it off as an oddball feature, but the fact that it did at one point work is what's odd to me.
Reply 

#7  pazos 01-18-2021, 09:04 AM
Quote jasius
Thank you again for your help.

The Ping command came back with 13ms.

I tried MANUAL but it still won't connect to Calibre, if this never worked ever I'd just shrug it off as an oddball feature, but the fact that it did at one point work is what's odd to me.
As I understand your report, it worked at one point with auto discovery, never with manual ip/port.

Please double check that you're pinging the IP of calibre and you setup both the ip and the port that calibre uses.

In the attachment you'll see my setup. Only one of the IPs is reachable from LAN. That's 192.168.8.254 in my case. It is also a static IP, but your computer might be using a dynamic ip provided by your router. So always check your setup matches the one that calibre reports
Sin nombre.png 
Reply 

#8  jasius 01-20-2021, 12:14 AM
Quote pazos
As I understand your report, it worked at one point with auto discovery, never with manual ip/port.

Please double check that you're pinging the IP of calibre and you setup both the ip and the port that calibre uses.

In the attachment you'll see my setup. Only one of the IPs is reachable from LAN. That's 192.168.8.254 in my case. It is also a static IP, but your computer might be using a dynamic ip provided by your router. So always check your setup matches the one that calibre reports

Thank you for the info.

I made sure that I was using the correct info with the PING and the Manual port, it still didn't work though.

I might have to chalk this one up to a loss, unless there's something I can post here on my ereader that might shed some light, if so just tell me exactly where to find it on there and I'll upload it.
Reply 

#9  NiLuJe 01-20-2021, 01:06 AM
Assuming you have shell access to your device (barring that, that should work in KOReader's Terminal plugin), you might want to check if netcat can actually reach Calibre from your device.

e.g., nc 192.168.1.42 9090

If Calibre is actually setup properly and reachable from your device, it should answer fairly rapidly with something like

Code
831[9, {"serverProtocolVersion": 1, "validExtensions": ["lrf", "rar", "zip", "rtf", "lit", "txt", "txtz", "text", "htm", "xhtm", "html", "htmlz", "xhtml", "pdf", "pdb", "updb", "pdr", "prc", "mobi", "azw", "doc", "epub", "fb2", "fbz", "djv", "djvu", "lrx", "cbr", "cbz", "cbc", "oebzip", "rb", "imp", "odt", "chm", "tpz", "azw1", "pml", "pmlz", "mbp", "tan", "snb", "xps", "oxps", "azw4", "book", "zbf", "pobi", "docx", "docm", "md", "textile", "markdown", "ibook", "ibooks", "iba", "azw3", "ps", "kepub", "kfx", "kpf"], "passwordChallenge": "", "currentLibraryName": "Calibre", "currentLibraryUUID": "6fc7c08a-4a8f-4833-8acd-f0a47d3aa201", "pubdateFormat": "MMM yyyy", "timestampFormat": "dd MMM yyyy", "lastModifiedFormat": "dd MMM yyyy", "calibre_version": [5, 9, 0], "canSupportUpdateBooks": true, "canSupportLpathChanges": true}]
The Calibre Wireless Device connection popup should be listing the actual IPs it's listening on, that should be pretty accurate on most systems.
The default port (9090) should also accurate, but might want to set it manually, just in case...

If nothing's answered (and/or the command actually fails and returns an error code), the problem lies outside of KOReader. And/or you have deeper network shenanigans at play.
Reply 

#10  jasius 01-22-2021, 01:35 AM
Sorry, should that reply you pasted there show up on my Ereader or somewhere on Calibre? I just see "EXECUTING" on my screen when I press the button to execute.

How long does it take?
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register