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

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-12-2013, 11: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: 85
Karma: 2975
Join Date: Jan 2012
Location: Germany
Device: Kobo Touch
Automatic USB networking

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, 69 views)

Last edited by Aydan; 10-14-2013 at 03:58 PM.
Aydan is offline   Reply With Quote
Old 10-12-2013, 01: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: 567
Karma: 2519360
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, 02: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: 75
Karma: 165846
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 02:38 PM.
met67 is offline   Reply With Quote
Old 10-12-2013, 02: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: 85
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, 02: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: 75
Karma: 165846
Join Date: Jan 2012
Device: Nook Touch
An AuraHD with latest firmware.
met67 is offline   Reply With Quote
Old 10-12-2013, 02: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: 85
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, 05: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: 75
Karma: 165846
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, 05: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: 85
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, 04: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: 75
Karma: 165846
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 05:35 AM.
met67 is offline   Reply With Quote
Old 10-13-2013, 06: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: 85
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, 06: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: 75
Karma: 165846
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, 07: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: 85
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 09:03 AM. Reason: typo
Aydan is offline   Reply With Quote
Old 10-13-2013, 10: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: 75
Karma: 165846
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, 12:51 PM   #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: 85
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 12:54 PM.
Aydan is offline   Reply With Quote
Old 10-13-2013, 01: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: 75
Karma: 165846
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:38 AM
DX(G) Internet over USB networking fry@pocketbook Kindle Developer's Corner 19 05-28-2013 11:31 PM
Setup USB Networking K3 nathansuchy Kindle Developer's Corner 3 11-14-2012 04:37 PM
USB Networking on Mac OS? DairyKnight Kindle Developer's Corner 19 07-02-2012 05:19 PM
Firmware Update USB networking for 2.5? dd_engi Amazon Kindle 9 05-09-2010 07:45 AM


All times are GMT -4. The time now is 01:24 AM.


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