[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zaurus-general
Subject:    [Zaurus-general] I can't network my zaurus properly :-(
From:       Jason King <pizza () netspace ! net ! au>
Date:       2003-06-19 2:02:16
[Download RAW message or body]

(sorry for the long post)

I've been plugging away at this for ages now, and for the life of
me I can't make my zaurus ping the outside world.

I followed the instructions on
http://www.ruault.com/Zaurus/ethernet-over-usb-howto.html , 
and got to the extent of being able to ping the ppp0 interface
on my desktop box , but can't ping any further than that (ie ping
my ISP)

My main machine is running debian unstable, 2.4.19 kernel with xfs 
and pre-empt patches , and the plain usbdnet that comes with the 
default kernel.

I have an adsl connection to my ISP , which is connected through
eth0 and ppp0 . eth1 is a NIC which my laptop connects to.  I can
reach the rest of the internet just fine through my laptop, It's 
just my zaurus that won't do this.

These are the modules I have

ipt_LOG                 3448   1 (autoclean)
ipt_state                568   1 (autoclean)
ipt_MASQUERADE          1496   0 (autoclean)
iptable_filter          1740   1 (autoclean)
iptable_nat            15384   0 (autoclean) [ipt_MASQUERADE]
ip_conntrack           16284   2 (autoclean) [ipt_state ipt_MASQUERADE
iptable_nat]
ip_tables              11960   7 [ipt_LOG ipt_state ipt_MASQUERADE
iptable_filter iptable_nat]
usbdnet                15196   1
usb-uhci               23948   0 (unused)
usbcore                63840   1 [printer usbdnet hid usbmouse usb-uhci]
usbmouse                2292   0 (unused)

if I unplug and then plug back in the zaurus , I get the following in 
/var/log/syslog

Jun 19 11:05:19 whitestar kernel: hub.c: USB new device connect on
bus1/2, assigned device number 30
Jun 19 11:05:19 whitestar kernel: hub.c: USB hub found
Jun 19 11:05:19 whitestar kernel: hub.c: 4 ports detected
Jun 19 11:05:19 whitestar kernel: hub.c: USB new device connect on
bus1/2/2, assigned device number 31
Jun 19 11:05:19 whitestar kernel: usbdnet: probe
Jun 19 11:05:19 whitestar kernel: probe: -> idVendor: 04dd idProduct:
8004 InterfaceClass 02 InterfaceSubclass: 06
Jun 19 11:05:19 whitestar kernel: idp_search[0]: idVendor: 049f
idProduct: ffff bDeviceClass 02 bInterfaceClass: 02 bInterfaceSubclass:
06
Jun 19 11:05:19 whitestar kernel: idp_search[0]: idVendor: 03f0
idProduct: 2101 bDeviceClass 02 bInterfaceClass: 02 bInterfaceSubclass:
06
Jun 19 11:05:19 whitestar kernel: idp_search[0]: idVendor: 04dd
idProduct: 8001 bDeviceClass 02 bInterfaceClass: 02 bInterfaceSubclass:
06
Jun 19 11:05:19 whitestar kernel: idp_search[0]: idVendor: 04dd
idProduct: 8002 bDeviceClass 02 bInterfaceClass: 02 bInterfaceSubclass:
06
Jun 19 11:05:19 whitestar kernel: idp_search[0]: idVendor: 04dd
idProduct: 8004 bDeviceClass 02 bInterfaceClass: 02 bInterfaceSubclass:
06
Jun 19 11:05:19 whitestar kernel: idp_search[0]: MATCH
Jun 19 11:05:19 whitestar kernel: interface_search[0:0:0]:
bInterfaceClass: 2:2 bNumEndpoints: 0:0
Jun 19 11:05:19 whitestar kernel: interface_search[0:0:0]: OK
Jun 19 11:05:19 whitestar kernel: interface_search[0:0:0]:
bInterfaceClass: 10:2 bNumEndpoints: 2:0
Jun 19 11:05:19 whitestar kernel: interface_search[0:1:0]:
bInterfaceClass: 10:10 bNumEndpoints: 2:0
Jun 19 11:05:19 whitestar kernel: interface_search[0:1:1]:
bInterfaceClass: 10:10 bNumEndpoints: 2:2
Jun 19 11:05:19 whitestar kernel: interface_search[0:1:1]: OK
Jun 19 11:05:19 whitestar kernel: probe[0]: CDC Device cdc_interface:
d4ab98c0 data_interface ca837dd8
Jun 19 11:05:19 whitestarkernel: usbdnet: CRC
Jun 19 11:05:19 whitestar kernel: probe[0:0]: endpoint bmAttributes: 02
address: 01
Jun 19 11:05:19 whitestar kernel: probe[0:0]: tx ep
Jun 19 11:05:19 whitestar kernel: probe[0:1]: endpoint bmAttributes: 02
address: 82
Jun 19 11:05:19 whitestar kernel: probe[0:1]: rx ep
Jun 19 11:05:19 whitestar kernel: probe[0]: FOUND MATCH data_interface:
ca837dd8
Jun 19 11:05:19 whitestar kernel: cdc_interface: d4ab98c0
mdlm_interface: 00000000 data_interface: ca837dd8 tx_ep: dab41a40 rx_ep:
dab41a54
Jun 19 11:05:19 whitestar kernel: probe[0]: setting configuration 1
Jun 19 11:05:19 whitestar kernel: probe[0]: claiming interface(s)
Jun 19 11:05:19 whitestar kernel: probe[0]: setting interface 1
alternate: 1
Jun 19 11:05:19 whitestar kernel: probe[0]: rx_size:  64 tx_size:  64
Jun 19 11:05:19 whitestar kernel: probe[0]: rx_ep  :  82 tx_ep  :   1
Jun 19 11:05:19 whitestar kernel: probe[0]: success v0.4b
Jun 19 11:05:22 whitestar usb.agent: ... no modules for USB product
3eb/3301/100

