![]() ![]() |
Dec 4 2005, 12:41 PM
Post
#16
|
|
|
Group: Members Posts: 4 Joined: 19-September 05 Member No.: 8,147 |
I had this usbd connection working perfectly and then something has changed and I can't figure it out.
I am on Gentoo and set up bridging like NickNak suggested. The PC has address 192.168.13.100 and the Zaurus gets 192.168.13.113. My PC goes to a router @ 192.168.13.1 This is the dmesg on PC when Zaurus inserted into cradle CODE usb 4-1: new full speed USB device using uhci_hcd and address 15 usb0: register 'zaurus' at usb-0000:00:10.3-1, Sharp Zaurus SL-5x00, 36:78:db:4c:f0:41 device usb0 entered promiscuous mode br0: port 2(usb0) entering learning state br0: topology change detected, propagating br0: port 2(usb0) entering forwarding state I can ping the PC, and router without issue. I can also ping any web address by name or IP address. If I do a traceroute to any web address I can see the packets routed properly. If I try any network program on the Zaurus, they do nothing. Includes, ipkg, wget, konq-embedded. All the sites are working Any ideas or suggestions? |
|
|
|
Dec 5 2005, 03:32 AM
Post
#17
|
|
|
Group: Members Posts: 4,515 Joined: 25-October 03 From: Bath, UK Member No.: 464 |
No, no, no, no, no - this is a thread giving details about how to get connections working, not to ask about how to get them working; start a new thread.
|
|
|
|
Dec 17 2005, 09:08 AM
Post
#18
|
|
![]() Group: Members Posts: 27 Joined: 19-April 05 From: Netherlands Member No.: 6,917 |
Debian unstable Zaurus USB-network how-to:
Install the latest stock kernel for your machine class e.g.: CODE user@desktop:~# sudo apt-get install linux-image-2.6.14-2-686 Reboot. Plug in the zaurus and see if it was recognized by your computer. By issueing the command 'tail /var/log/messages' you will see the last few lines of your system log. You should see that an usb device was connected, the 'zaurus' module was loaded and that your zaurus was recognized: CODE user@desktop:~# tail /var/log/messages Dec 17 17:35:58 localhost kernel: usb 2-2: new full speed USB device using uhci_hcd and address 10 Dec 17 17:35:58 localhost kernel: usb0: register 'zaurus' at usb-0000:00:10.0-2, pseudo-MDLM (BLAN) device, 52:8c:8b:4f:e4:90 Find that the module was loaded: CODE user@desktop:~# lsmod | grep zaurus usbnet 17064 2 zaurus,cdc_ether You'll probably have one or two more lines containing the word 'zaurus', but you definitely should have this line here. If not, something went wrong with loading the module. An 'ifconfig -a' should give you a usb0 network interface, which isn't configured yet. There may be more network interfaces depending on your system, but usb0 should definitely be there. CODE user@desktop:~# ifconfig -a usb0 Link encap:Ethernet HWaddr 52:8C:8B:4F:E4:90 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Now we'll configure the network interface of the zaurus and your linux computer. We'll give your computer and your zaurus a static IP. First your zaurus: Start 'Network' in your Settings dir. Click on the interface 'usbd0' and click configure. Fill in the Following: (X) Automatically bring up ( ) DHCP Static Ip Configuration IP Address 192.168.129.201 Subnet Mask 255.255.255.0 Leave the rest empty for now. On your linux computer type the following: CODE sudo ifconfig usb0 192.168.129.200 netmask 255.255.255.0 up This should configure your USB network interface and bring it up. Now we'll try if we can reach the zaurus. We'll do this by pinging it's IP address (the command should be stopped by typing Ctrl-c or it will go on forever): CODE user@desktop:~# ping 192.168.129.201 PING 192.168.129.201 (192.168.129.201) 56(84) bytes of data. 64 bytes from 192.168.129.201: icmp_seq=1 ttl=64 time=0.108 ms 64 bytes from 192.168.129.201: icmp_seq=2 ttl=64 time=0.094 ms 64 bytes from 192.168.129.201: icmp_seq=3 ttl=64 time=0.090 ms 64 bytes from 192.168.129.201: icmp_seq=4 ttl=64 time=0.089 ms 64 bytes from 192.168.129.201: icmp_seq=5 ttl=64 time=0.093 ms --- 192.168.129.201 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.089/0.094/0.108/0.014 ms Now we will make your configuration permanent. You don't want to type 'ifconfig usb0 192.168.129.200 netmask 255.255.255.0 up' to use your zaurus all the time, and you'll probably just want to stick it in to be able to use it. There are (at least) two ways to accomplish this task: 1. by adding an entry for the usb interface in the file /etc/network/interfaces, or 2. by writing a new udev rule that configures the usb interface 1. The first option is the easiest and, in my opinion, the cleanest. As root, add the following lines to the file /etc/network/interfaces: CODE allow-hotplug usb0 mapping hotplug script grep map usb0 iface usb0 inet static address 192.168.129.200 netmask 255.255.255.0 pointopoint 192.168.129.201 2. The second option also works, but should be considered a hack. So you'd better skip this one. I will leave it in this post for historical purposes though, since untill I found out about the option printed above this was the only way I could bring up the usb interface automatically. It requires writing a new udev rule that configures the usb interface based on 2 keys: the kernel device name (e.g. usb0) and the driver used, that is 'zaurus'. You actually could omit this key, but then this rule would interfere with other devices with a usb* device name (probably usb networking devices), if you owned such a device. (It appeared that the hardware address used in a previous version of this post changes every other time you reboot your machine. Since the address isn't permanent, it isn't suitable as a key.) So, as root, create the file /etc/udev/zaurus.rules and add the following line: CODE KERNEL=="usb[0-9]*", DRIVER="zaurus", NAME="%k", SYMLINK="zaurus", RUN+="/sbin/ifconfig %k 192.168.129.200 netmask 255.255.255.0 up" and symlink it to the directory /etc/udev/rules.d: CODE $ cd /etc/udev/rules.d user@desktop:~# sudo ln -s ../zaurus.rules 10_zaurus.rules Now restart the udev daemon: CODE user@desktop:~# sudo /etc/init.d/udev restart This will ensure that every time your zaurus hits the cradle the network connection will be started. If your connection to the zaurus often hangs for no apparent reason, consider shrinking the MTU on the zaurus: CODE root@zaurus:~# ifconfig usb0 mtu 1000 To make the change permanent, even after rebooting, add the line "mtu 1000" to the section of the usbd0 network interface in the /etc/network/interfaces file. Folkert van der Beek. *edit: modified the udev rule, so it won't interfere with other usb networking devices. *edit2: modified the udev rule to identify the zaurus based on the driver in stead of the hardware address, since the latter apparently changes after every reboot. *edit3: added the option to modify /etc/network/interfaces, instead of writing an udev rule. *edit4: added the option to shrink the MTU to prevent freezing connections. |
|
|
|
Jan 22 2006, 09:49 PM
Post
#19
|
|
|
Group: Members Posts: 238 Joined: 29-May 05 From: Sebec, ME, USA Member No.: 7,225 |
what happens if the usbnet driver is built into my kernel. I custom build my kernel, the scripts should still work right?
|
|
|
|
Jan 24 2006, 03:00 AM
Post
#20
|
|
![]() Group: Members Posts: 27 Joined: 19-April 05 From: Netherlands Member No.: 6,917 |
|
|
|
|
Jan 30 2006, 02:24 PM
Post
#21
|
|
![]() Group: Members Posts: 156 Joined: 29-March 05 From: Virginia Member No.: 6,736 |
QUOTE(7_feet_up @ Dec 17 2005, 01:08 PM) Debian unstable Zaurus USB-network how-to: Install the latest stock kernel for your machine class e.g.: CODE $ sudo apt-get install linux-image-2.6.14-2-686 Excellent howto, 7_feet_up. I have questions, since it does not seem to work for me. I'm running Debian stable on an HP laptop, with kernel 2.6.15 (I just upgraded from 2.6.12, where the problem existed as well). Everything works manually, but although I followed all of the steps to get it to come up automagically, it doesn't. lsmod shows: CODE [riogrande ~]# lsmod | grep zaurus zaurus 4096 0 cdc_ether 4352 1 zaurus usbnet 11528 2 zaurus,cdc_ether I also created /etc/udev/zaurus.rules and symlinked it to /etc/udev/rules.d/, and added usb0 to /etc/network/interfaces: CODE auto usb0 iface usb0 inet static address 192.168.129.1 pointopoint 192.168.129.1 netmask 255.255.255.255 pre-up modprobe zaurus post-down rmmod zaurus When I put the Zaurus in the dock, I get: CODE Jan 30 12:59:35 localhost kernel: usb 4-5.4: new full speed USB device using ehci_hcd and address 10 Jan 30 12:59:35 localhost kernel: usb0: register 'zaurus' at usb-0000:00:1d.7-5.4, Sharp Zaurus SL-5x00, 0a:95:46:a6:00:af At this point, I can bring up usb0 and assign it an address, but it is by no means automatic. One thing I noticed. The beginning of your /etc/udev/zaurus starts with KERNEL=="usb[0-9]*". Does this look for /dev/usb[0-9]? Because on my system, these devices do not appear. Is this a normal occurrence? Once I get this up and working, I would like to append something like the following to bring up out-to-the-internet connectivity for the zaurus: CODE #!/bin/sh # Determine external interface. EXTIF="`/bin/netstat -rn | grep ^0.0.0.0 | awk '{ print $8}'`" echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t filter -F FORWARD iptables -t filter -P FORWARD DROP iptables -t filter -A FORWARD -s 192.168.129.0/24 -j ACCEPT iptables -t filter -A FORWARD -d 192.168.129.0/24 -j ACCEPT iptables -t nat -F PREROUTING iptables -t nat -P PREROUTING ACCEPT iptables -t nat -F POSTROUTING iptables -t nat -P POSTROUTING ACCEPT iptables -t nat -F OUTPUT iptables -t nat -P OUTPUT ACCEPT iptables -t nat -A POSTROUTING -s 192.168.129.0/24 -o $EXTIF -j MASQUERADE But one step at a time... --Storm |
|
|
|
Feb 19 2006, 12:51 PM
Post
#22
|
|
|
Group: Members Posts: 88 Joined: 10-February 06 Member No.: 9,115 |
QUOTE(NickNak @ Sep 14 2005, 06:56 PM) Using an ethernet bridge to plug your Zaurus into your network seems to me preferable to routing a two-node subnet between your PC and the Z and then using NAT to give the Z access to your network/the internet. Hmm, looks good, but I do need NAT, IP MASQ on the PC because I my internet is via PPP. Can I do netfilter IP MASQ together with bridging? |
|
|
|
Mar 20 2006, 01:24 PM
Post
#23
|
|
![]() Group: Members Posts: 27 Joined: 19-April 05 From: Netherlands Member No.: 6,917 |
QUOTE(Storm @ Jan 30 2006, 11:24 PM) <snip> I have questions, since it does not seem to work for me. <snip> Sorry about the late reply. I don't regularly check this thread, so you could as well have solved the issue by now. Anyway, I updated the howto. Just delete the udev rule and add the lines to /etc/network/interfaces as described in the howto. QUOTE(Storm @ Jan 30 2006, 11:24 PM) Once I get this up and working, I would like to append something like the following to bring up out-to-the-internet connectivity for the zaurus: <snip> But one step at a time... --Storm To run commands after the interface has been brought up, use the 'up' command in /etc/network/interfaces, and the 'post-down' command after taking the interface down: CODE allow-hotplug usb0 mapping hotplug script grep map usb0 iface usb0 inet static address 192.168.129.200 netmask 255.255.255.0 pointopoint 192.168.129.201 pre-up modprobe iptable_filter pre-up modprobe iptable_nat pre-up modprobe ip_nat_ftp pre-up modprobe ip_conntrack_ftp pre-up modprobe ip_conntrack_irc pre-up modprobe ip_nat_irc up echo "1" > /proc/sys/net/ipv4/ip_forward up iptables -t filter -F FORWARD up iptables -t filter -P FORWARD DROP up iptables -t filter -A FORWARD -s 192.168.129.0/24 -j ACCEPT up iptables -t filter -A FORWARD -d 192.168.129.0/24 -j ACCEPT up iptables -t nat -F PREROUTING up iptables -t nat -P PREROUTING ACCEPT up iptables -t nat -F POSTROUTING up iptables -t nat -P POSTROUTING ACCEPT up iptables -t nat -F OUTPUT up iptables -t nat -P OUTPUT ACCEPT up iptables -t nat -A POSTROUTING -s 192.168.129.0/24 -o usb0 -j MASQUERADE post-down echo "0" > /proc/sys/net/ipv4/ip_forward post-down iptables -t nat -F Folkert. |
|
|
|
Mar 20 2006, 09:11 PM
Post
#24
|
|
|
Group: Members Posts: 238 Joined: 29-May 05 From: Sebec, ME, USA Member No.: 7,225 |
ok, I changed GUIs, after I updated to 3.5.4. Now I can't connect from my PC. I made the settings of usb0 on the Z the same as they were, to no avail. Suggestions?
|
|
|
|
Mar 20 2006, 11:42 PM
Post
#25
|
|
![]() Group: Members Posts: 1,099 Joined: 17-December 03 From: Athens, Greece Member No.: 1,210 |
PC: windows XP
Zaurus: 860 oz/gpe 3.5.4 2.6 kernel Connect the zaurus to the pc via usb. On the zaurus: Menu -> settings -> usb settings : Ethernet Networking ok Menu -> settings -> Network setup usb0 (NOT usbd0) I change the ip here to 192.168.128.202, in order not to have problems with my other subnets Menu -> utilities -> Root shell type in the console: CODE modprobe g_ether ifup usb0 ignore the messages, now when typing `ifconfig' you should see usb0 with the ip set before and hopefully windows should have found a new device, time to set windows. On the pc: - save the attached file and rename it linux.inf - follow the steps here: http://www.gumstix.org/tikiwiki/tiki-index...ndows_XP_usbnet ( in fact I have included the location of linux.inf and windows did it all by itself) - at the end right click on the local connection and choose properties - click on tcpip and properties - click on Use the following ip address and put 192.168.128.200 (or whatever you have set as a gateway on the zaurus, by default it should be 192.168.0.200) Voila
Attached File(s)
|
|
|
|
Mar 21 2006, 10:34 PM
Post
#26
|
|
![]() Group: Members Posts: 36 Joined: 5-February 05 Member No.: 6,416 |
For those of us poor fools who have to internet connect the Z using the USB b/c we don't have a wifi CF card...
Zaurus: SL-5500 - OZ 3.5.4 (I'm assuming Opie Image) PC / Network: - Windows XP - Router (Optional?) Drivers - Load the original drivers either from the CD or by downloading them from...somewhere. I used the CD. PC Side Changes - In order for your Z to be able to see the rest of your network, you need to create a windows network bridge. Open up Network Connnections (with the Z in the cradle and turned on, and drivers installed). Select both the Z's connection and your PC's network connection (by control clicking). Right click, and choose "Create Network Bridge". IIRC, that's it. Z Side Changes - To bring up the network interface on the z, you may have to suspend/resume it in the cradle, or restart usbd0, or otherwise baby the device. If you have DHCP (read: your network has a router, as mine does) IP address should configure itself. - If your only available internet connection for the Z is via USB cradle (not useful for all that much, other than installing packages) it may be in your best interests to install fbvncserver ASAP (as the cradle blocks keyboard). Hunt and peck into console using onscreen keyboard 'ipkg update' then 'ipkg -d <dest> install fbvncserver' then 'ipkg-link mount <dest/packages>'. Reboot (yes, reboot--groan), and launch fbvnc from the console. Connect to your Z's VNC server using a normal VNC client on your PC. |
|
|
|
Mar 24 2006, 07:05 AM
Post
#27
|
|
|
Group: Members Posts: 639 Joined: 4-September 03 From: Chicago Member No.: 401 |
QUOTE(pgas @ Mar 21 2006, 01:42 AM) PC: windows XP Zaurus: 860 oz/gpe 3.5.4 2.6 kernel Connect the zaurus to the pc via usb. On the zaurus: Menu -> settings -> usb settings : Ethernet Networking ok Menu -> settings -> Network setup usb0 (NOT usbd0) I change the ip here to 192.168.128.202, in order not to have problems with my other subnets Menu -> utilities -> Root shell type in the console: CODE modprobe g_ether ifup usb0 ignore the messages, now when typing `ifconfig' you should see usb0 with the ip set before and hopefully windows should have found a new device, time to set windows. On the pc: - save the attached file and rename it linux.inf - follow the steps here: http://www.gumstix.org/tikiwiki/tiki-index...ndows_XP_usbnet ( in fact I have included the location of linux.inf and windows did it all by itself) - at the end right click on the local connection and choose properties - click on tcpip and properties - click on Use the following ip address and put 192.168.128.200 (or whatever you have set as a gateway on the zaurus, by default it should be 192.168.0.200) Voila God I hate windoze, thanks pgas for the above info, it almost works for me except as the XP drivers are being installed the new device dialog locks and I lose my USB mouse. As soon as I disconnect my Z the mouse comes back, but the drivers never completely install. This may be related to the docking station I use at work. |
|
|
|
Mar 29 2006, 12:32 PM
Post
#28
|
|
|
Group: Members Posts: 65 Joined: 23-February 04 From: Santa Rosa Member No.: 1,997 |
The Cxx00 doesn't talk to Windows correctly yet. Richard Purdie "has some hints" which should make it work but he hasn't had time to implement them yet. :-/
|
|
|
|
Apr 4 2006, 12:25 AM
Post
#29
|
|
|
Group: Members Posts: 47 Joined: 28-February 06 Member No.: 9,244 |
QUOTE(papercrane @ Mar 29 2006, 10:32 PM) The Cxx00 doesn't talk to Windows correctly yet. Richard Purdie "has some hints" which should make it work but he hasn't had time to implement them yet. :-/ No wonder Windows does not like my borzoi. Ah well, linux works fine, though. -- YT, Tron |
|
|
|
Apr 6 2006, 05:20 PM
Post
#30
|
|
|
Group: Members Posts: 9 Joined: 23-March 06 Member No.: 9,429 |
Hi,
I followed the shell scripts and can ping and ssh out of the Zaurus, but can't do a wget that ipkg needs using the Opie 3.5.4 images. Any suggestions? |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 08:31 AM |