01-11-2013, 07:23 AM | #1 |
Enthusiast
Posts: 40
Karma: 8604
Join Date: Dec 2012
Location: Germany
Device: Kobo Touch
|
KT Wlan connection recognition using shttpd
Hi everyone,
I made some spare time to fix a little something I wanted to do for a long time. I love my KT - especially the fact that it is wifi capable. I use it in the university to download lecture notes. What really annoyed me was the fact that the KT was so keen on "phoning home" to kobo and google when it get's a connection. That was easily fixed by modifying /etc/hosts. What I had not found in the web so far was the fact that the KT verifies that it's wifi connection is running by loading "www.apple.com/library/test/success.html" every time the wifi is started. I really do not see why I should inform apple about where and when I start my kobo! Unfortunately fixing this is not as easy as just blocking it. If the KT cannot load it's test page, it says there was a connection error and wants me to choose a new access point. The idea is to server the success.html page from an KT internal webserver, thus enabling it to always find the Wifi up and running I did this by compiling shttpd (http://garr.dl.sourceforge.net/proje...pd-1.42.tar.gz) for my ARMv7 KT. Mongoose and thttpd would also do, but they can't be started using inetd. Thumbs up for mongoose by the way - I use it in a couple of other projects and am really happy with it. I suppose you already might have the ftp and telnetd running here. If not, there are tons of ressource about how to do that on the web and in this forum. Now, after compiling shttpd I placed it in /mnt/onboard/.local/bin (it's where all my binaries end up). Compiling it requires Sourcery G++ Lite 2010q1-202 for ARM GNU/Linux. But other than that, there where no real tweaks. Next, I modified /etc/inetd.conf as follows: Code:
21 stream tcp nowait root /bin/busybox ftpd -w -S /mnt/onboard 23 stream tcp nowait root /bin/busybox telnetd -i 80 stream tcp nowait root /mnt/onboard/.local/bin/shttpd shttpd -inetd 1 -root /mnt/onboard/.local/srv/www -ports 80 We now point apple to localhost in /etc/hosts: Code:
127.0.0.1 host localhost.localdomain localhost localhost localhost.localdomain 127.0.0.1 kobo.com www.kobo.com ecimages.kobobooks.com download.kobobooks.com 127.0.0.1 mobile.kobobooks.com services.kobobooks.com social.kobobooks.com 127.0.0.1 webstore2.kobobooks.com webstore1.kobobooks.com webstore.kobobooks.com 127.0.0.1 www.google-analytics.com 127.0.0.1 kobo.de www.kobo.de ecimages.kobobooks.de download.kobobooks.de 127.0.0.1 mobile.kobobooks.de services.kobobooks.de social.kobobooks.de 127.0.0.1 webstore2.kobobooks.de webstore1.kobobooks.de webstore.kobobooks.de 127.0.0.1 www.google-analytics.de 127.0.0.1 www.apple.com www.apple.de apple.com apple.de Code:
# Create lo device ifconfig lo 127.0.0.1 By the way this gave me a nice idea. Since the KT plugin structure is no longer maintained, it makes it kind of hard to start you own programs while nickel holds control over the KT. Since mongoose, shttpd and thttpd have cgi support, one could in theory create a local webpage using php (after getting it compiled...) which kills nickel on demand and starts the application of your choice. In my eyes this is easier then compiling QT embedded plugins... Might give that a try some day. |
01-11-2013, 10:20 AM | #2 |
Enthusiast
Posts: 40
Karma: 8604
Join Date: Dec 2012
Location: Germany
Device: Kobo Touch
|
Addendum: I made some more spare time (and am feeling really bad about it) to try the php idea. I needed to crosscompile libz and libxml2 for this point, but it is obviously running ^^
I will work on getting sqlite support on the KT. I believe that in connection with the Kobo_Reader.sqlite database that manages the Kobo's UI Functions this might open up some neet possibilities (ie. reclassifying stuff as newspapers without a sync/computer). If anyone but me is interested in this stuff, I can of course make the crosscompiled binaries/libs for zlib, libxml2, php and shttpd available. |
Advert | |
|
01-11-2013, 05:04 PM | #3 | |
Member
Posts: 10
Karma: 28
Join Date: Aug 2010
Device: kobo
|
Quote:
Having details of the KT http client blithely handed off to Apple is bad enough, but having on occasion to re-enter the WPA2 passphrase again is highly annoying. Is there no way to redirect the request from www.apple.com/library/test/success.html to another http server, for example a local network server, to return a "success.html"? That would avoid the need to hack the KT with an http webserver. |
|
01-11-2013, 07:51 PM | #4 |
Enthusiast
Posts: 40
Karma: 8604
Join Date: Dec 2012
Location: Germany
Device: Kobo Touch
|
I have configured my local dns server to redirect the request to my own web server (http://prospero.homelinux.net/library/test/success.html), but it requires you to have a dns and web server running. Which in my eyes might be more demanding than hacking the KT.
Plus it only works in you local own network... |
01-12-2013, 03:19 PM | #5 |
Member
Posts: 10
Karma: 28
Join Date: Aug 2010
Device: kobo
|
For the KT, I am only interested in the local network, on which a web server is already running (among other things, it serves up sideloaded epubs to the KT).
It sounds as though the solution to redirecting www.apple.com/library/test/success.html (and anything else to be bypassed) is to add a DNS server to the local network. By the by, I wonder how many of the problems described at the current forum topic Kobo Touch Wi-Fi connection issues are related to the response required from www.apple.com/library/test/success.html. |
Advert | |
|
01-13-2013, 08:01 AM | #6 | |
Enthusiast
Posts: 40
Karma: 8604
Join Date: Dec 2012
Location: Germany
Device: Kobo Touch
|
Hi bob451,
Quote:
Here's how:
|
|
05-12-2015, 02:59 PM | #7 |
Connoisseur
Posts: 68
Karma: 10
Join Date: Nov 2014
Location: Orcas, WA
Device: Kindle PW & Kobo H2O
|
FYI, my Kobo H2O is not looking for the Apple URL.
It wants to find: http://www.msftncsi.com/ncsi.txt |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PB 903 WLAN | Kyriako | PocketBook | 17 | 12-25-2012 04:19 AM |
How do I download my Kindle books on to WLAN-only Kindle - have no access to WLAN | rglk | Amazon Kindle | 10 | 11-05-2011 03:10 PM |
Wireless internet connection frustrating IDS connection | Socrates | iRex | 8 | 10-21-2009 12:46 PM |
Please try this procedure for recognition | Robertb | Astak EZReader | 5 | 09-22-2009 09:58 AM |
2.9.5 killed my WLAN | chrisv5 | iRex | 10 | 04-27-2007 07:33 AM |