There's no "cdc" module in the kernel , I never compiled that one.

To get hotplug going , I had to alter one of the lines in 
/lib/modules/2.4.19-xfs/ so instead of being

usbdnet              0x0193      0x04dd   0x8004    0x0000      
0x0000       0x02         0x00            0x00           
0x02            0x06               0x00               0x
00000000

it was instead 
usbdnet              0x0003      0x04dd   0x8004    0x0000      
0x0000       0x02         0x00            0x00           
0x02            0x06               0x00               0x
00000000

That made the usb0 interface on my desktop box appear (gkrellm shows
this) when I plug the zaurus into the cradle. Before that I had to
ifconfig usb0 and set a route manually. Its actually in the instructions
for what you had to do to mandrake, so I'm surprised I had to do it.

usb0 looks like this in ifconfig (desktop box)
usb0      Link encap:Ethernet  HWaddr 40:00:00:00:FF:1F
          inet addr:192.168.129.1  Bcast:192.168.129.255 
Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:15552 (15.1 KiB)  TX bytes:0 (0.0 b)

I have a script called /etc/hotplug/usb/usbdnet which contains 
the following:

#! /bin/bash
typeset -i num
num=`ifconfig | grep usb0 | wc -l`
if [ $num -eq 0 ] ; then
        ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up
        route add -host 192.168.129.201 usb0
fi
iptables  -t nat -F
iptables  -t nat -A POSTROUTING -j SNAT -o eth0 --to 10.0.0.1
echo 1 > /proc/sys/net/ipv4/ip_forward

I'm not sure if I should be using eth0 and 10.0.0.1 , or ppp0 and 
the address it gets assigned from the adsl link.  I've tried both
and didn't get much luck with either.

route looks like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
lns2-loopback-0 *               255.255.255.255 UH    0      0        0
ppp0
192.168.129.201 *               255.255.255.255 UH    0      0        0
usb0
10.0.0.0        *               255.255.255.0   U     0      0        0
eth0
localnet        *               255.255.255.0   U     0      0        0
eth1
default         lns2-loopback-0 0.0.0.0         UG    0      0        0
ppp0

When I plug in the zaurus into the cradle , I have to manually enter the
following commands into the zaurus:

ifconfig usbd0 192.168.129.201 up
route add default gw 192.168.129.1

I am then able to ping (and connect with ssh) the zaurus and desktop box
from each other. 

But attempts to ping sites further than ppp0 on my desktop box (from the
zaurus) just get ignored. (5 packets transmitted, 0 packets received,
etc)  I can see the pings generated at usb0 on my desktop box , but
they're not transferred to ppp0 (so they can get out through adsl)


can someone tell me what I'm doing wrong?

_______________________________________________
Zaurus-general mailing list
Zaurus-general@lists.zaurus.com
http://lists.zaurus.com/mailman/listinfo/zaurus-general
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic