Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2019, 02:57 AM   #1
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Cannot open Calibre OPDS server if login is required

I just installed KOReader on a PW3 and PW4:
koreader-kindlepw2-arm-kindlepw2-linux-gnueabi-v2019.01.1-21-g6ec3143_2019-01-18.zip

I'm trying to access the Calibre OPDS content server on my LAN. I get the following error message if I have a username/password set.

Quote:
Cannot get catalog. Server code response 400
Marvin 3 for iOS can access the password protected /opds feed just fine. The Kindle's experimental browser can access the password protected /mobile site as well.

When I disabled Require username and password to access the content server in Calibre settings, the Calibre OPDS feed started working in KOReader. However, I access the content server using other devices and I need to enable this setting in order to be able to edit metadata via my tablet's web browser.

Help, please? Thanks!
ilovejedd is offline   Reply With Quote
Old 01-20-2019, 05:38 AM   #2
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Authentication seems to have been implemented in https://github.com/koreader/koreader/pull/1637

400 means bad request.

Authentication required would be indicated by the server with 401.



You could try adding a section to your settings file with something like the following. Careful, create a backup first!
Code:
    authentications["hostname-or-ip"] = {
        username = "enter-username-here",
        password = "enter-password-here",
    }
If that works then the server is broken.
Frenzie is offline   Reply With Quote
Old 01-20-2019, 11:54 AM   #3
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
I think this is the latest code change for OPDS authentication:
https://github.com/koreader/koreader/pull/4248

Again, it's only KOReader where the password-protected Calibre content server didn't work. Login to Calibre content server works fine in all the following scenarios:

Below is an excerpt from my settings.reader.lua file. The password is just stored as plain text.

Code:
    ["opds_servers"] = {
        [1] = {
            ["title"] = "Project Gutenberg",
            ["url"] = "http://m.gutenberg.org/ebooks.opds/?format=opds"
        },
        [2] = {
            ["title"] = "Feedbooks",
            ["url"] = "http://www.feedbooks.com/publicdomain/catalog.atom"
        },
        [3] = {
            ["title"] = "ManyBooks",
            ["url"] = "http://manybooks.net/opds/index.php"
        },
        [4] = {
            ["title"] = "Internet Archive",
            ["url"] = "https://bookserver.archive.org/"
        },
        [5] = {
            ["title"] = "Calibre",
            ["url"] = "http://192.168.1.100:8080/opds",
            ["username"] = "myusername",
            ["password"] = "mypassword"
        }
    },
    ["download_dir"] = "/mnt/us/epub/_downloads",
    ["calibre_opds"] = {
        ["host"] = "192.168.1.100",
        ["username"] = "myusername",
        ["password"] = "mypassword",
        ["port"] = "8080"
    },
ilovejedd is offline   Reply With Quote
Old 01-21-2019, 10:12 AM   #4
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by ilovejedd View Post
Again, it's only KOReader where the password-protected Calibre content server didn't work.
Not entirely:

Code:
curl --user bla:bla -I http://192.168.1.190:8090/opds/navcatalog/4e7075626c6973686572?library_id=Calibre_Library
HTTP/1.1 400 Bad Request
Content-Length: 33
Content-Type: text/plain; charset=UTF-8
Date: Mon, 21 Jan 2019 14:19:29 GMT
It does work with
Code:
curl --digest --user bla:bla
.

So the issue is that digest authentication is either not supported or not implemented. Unfortunately it looks like it's not supported, see here.

As a workaround you can set the calibre server authentication type to basic under advanced "sharing over the net" settings, which should be fine if you're just using it on your LAN. (And also fine if you're using it encrypted with TLS.)

It's not as simple as just adding an md5 hash. There's also a special dual requests protocol.

It's not all bad news though: a quick search shows https://github.com/catwell/lua-http-digest which might make for a reasonably swift implementation if someone's willing to put in the leg work.
Frenzie is offline   Reply With Quote
Old 01-23-2019, 01:48 AM   #5
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by Frenzie View Post
So the issue is that digest authentication is either not supported or not implemented. Unfortunately it looks like it's not supported, see here.

As a workaround you can set the calibre server authentication type to basic under advanced "sharing over the net" settings, which should be fine if you're just using it on your LAN. (And also fine if you're using it encrypted with TLS.)
very much for the info. I kinda guessed that Calibre was using an authentication protocol that wasn't implemented in KOReader. I thought that might have been an easy fix since it's supported natively by the firmware but I guess not.

Thanks for the Calibre tip, too. Didn't see that option. I actually checked the advanced server settings prior to posting but I guess I got cross eyed and missed it. Switched the server to basic and Calibre OPDS login works on KOReader now.
ilovejedd is offline   Reply With Quote
Old 01-23-2019, 02:43 AM   #6
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
P.S.
Gotta say though, now that I've figured out how to add my Dropbox account to KOReader, the OPDS probably won't get used much.

On the plus side, I'm getting more use out of my Kindle now. Transferring EPUB files to the Kindle via Dropbox is super easy and all I need is my smartphone. No need to go through desktop+Calibre to convert to MOBI/KF8. I can just read the EPUB immediately.

KOReader Rocks!
ilovejedd is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
COPS : Calibre OPDS PHP Server vlad59 Related Tools 1911 03-04-2024 06:39 AM
Calibre OPDS server with windows apps? nickdma Related Tools 10 03-03-2024 02:53 PM
BicBucStriim 1.0, HTML and OPDS server for Calibre libraries textmulch Related Tools 7 04-20-2013 10:46 PM
BicBucStriim 0.9, HTML and OPDS server for Calibre libraries textmulch Related Tools 13 11-16-2012 05:10 AM
calibre-server OPDS catalog - manual move to web server HaakonME Related Tools 5 09-21-2012 03:11 AM


All times are GMT -4. The time now is 05:14 AM.


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