Documentation/Networking

OpenInkpot ships ready to allow TCP/IP connections over USB on most devices. Prior to communicating with the device, you'll need to set up the network interface in your computer.

The device IP is 192.168.111.1 by default. These instructions allow your computer to have a new USB network interface at 192.168.111.2.

Linux

Debian

Edit /etc/network/interfaces, add the following stanza:

allow-hotplug usb0

iface usb0 inet static
        address 192.168.111.2
        netmask 255.255.255.0

Ubuntu

The same as for Debian.

If it does not work for you due to  bug, then do not modify /etc/network/interfaces and just run manually the following command every time you connect the device:

ifconfig usb0 192.168.111.2 netmask 255.255.255.0 up

ALT Linux (etcnet)

Create the following files: /etc/net/ifaces/usb0/options

 TYPE=eth

/etc/net/ifaces/usb0/ipv4address

 192.168.111.2/24

Gentoo

Add the following stanza to /etc/conf.d/net:

 config_usb0=( "192.168.111.2 netmask 255.255.255.0" )

and do

# ln -s /etc/init.d/net.lo /etc/init.d/net.usb0

Connect

Connect USB cable to PC and device (in powered-on state).

N516: message box will pop up, asking how to use USB connection. Press Zoom key instead of 1 or 2.

Ubuntu: it's time to use ifconfig if /etc/network/interfaces does not work for you.

Linux Troubleshooting

You can see the device attached in dmesg after attaching (for V3) or pressing Zoom (for N516):

usb 4-1: new full speed USB device using uhci_hcd and address 7
usb 4-1: configuration #1 chosen from 2 choices
usb0: register 'cdc_ether' at usb-0000:00:1d.0-1, CDC Ethernet Device, f6:e4:0b:37:c6:b6
usb 4-1: New USB device found, idVendor=0525, idProduct=a4a2
usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-1: Product: RNDIS/Ethernet Gadget
usb 4-1: Manufacturer: Linux 2.6.25-v3-armel/s3c2410_udc

If dmesg print something like that:

usb 3-1: device descriptor read/64, error -71
usb 3-1: device descriptor read/64, error -71
usb 3-1: new full speed USB device using uhci_hcd and address 8
usb 3-1: device descriptor read/64, error -71
usb 3-1: device descriptor read/64, error -71
usb 3-1: new full speed USB device using uhci_hcd and address 9
usb 3-1: device not accepting address 9, error -71
usb 3-1: new full speed USB device using uhci_hcd and address 10
usb 3-1: device not accepting address 10, error -71
hub 3-0:1.0: unable to enumerate USB device on port 1 

Then something went wrong. In addition to the dmesg output, ifconfig will not show a new usbX device. This is known for certain multiple function usb connections. Try the following procedure:

  1. unplug the USB cable
  2. reload the usb-core module with the following command
    $ modprobe usbcore old_scheme_first=1
    
    (thanks to Frederik W. for his help)
  3. Replug your USB cable

Hopefully dmesg will show you now the correct device. If everything is correct, ifconfig will show a new usbX device on your system.

FreeBSD

  1. Load if_cdce.ko module with your OI-device disconnected:
    $ kldload if_cdce
    
  2. Connect OI-device to FreeBSD box using USB cable. You'll see something like this on your FreeBSD console:
    kernel: cdce0: <Linux 2.6.25-v3ext-armel/s3c2410_udc RNDIS/Ethernet Gadget, class 2/0, rev 2.00/2.12, addr 3> on uhub0
    kernel: cdce0: faking MAC address
    kernel: cdce0: WARNING: using obsoleted IFF_NEEDSGIANT flag
    kernel: cdce0: Ethernet address: 2a:db:25:87:07:00
    
  3. Configure IP interface:
    $ ifconfig cdce0 inet 192.168.111.2/24
    

Mac OS X

Attach the cable to the device.

N516: dialog box will appear on device asking to select connection type. Press Zoom button instead of 1 or 2.

A dialog will appear on computer screen about a new network device being added. Click "Open Network Preferences". Now, set the configuration to "Manually", and use 192.168.111.2 as IP-address and 255.255.255.0 as subnetmask.

Windows (< 7)

N516: usbnet does not work with Windows. Use another OS or install Linux in VirtualBox/VMWare.

Win7: Currently, Win7 requires using Windows Virtual PC running in Virtual XP mode. See addendum at the end of this section.

Preparations

Download RNDIS driver (actually .inf file activating one shipped with Windows):

Connection

Install driver

Connect device to PC using a cable. Windows will pop-up dialog asking for driver. Point to linux.inf you've downloaded. Let Windows install it.

Alternatively, right-click to linux.inf and select "Install".

Setup networking

If device is not connected, connect it to PC using a cable.

Select Start->Settings->Network Connections.

You should see your new network connection Icon. Double click on the new network connection and click on Properties In the TCP/IP section. Select the 'Use the following IP address' button and change the following parameters for it: IP address to 192.168.111.2, Subnet mask to 255.255.255.0.

You can also rename the connection to something more descriptive if you like. i.e. OpenInkpot.

Windows <7 Troubleshooting

V3: Windows sometimes is not very reliable in recognizing that the reader has been attached to the USB port, so you may have to connect and re-connect more than once sometimes. As soon as you have network connection icon in Network connections it is succeeded.

If OpenInkpot goes into panic mode (flashing red light on your ebook) immediately after connecting the USB cable to your PC, disconnect the USB cable, reset your ebook, terminate BCMWLTRY.EXE and connect the USB cable again. This program causes problems for the USB/Linux connection. You can even rename so it will not be started next time you reboot Windows.

Windows 7

Native

  1. Connect e-reader, wait for Windows to try and install it. It probably won't find suitable driver for RNDIS/Ethernet gadget device at this point yet.
  2. Go to Windows device manager, find RNDIS/Ethernet gadget device in "Other devices" folder, right-click it and select Properties.
  3. Click "Update driver", "Browse my computer for driver software", "Let me pick from list of device drivers", double click "Network adapters", select "Microsoft Corporation" manufacturer and "Remote NDIS Compatible device" driver.
  4. Click "Next" and let Windows install selected driver. If everything went well, "RNDIS/Ethernet gadget" device should now show up in "Network devices" folder working correctly.
  5. Now configure network and connection as per older Windows version instructions. Tested both PuTTy and WinSCP successfully with this setup.

Emulated XP

I have set up the Windows Virtual PC running in Virtual XP mode and from there have set up the ereader and WinSCP. Following are the directions on how to set it all up;

  1. Download the linux.inf file to your computer.
  2. You require the computer hardware and a version of Windows 7 that both support virtualization technology. The following link gives all the information regarding how to check if your computer can handle virtualization and if so, how to set it up.  http://www.microsoft.com/windows/virtual-pc/download.aspx
  3. Once Windows Virtual PC is set up, create a “Windows XP mode” shortcut on your desktop for future use.
  4. Double click on “Windows XP mode” shortcut to start the XP virtualization mode.
  5. Connect your ereader to your computer with the USB cable.
  6. At the top left of the XP mode window click on the USB drop down box and choose “RNDIS/Ethern

Attachments