OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: microsoft/linux on October 31, 2005, 10:51:54 pm
-
How do I setup USB networking in OZ/OPIE? Is there any way to use network connection sharing(wifi from my laptop to my Z in the cradle)? Suggestions?
-
I got the USB networking to work(according to http://openzaurus.org/wordpress/howto/usb-networking/) (http://openzaurus.org/wordpress/howto/usb-networking/)). Now how do I share the internet connection w/ my Zaurus
-
What's the desktop OS?
-
Debian Etch
-
Hmm, I don't know about that then, but there are lots of HowTos which you could modify & use. Basically you need to fiddle with routes and NAT iirc.
Si
-
Did you have already shared your internet connection with other computers?
- Yes: you have to make a bridge.
- No: you can use NAT / masquarding to share internet.
For bridging look at http://bridge.sourceforge.net/ (http://bridge.sourceforge.net/), for NAT google around.
-
No, this is my laptop, which just connects to our wireless router. I don't know anything about NAT, is there an easier way?
-
No, this is my laptop, which just connects to our wireless router. I don't know anything about NAT, is there an easier way?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101727\"][{POST_SNAPBACK}][/a][/div]
There is an easy way, at least it worked for me.
Either way, you will need your laptop to do IP forward, in order to transfer packets between your own network (let's call it 192.168.0.0) and your USB network (192.168.129.0). You can do this by the following command (as root, and must be redone each boot, unless you configure your linux to do otherwise):
echo 1 > /proc/sys/net/ipv4/ip_forward
Once done, you need another tweak in order to make your two networks connected: you can now send packets from your Z to the outer world, but the outer world can't reply, because it misses a route. The simpler way to do this, if you can, is to set up a new route on your wireless router. This way, any equipment in the 192.168.0.0 network will be able to talk to your Z (through your laptop), and answers to the Z's queries won't be lost anymore.
Depending on your router's model, the process will be different, but the idea is to setup a route on it for the 192.168.129.0/24 network using gateway 192.168.0.X (replace by your laptop's own IP adress).
On mine (Linksys WRT), it's in the "Advanced router" section, IIRC.
-
Since I'm using an internal network for our wirelss network, can I just bridge wlan0 and usb0 together? or will that not work? would the 'route' command on the host machine(not my Z) allow me to do the same thing larrycow was talking about?
-
Since I'm using an internal network for our wirelss network, can I just bridge wlan0 and usb0 together? or will that not work? would the 'route' command on the host machine(not my Z) allow me to do the same thing larrycow was talking about?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101955\"][{POST_SNAPBACK}][/a][/div]
Bridging wlan0 and usb0 should work, though I'm not used to bridging and I don't know at all whether it's an easy process or not.
Using the 'route' command on your laptop is almost useless, for what I understand: the usb0 interface being bought up, a route to it is automagically definied (you can check that easily, you should have a 192.168.129.0 route to usb0). And the problem is not to route packets from your host to your Z, but to route packets from all other hosts to your Z (through your own host). So you must either, unless I'm wrong: set up a route to your laptop on every single host in the world, or set it on the main router of your network.
If you can't do that (e.g. if you don't have the rights), you will need to use NAT (or bridging, probably). But I found it quite easy: no need to use iptables on your host (in fact, no other "special thing" than ip forwarding), no new interface to manage (like when bridging). Anyway, I'm not even sure my method won't raise new problems later...
-
there was something called dynamic routing on the wifi router, but I didn't see anything else. Other suggestions?
-
Please look around, google is your friend!
http://openzaurus.org/wordpress/howto/usb-networking/ (http://openzaurus.org/wordpress/howto/usb-networking/)
https://www.oesf.org/index.php?title=Linux_Connectivity (https://www.oesf.org/index.php?title=Linux_Connectivity)
-
I flashed to OZ 3.5.4, and now I can't even ping the Z. The script on the second link Edb0 provided, didn't work(unless there was something special I needed to do after setting it up). Can someone walk me through step by step?
-
Insert you Z into the cradle.
[Zaurusside]
- Open the networksettings and activate the usbd0 interface and click on 'configure'.
- Uncheck DHCP an check Auto bringup.
- insert you ip-addr for your zaurus which is in the right range with you computer
- insert the subnetmask
- insert as gateway and DNS the ip-addr of your computer
- press 'Ok'
[/Zaurusside]
[computerside]
Open a terminal and check your log ("cat /var/log/messages" as root) and look if you can find such as
hub.c: new USB device 02:03.3-1, assigned address 2
usb0: register usbnet usb-02:03.3-1, Sharp Zaurus SL-5x00
type "ifconfig -a" and look if you have a new interface usb0 or someting
type "ifconfig <usb interface> <ipaddr> netmask <netmask> up
route add -host <ipaddr Z> <usb interface>
Now you can ping your Z. If not please look here
https://www.oesf.org/index.php?title=Generic_%28USB%29 (https://www.oesf.org/index.php?title=Generic_%28USB%29)
Enabling masquerading is also in the document.
[/computerside]
I hope this help