[QTMoko] Getting online
bneil at rochester.rr.com
Fri Mar 26 13:11:14 CET 2010
On Fri, 26 Mar 2010 10:03:16 +0100
nlis7 at bitte-wenden.de wrote:
> Hello dear folks,
> I'm struggling with getting online running v19.
> In the past (and on othre distros) safest way seemed to be
> Following the instructions at
> I set up on a Debian Sid host which identifies the device as usb0:
> # /etc/udev/rules.d/80-freerunner.rules
> KERNEL=="usb[0-9]*", DRIVERS=="cdc_ether", ACTION=="add",
> RUN+="/usr/local/sbin/freerunner-usbusb-add.sh %k"
> # /usr/local/sbin/freerunner-usbusb-add.sh
> busNum=$( printf %.2d $( expr match "$1" "usb\([0-9]*\)") )
> ip link set "$1" address de:8b:f4:79:0b:$busNum &> /dev/null
> iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
> echo 1 > /proc/sys/net/ipv4/ip_forward
> iptables -P FORWARD ACCEPT
> ) &
> exit 0
> On executing freerunner-usbusb-add.sh I get the following error msg:
> Cannot find device "de:8b:f4:79:0b:00"
> The accurate bus-id extracted from /var/log/messages is
> de:8b:f4:79:0b:b1 I also tried replacing the 2d in the third line of
> freerunner-usbusb-add.sh with b1, leaving the whole $busNum variable
> out and supplying the complete bus-id with $busNum attached, but
> always end up with the above error message. Any ideas? Sadly I don't
> really know what this script does exactly.
The script you're using is meant to be used in conjunction w/
network-manager the default for gnome in Ubuntu and possibly default on
debian. But it's not needed to get usb networking functioning. You can
use something like this as sudo or root:
ip addr add 192.168.0.200/24 dev usb0;iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24;sysctl -w net.ipv4.ip_forward=1
This essentially does the same thing as the script does. It creates an
IP address of 192.168.0.200 on the host for device usb0 and then using
iptables sets up masquerading (routes the device to your host machines
net connection) the last bit insures that traffic meant for your
freerunner gets forwarded to it.
There are a couple of caveats for the above to work. You should check
to be sure your current route doesn't conflict w/ the lan setup you're
on. That is to say if your lan already uses 192.168.0.x you'll need to
change the neo to use a different address or change the lan to use a
different address. The second is that you need to have iptables
installed and the proper kernel modules loaded.
Because you mention that other distros have worked for you in the past
then this is probably a given unless the host/lan configuration has
> Second attempt: WiFi
> When trying to ifup eth0 I get a bunch of the following errors:
> ioctl[SIOCSIWENCODEEXT]: Operation not supported
> udhcpc sends a few discoveries but exits with "lease failed".
> When reproducing this for this message it worked out of the sudden
> and I got an IP and a gateway address. I couldn't ping anything out
> there, ifdowned and ifup again and am back to the prior problem again.
Did you try pinging the gateway? If you can't ping the gateway then
something is very wrong, if you can't ping a known good url like
www.google.com then it's probably a bad dns server in /etc/resolv.conf
> I hope someone can make sense of any of the above, being able to get
> online for some additional packages, eg mplayer would be highly
> appreaciated and making this wonderful distribution amazing. (:
> Thanks a lot,
More information about the community