View Single Post
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, 298 views)

Last edited by Aydan; 06-09-2015 at 02:45 AM.
Aydan is offline   Reply With Quote