OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Usb Networking, Debian EABI
scottlfa
post Nov 7 2007, 10:52 PM
Post #1





Group: Members
Posts: 283
Joined: 1-October 07
From: Blacksburg, SC, USA
Member No.: 20,773



Between a Z and a Linux host.

usb-gadget start

The first step would be to configure the device usb0 in /etc/network/interfaces on your Z.

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.129.10
netmask 255.255.255.0
network 192.168.129.0
gateway 192.168.129.1

usb-gadget already pre-configures usb0 for you, so you can just use the defaults here.

The next step is to configure usb0 on your PC. Again, this is done in /etc/network/interfaces:

iface usb0 inet static
address 192.168.129.1
pointopoint 192.168.129.10
netmask 255.255.255.0
network 192.168.129.0
broadcast 192.168.129.255

The IP of your Zaurus has been set to 192.168.129.10, the IP of your PC (for the USB network only!) has been set to 192.168.129.1.

Run ifup usb0 on both your Zaurus and the PC to bring up the devices.
At this point your Zaurus should be able to ping your PC:

# ping 192.168.129.1
PING 192.168.129.1 (192.168.129.1): 56 data bytes
64 bytes from 192.168.129.1: icmp_seq=0 ttl=64 time=1.3 ms
64 bytes from 192.168.129.1: icmp_seq=1 ttl=64 time=4.1 ms

To allow your Z to connect to the other machines in your local network (LAN), you have to enable IP forwarding on the machine connected to your Z:

echo 1 > /proc/sys/net/ipv4/ip_forward

and use NAT on outgoing connections:

iptables -t nat -A POSTROUTING -s 192.168.129.0/24 -j MASQUERADE

Go to the top of the page
 
+Quote Post
dlj0
post Nov 29 2007, 08:26 AM
Post #2





Group: Members
Posts: 219
Joined: 3-March 06
Member No.: 9,282



QUOTE(scottlfa @ Nov 8 2007, 01:52 AM) *
Between a Z and a Linux host.


Excellent! I hadn't been able to get anywhere with usb networking before. Now, it works fine. Very nice.
Go to the top of the page
 
+Quote Post
ZDevil
post Nov 30 2007, 12:03 PM
Post #3





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



That's an essential tip. Wikify it?
Go to the top of the page
 
+Quote Post
axeTail
post Apr 14 2008, 02:42 AM
Post #4





Group: Members
Posts: 76
Joined: 14-December 07
Member No.: 21,073



QUOTE(ZDevil @ Nov 30 2007, 10:03 PM) *
That's an essential tip. Wikify it?


Hi where can I enter my proxy settings? Thanks
Go to the top of the page
 
+Quote Post
axeTail
post Apr 14 2008, 12:11 PM
Post #5





Group: Members
Posts: 76
Joined: 14-December 07
Member No.: 21,073



QUOTE(scottlfa @ Nov 8 2007, 08:52 AM) *
Between a Z and a Linux host.

usb-gadget start

The first step would be to configure the device usb0 in /etc/network/interfaces on your Z.

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.129.10
netmask 255.255.255.0
network 192.168.129.0
gateway 192.168.129.1

usb-gadget already pre-configures usb0 for you, so you can just use the defaults here.

The next step is to configure usb0 on your PC. Again, this is done in /etc/network/interfaces:

iface usb0 inet static
address 192.168.129.1
pointopoint 192.168.129.10
netmask 255.255.255.0
network 192.168.129.0
broadcast 192.168.129.255

The IP of your Zaurus has been set to 192.168.129.10, the IP of your PC (for the USB network only!) has been set to 192.168.129.1.

Run ifup usb0 on both your Zaurus and the PC to bring up the devices.
At this point your Zaurus should be able to ping your PC:

# ping 192.168.129.1
PING 192.168.129.1 (192.168.129.1): 56 data bytes
64 bytes from 192.168.129.1: icmp_seq=0 ttl=64 time=1.3 ms
64 bytes from 192.168.129.1: icmp_seq=1 ttl=64 time=4.1 ms

