HOWTO Set up USB networking FC4
This is rewrite of the "HOWTO :Set up USB networking" document special for Fedora Core 4 distribution
HOWTO: Set up USB networking with Fedora Core 4
Introduction
This document describes how you can set up USB networking between your host machine with Fedora Core 4 and your device. Following this document you can easily transfer data between these two entities and log on as root to the device.
FIXME: To perform the steps listed below you must be root on the device. This entry does not explain how to do that, may be HowDoiBecomeRoot can help here.
Setting up your environment and device
You need to take these steps:
1 .#1 Disconnect the device from the USB connection 1 .#2 Make sure that the PC's kernel has usbnet Support. You can locate this information by looking at the config* files in your grub /boot partition.
# # USB Network Adapters # ... CONFIG_USB_USBNET=m
1 .#3 The Linux hotplug and coldplug mechanism has gone through many changes. The location of the files involved with this step's change have move around.
In Fedora Core 4 you need to add USB networking information to /etc/hotplug/net.agent
file.
In Fedora Core 5 you need to add USB networking information to /etc/sysconfig/network-scripts/net.hotplug
file. udev handles all the hotplug operations so a udev rule file /etc/udev/rules.d/60-net.rules
points to the net.hotplug file.
In Fedora Core 6 test 2, it looks like things have stablized. Use the same files as Fedora Core 5.
Find following strings in either the net.agent or the net.hotplug files depending on the Fedora Core version that you are using as noted above:
case $INTERFACE in # interfaces that are registered after being "up" (?)
And add the information below:
usb0) ifconfig usb0 192.168.2.14 netmask 255.255.255.0 route add 192.168.2.15 usb0 iptables -I INPUT 1 -s 192.168.2.15 -j ACCEPT ;;;
1 .#4 Check if module g_ether is loaded on the device. In case it is not loaded, check if it is included in the modules directory of your shipped version of Nokia 770 and load it, so you will not need to flash a development root filesystem really.
Execute the following command on the device:
lsmod | grep g_ether
If output is empty then You need to load g_ether.ko:
insmod /mnt/initfs/lib/modules/`uname -r`/g_ether.ko ifconfig usb0 192.168.2.15 netmask 255.255.255.255 route add -host 192.168.2.14 usb0
1 .#5 Connect device to usb
Testing the connection
To test that the USB connection between your host and device works you can follow these simple steps.
2 . Attach the USB cable to the device 2 . The device should now be connected. You can check this with ifconfig, where you should see the device "usb0" in the list 2 . Now you can try to ping the device over the network with the address 192.168.2.15 2 . If the ping answers, log into the device as root. The root password is rootme
ssh root@192.168.2.15
Setting the device back into mass-storage-mode
unload the g_ether module:
rmmod g_ether
and replug the USB cable.