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 10-12-2013, 10:19 AM   #1
Aydan
Connoisseur
Aydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with others
 
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
Automatic USB networking

WARNING: Not compatible with Recent Firmwares!!!!!!!!

Hello everyone,

after some trial and error I put together a set of scripts for automatic USB networking.

What is does:
It installs a udev rule that starts up usb networking, a dhcp-daemon (included in busybox) and dropbear (from sergeys KoboLauncher) when you connect USB to a PC.
The DHCP seems to be a bit flaky on Win7, so you might have to "repair" you connection if it doesn't give you an IP (range is 192.168.142.x)
If you dismiss the connection dialog, USBnet stays connected.
If you decide to go the mass storage way, it will shut off the usb networking and load the usb mass storage, just like normal.
For this to work I had to patch the "usb"-script in /usr/local/Kobo/udev.
This is the only really critical step in the automatic setup process, because it might break usb mass storage functionality if the patch goes wrong.
Remedy #1 is to rename/remove /etc/udev/rules.d/usbnet.rules which basically disables the whole shebang.
Remedy #2 is to ssh into the kobo and fix /usr/local/Kobo/udev/usb
Remedy #3 is to do a factory reset
If you disconnect the USB it will unload the network modules and stop dropbear and the dhcp-daemon so there shouldn't be any performance impact once disconnected.
For SFTP access the binary is located in /usr/sbin

To install, unpack KoboRoot.tgz from autousbnet.tar and copy it to .kobo as usual.

Download from dropbox

In theory this should work for all recent kobos (Mini/Touch (new and old)/Glo/Aura/AuraHD) but I could only test it with my KT N905B.

As Always:
This could potentially brick your device. If you're not ready to do a factory reset, don't use this!!!

Confirmed working on:
Touch (N905B)
AuraHD
Glo

Regards
Aydan

PS: I forgot to mention that the IP of the Kobo is 192.168.142.1
Edit: Added dropbox folder for downloads
Edit: v2 with alternate busybox binary for firmwares without native udhcpd support
Attached Files
File Type: tar autousbnet_v2.tar (648.5 KB, 251 views)

Last edited by Aydan; 06-09-2015 at 02:45 AM.
Aydan is offline   Reply With Quote
Old 10-12-2013, 12:40 PM   #2
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Thanks!

I'll try it on Monday.
sergeyvl12 is offline   Reply With Quote
Old 10-12-2013, 01:32 PM   #3
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 78
Karma: 165868
Join Date: Jan 2012
Device: Nook Touch
Quote:
Originally Posted by Aydan View Post
...
The DHCP seems to be a bit flaky on Win7, so you might have to "repair" you connection if it doesn't give you an IP (range is 192.168.142.x)
WOW!

Thanks a lot, this is really usefull. I had to use this to install the driver under Windows 7 and had to force an IP on the interface, then it worked pretty well.

Thanks again.

P.S. The initial connection is a bit slow, so don't give up too soon :-)

EDIT:
Looks like my busybox doesn't have udhcpd applet, just udhcpc...
I'am using an AuraHD with the latest firmware (2.8.1 15/07/2013)

Last edited by met67; 10-12-2013 at 01:38 PM.
met67 is offline   Reply With Quote
Old 10-12-2013, 01:35 PM   #4
Aydan
Connoisseur
Aydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with others
 
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
Quote:
Originally Posted by met67 View Post
WOW!

Thanks a lot, this is really usefull. I had to use this to install the driver under Windows 7 and had to force an IP on the interface, then it worked pretty well.

Thanks again.

P.S. The initial connection is a bit slow, so don't give up too soon :-)
What device have you installed in on?
Aydan is offline   Reply With Quote
Old 10-12-2013, 01:53 PM   #5
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 78
Karma: 165868
Join Date: Jan 2012
Device: Nook Touch
An AuraHD with latest firmware.
met67 is offline   Reply With Quote
Old 10-12-2013, 01:57 PM   #6
Aydan
Connoisseur
Aydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with others
 
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
Quote:
Originally Posted by met67 View Post
WOW!
Looks like my busybox doesn't have udhcpd applet, just udhcpc...
I'am using an AuraHD with the latest firmware (2.8.1 15/07/2013)
That's too bad. Looks like they stripped down the busybox for newer firmwares.
Aydan is offline   Reply With Quote
Old 10-12-2013, 04:54 PM   #7
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 78
Karma: 165868
Join Date: Jan 2012
Device: Nook Touch
Quote:
Originally Posted by Aydan View Post
That's too bad. Looks like they stripped down the busybox for newer firmwares.
It still is a pretty nice and useful hack, I don't mind having to set the IP...
met67 is offline   Reply With Quote
Old 10-12-2013, 04:58 PM   #8
Aydan
Connoisseur
Aydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with others
 
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
It might be possible to get around the dchp problem by replacing the busybox. But for that I'd need to know the version and ABI (armhf or armel) and I'd have to make it device or version specific.
Aydan is offline   Reply With Quote
Old 10-13-2013, 03:09 AM   #9
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 78
Karma: 165868
Join Date: Jan 2012
Device: Nook Touch
I'm thinking of replacing the link from udhcpd to busybox with a copy of busybox from an old firmware; which version of firmware do you use?