To allow your Z to connect to the other machines in your local network (LAN), you have to enable IP forwarding on the machine connected to your Z:

echo 1 > /proc/sys/net/ipv4/ip_forward

and use NAT on outgoing connections:

iptables -t nat -A POSTROUTING -s 192.168.129.0/24 -j MASQUERADE



Hi All,

I can ping my z and my pc. When I try to ping www.google.com (for example), it says unknown host. What am I missing? Please help. I followed the instructions.
Go to the top of the page
 
+Quote Post
ZDevil
post Apr 15 2008, 05:32 AM
Post #6





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Set DNS nameserver?
Go to the top of the page
 
+Quote Post
mars
post Jun 9 2008, 09:38 PM
Post #7





Group: Members
Posts: 146
Joined: 5-October 04
Member No.: 4,881



QUOTE(ZDevil @ Apr 15 2008, 01:32 PM) *
Set DNS nameserver?


The below more detailed answer is partly to help me remember next time I forget. smile.gif

The DNS (nameserver) is called out in /etc/resolv.conf -- Therefore find/google the nameserver for your internet provider, and edit /etc/resolv.conf to match:

nameserver 64.169.140.6

or whatever your nameserver is.

While I'm at it, if you use ubuntu, "sudo echo 1 > /proc/sys/net/ipv4/ip_forward" doesn't seem to work due to permission issues. Instead do a "sudo -i" and then do the echo 1 command from the resulting root prompt.

Oh, I also notice that I need to turn off the firewall on the PC (firestarter) for the usb networking to work. I am not smart enough yet to get it to work with the firewall running.

-- mars
Go to the top of the page
 
+Quote Post
Osage
post Jun 22 2008, 02:09 AM
Post #8





Group: Members
Posts: 11
Joined: 4-April 06
Member No.: 9,531



QUOTE(scottlfa @ Nov 8 2007, 08:52 AM) *
Between a Z and a Linux host.

usb-gadget start

The first step would be to configure the device usb0 in /etc/network/interfaces on your Z.

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.129.10
netmask 255.255.255.0
network 192.168.129.0
gateway 192.168.129.1

usb-gadget already pre-configures usb0 for you, so you can just use the defaults here.

The next step is to configure usb0 on your PC. Again, this is done in /etc/network/interfaces:
[...]


This is what doesn't work for me.
On Z I can set up usb0 easily, but not on my laptop PC.
I've tried g_ether, cdc_*, usbnet, zaurus modules so far.

laptop#: modprobe g_ether host_addr=00:dc:c8:f7:75:05 dev_addr=7e:44:7c:4f:a0:6c
FATAL: Error inserting g_ether (/lib/modules/2.6.24.2v2/kernel/drivers/usb/gadget/g_ether.ko): No such device

What should I do?
Go to the top of the page
 
+Quote Post
ShiroiKuma
post Feb 25 2009, 10:14 AM
Post #9





Group: Members
Posts: 902
Joined: 22-May 04
Member No.: 3,385



I'm using USB networking on the HTC Universal in this way, all's fine.

How do you access the other devices filesystem over USB? Is it possible? Or you can SSH into the other one? Haven't done that before, anyone have some pointers?
Go to the top of the page
 
+Quote Post
scottlfa
post Mar 30 2009, 09:55 AM
Post #10





Group: Members
Posts: 283
Joined: 1-October 07
From: Blacksburg, SC, USA
Member No.: 20,773



Been getting more and more interested in try Debian on my extra universal. Hows it run?
Go to the top of the page
 
+Quote Post
axellira
post Jun 21 2009, 12:49 AM
Post #11





Group: Members
Posts: 6
Joined: 23-August 08
Member No.: 22,251



Thanks rolleyes.gif. Did someone put it on the wiki already?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th November 2014 - 04:53 AM