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 07-06-2016, 05:32 PM   #16
HerbD
Junior Member
HerbD began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2014
Device: Kobo Glo
First Step: Install WebPortal mod

As a first step I installed the WebPortal mod as suggested by frostschutz. The installation and access from the Kobo locally worked just fine, but I had a lot of trouble to configure the mod for access from a PC.
When trying to call the Webportal from a PC I always got a HTTP/403 (forbidden) error message. I searched around a little bit in the mod and soon found the httpd.conf file in the mnt\onboard\.addons\webportal\ to be the reason of the problem. In this file only localhost (127.0.0.0) is granted access, no access from a remote host is allowed
The snippet in the httpd.conf file:
# allow LAN (to access from PC - only enable in networks you trust)
#A:10.0.0.0/8
#A:172.16.0.0/12
#A:192.168.0.0/24
As you can see all A: sections are commented out, so even if you use one of those IP configs in your WLAN you will get the 403 error.
I first tried to change those settings directly on the Kobo by simply editing the files in the .addons/webportal directory, but this obviously would need a restart of the web portal.
My second try was to open the mod .tgz file with 7zip under windows (I don't have a linux machine at hand at the moment) and then reinstall it, but this seems to mess up the file permissions and with the modified .tgz file the mod did not work at all.
My third try was to edit the mod on my Mac. The tar tool is part of the system there and although I had to overcome some troubles here too (files and directories starting with a . are hidden on the Mac...) that finally worked.
The part of the httpd.conf file looks like that now:
# allow LAN (to access from PC - only enable in networks you trust)
#A:10.0.0.0/8
#A:172.16.0.0/12
A:192.168.1.0/24
Another point: I thought that I would have to enter the Kobo IP followed by /webportal (eg. http://192.168.1.19/webportal), but you have to omit the /webportal and simply use http://192.168.1.19
Ok, hopefully this description to configure the webportal mod is helpful for someone else.
My next step would be to build a cgi script that enables a page turn triggered from an external host. I neither have cgi nor linux event system knowledge, so this could be a tough one. Any suggestions or help appreciated.

Still a long way to go, but I'm quite optimistic to find a nice solution. But without the webportal of frostschutz the way would definitely be too long, so many thanks to him for his contributions and sharing his knowledge!
HerbD is offline   Reply With Quote
Old 07-06-2016, 06:19 PM   #17
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
You should be able to just edit the file and then power off / on the reader... not sure why you tried editing the tgz file instead.

I guess I should allow all IPs access by default, it's not like the various telnet/ftp mods are checking anything.

If you ever connect to public wifi your reader is vulnerable to anyone though, something to keep in mind.
frostschutz is offline   Reply With Quote
Advert
Old 07-10-2016, 10:21 AM   #18
HerbD
Junior Member
HerbD began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2014
Device: Kobo Glo
Quote:
Originally Posted by frostschutz View Post
You should be able to just edit the file and then power off / on the reader... not sure why you tried editing the tgz file instead.
That's exactly what I did on the first run, but the web portal did not work again after a power off / on. I assumed that it is because of the file permissions that change after editing and saving with my windows computer and that's the reason why I directly changed the .tgz file, first under windows with the same result as above and then with a mac, where I finally succeeded.

For the next step I would need to know how to trigger a page turn event. You seem to have solved this part in your try with the usb cable mod. Can you please tell me how this is done?
HerbD is offline   Reply With Quote
Old 07-10-2016, 12:46 PM   #19
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
You send events directly to /dev/input/...

If you don't know what to send you can grab it from there too, so you can record a specific touch and replay it any number of times. Not supposed to be done like this but it works.

Code:
# cat /dev/input/event1 > /tmp/record.input
touch the screen where you like it
kill the cat (ctrl-c)
# ls -l /tmp/record.input
will be a few hundred bytes...
to replay the recorded touch:
# cat /tmp/record.input > /dev/input/event1
frostschutz is offline   Reply With Quote
Old 07-12-2016, 01:05 PM   #20
HerbD
Junior Member
HerbD began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2014
Device: Kobo Glo
Thumbs up

Tried this out yesterday, works perfectly! Thanks a lot!

The next steps:
I see 2 options now:
  • Building a Wifi client, probably based on an ESP8266 Wifi module.
    [+] cableless
    [-] would need to disable Wifi suspension on the Kobo. Haven't got any idea yet how this is done.
    [-] probably a battery drain
  • Building an USB client
    [+] no WIFI needed, no battery drain
    [-] cable
    [-] still have to find out how to enable USB-network support on the new 3.19.5761 firmware release

I will not have that much time in the near future, so some time to contemplate..
Suggestions and ideas welcome!
HerbD is offline   Reply With Quote
Advert
Old 09-26-2016, 11:08 AM   #21
jscris
Addict
jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.
 
Posts: 393
Karma: 123456
Join Date: Feb 2009
Location: Central US
Device: k1 - KAO2, ipads, h2o, KA1, inkBOOK, T80s, Mars, Nova Pro
KindleLazy for jailbroken kindles: https://www.mobileread.com/forums/sho...d.php?t=278776

We need one for Kobo.
jscris is offline   Reply With Quote
Old 09-26-2016, 12:06 PM   #22
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Kindle has out of the box support for USB gadgets. They sell this audio adapter that is essentially a sound card you hook up to the USB port and the Kindle powers it and everything.

I'm not sure if Kobo's hardware can do the same.
frostschutz is offline   Reply With Quote
Old 09-26-2016, 12:17 PM   #23
jscris
Addict
jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.
 
Posts: 393
Karma: 123456
Join Date: Feb 2009
Location: Central US
Device: k1 - KAO2, ipads, h2o, KA1, inkBOOK, T80s, Mars, Nova Pro
Quote:
Originally Posted by frostschutz View Post
Kindle has out of the box support for USB gadgets. They sell this audio adapter that is essentially a sound card you hook up to the USB port and the Kindle powers it and everything.

I'm not sure if Kobo's hardware can do the same.
I was pretty sure there would be a reason it probably wouldn't work. Thanks.
jscris is offline   Reply With Quote
Old 09-26-2016, 01:06 PM   #24
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Quote:
Originally Posted by jscris View Post
I was pretty sure there would be a reason it probably wouldn't work. Thanks.
Unless someone finds a driver that magically enables USB OTG with power. Or you're willing to put a powered hub in between.

I'm not a hardware electronics person, I simply have no clue whatsoever whether the hardware could be coerced to support such a nice looking "usb keyboard" presenter device. All I know is that it's not plug & play at least not for my H2O.

So you'll have to make do with a charger that you flip on/off for a simple pageflip (as shown in the video in the first post) or find a way to make wifi always-on and use your smartphone to control it (that and the fact I currently lack the time/motivation/incentive to turn this into a ready to use mod).

Last edited by frostschutz; 09-26-2016 at 01:23 PM.
frostschutz is offline   Reply With Quote
Old 09-26-2016, 05:49 PM   #25
rtiangha
Evangelist
rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.
 
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
Does Kobo publish their kernel sources? If so, it might be possible to compile a kernel with OTG support, and potentially other driver support like wired or wireless presenter remotes (or even a two-button USB mouse; that could work in a pinch).
rtiangha is offline   Reply With Quote
Old 11-22-2016, 01:49 AM   #26
lineager
Member
lineager has learned how to buy an e-book online
 
lineager's Avatar
 
Posts: 14
Karma: 92
Join Date: Aug 2008
Device: SONY PRS-505, Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by frostschutz View Post
Unless someone finds a driver that magically enables USB OTG with power. Or you're willing to put a powered hub in between.
Is it useful?
Kobo Developer's Corner -> [WIP] USB Host Mode
https://www.mobileread.com/forums/sho...d.php?t=225551
lineager is offline   Reply With Quote
Old 01-10-2017, 02:27 PM   #27
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Quote:
Originally Posted by frostschutz View Post
It could also be done through WiFi, possibly using the GoPro remote controller so you'd have a hand-held, wireless device. It's a bit too expensive to just buy it on a lark. Also, it has a short battery life and keeping WiFi always on drains the Kobo rather quickly, too.
Reviving this vaporware thread for no reason at all other than that I got myself a new toy. Bought a Wemos D1 mini + button shield. Cost me 12€ but if you order from China it's like $5 + shipping. This is a tiny board with Wifi and, after some soldering, a single button added on top. You click the button and the Kobo flips to the next page.

It still needs a power supply... there is a battery shield available for this board but it'd have doubled the cost for me (plus you'd have to buy a battery that fits) so instead I just used a portable charger. Turns the whole thing into a kind of nunchuck wireless page turning controller.

Downsides: huge battery drain on the kobo due to always-on wifi, wemos needs programming (so it knows to fire off a network packet when the button is pressed), everything is hardcoded (wifi ssid, password, kobo IP, ...) so it only works at home.

These can be solved [wemos could host its own wifi network and kobo just connects to that so it'd work everywhere, in return you'd lose internet connectivity] but ...

I'm lazy. Maybe next year.
Attached Thumbnails
Click image for larger version

Name:	nunchuck-remote.jpg
Views:	408
Size:	154.3 KB
ID:	154079  
frostschutz is offline   Reply With Quote
Old 01-10-2017, 03:01 PM   #28
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
How did you do the page turning over wifi? Is there a "command" for that, or you just "replayed" the previously recorded tap on the screen?
kido.resuri is offline   Reply With Quote
Old 01-10-2017, 03:32 PM   #29
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
I just replay recorded taps, described a few posts further up.
frostschutz is offline   Reply With Quote
Old 01-10-2017, 03:43 PM   #30
jscris
Addict
jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.jscris is an accomplished Snipe hunter.
 
Posts: 393
Karma: 123456
Join Date: Feb 2009
Location: Central US
Device: k1 - KAO2, ipads, h2o, KA1, inkBOOK, T80s, Mars, Nova Pro
KindleLazy is a battery hog, too. This is interesting. I would love to have the larger screen of the KA1 combined with the remote.
jscris is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page turning remote / App wanted jskvbinmv Kindle Developer's Corner 16 09-11-2014 12:35 PM
Page turning on PW neonbible Amazon Kindle 7 10-21-2012 11:37 AM
PRS-T1 PRS-T1 - Changing page margins prevents 'touch' page turning Berzelius Sony Reader 2 08-24-2012 04:02 AM
Automatic page turn / remote Working Prototype gregcd Sony Reader 5 09-14-2009 07:38 PM
Hanlin v3 Page Turning Button not always Turning the Page Jakodai HanLin eBook 16 01-21-2009 04:44 AM


All times are GMT -4. The time now is 06:04 AM.


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