EDIT:
I managed to make it work by using the busybox that came with fw 2.5.1.
I copied it in /bin as busyboxold, than made a link from udhcpd to busyboxold and it worked fine!

Last edited by met67; 10-13-2013 at 04:35 AM.
met67 is offline   Reply With Quote
Old 10-13-2013, 05:01 AM   #10
Aydan
Connoisseur
Aydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with others
 
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
I'm using FW2.5.2.
could you give me the output of
Code:
busybox | grep udhcpd
and
Code:
busybox | grep -c udhcpd
for your firmware? The first should come back empty the other with "0".
If that is so I can make use of the old binary conditional.

Regards
Aydan
Aydan is offline   Reply With Quote
Old 10-13-2013, 05:40 AM   #11
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 78
Karma: 165868
Join Date: Jan 2012
Device: Nook Touch
Quote:
Originally Posted by Aydan View Post
I'm using FW2.5.2.
could you give me the output of
Code:
busybox | grep udhcpd
and
Code:
busybox | grep -c udhcpd
for your firmware? The first should come back empty the other with "0".
If that is so I can make use of the old binary conditional.

Regards
Aydan
Yes, both commands return the expected results.
AW I don't think it is worth the effort using a conditional: udhcpd is gone in 2.6.1, and in 2.8.1 and probably will never be back in future firmwares, and by using an old binary with a known working udhcpd you don't risk any problem with other functionalities and still have to waste space for the old binary.
met67 is offline   Reply With Quote
Old 10-13-2013, 06:46 AM   #12
Aydan
Connoisseur
Aydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with others
 
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
I went ahead and added the alternate binary to version 2. the binary will be removed if the original busybox supports udhcpd

Last edited by Aydan; 10-13-2013 at 08:03 AM. Reason: typo
Aydan is offline   Reply With Quote
Old 10-13-2013, 09:38 AM   #13
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 78
Karma: 165868
Join Date: Jan 2012
Device: Nook Touch
Quote:
Originally Posted by Aydan View Post
I went ahead and added the alternate binary to version 2. the binary will be removed if the original busybox supports udhcpd
Removing the old binary could lead to troubles when upgrading...
met67 is offline   Reply With Quote
Old 10-13-2013, 11:51 AM   #14
Aydan
Connoisseur
Aydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with othersAydan plays well with others
 
Posts: 87
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
Quote:
Originally Posted by met67 View Post
Removing the old binary could lead to troubles when upgrading...
I'm removing the binary with udhcpd, not the one that came with the firmware.
In fact I'm not touching anything that came with the firmware.
So there shouldn't be any problems with upgrading.
If you mean that an upgrade might remove udhcpd from the busybox that comes with the firmware, then you'll have to reinstall the autousbnet hack afterwards. I just want to keep the memory usage as little as possible, and running two busybox binaries when one would be enough just uses memory without need.

Last edited by Aydan; 10-13-2013 at 11:54 AM.
Aydan is offline   Reply With Quote
Old 10-13-2013, 12:16 PM   #15
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 78
Karma: 165868
Join Date: Jan 2012
Device: Nook Touch
Quote:
Originally Posted by Aydan View Post
I just want to keep the memory usage as little as possible, and running two busybox binaries when one would be enough just uses memory without need.
Good point!
(And thanks for sharing your work, of course)
met67 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enable usb networking? wallacemckart Kindle Developer's Corner 15 11-01-2013 06:38 AM
Internet over USB networking fry@pocketbook Kindle Developer's Corner 19 05-28-2013 10:31 PM
Setup USB Networking K3 nathansuchy Kindle Developer's Corner 3 11-14-2012 03:37 PM
USB Networking on Mac OS? DairyKnight Kindle Developer's Corner 19 07-02-2012 04:19 PM
Firmware Update USB networking for 2.5? dd_engi Amazon Kindle 9 05-09-2010 06:45 AM


All times are GMT -4. The time now is 09:36 AM.


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