Author Topic: Usb Networking  (Read 6458 times)

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Usb Networking
« 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?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Usb Networking
« Reply #1 on: November 01, 2005, 12:20:57 am »
I got the USB networking to work(according to http://openzaurus.org/wordpress/howto/usb-networking/). Now how do I share the internet connection w/ my Zaurus
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Usb Networking
« Reply #2 on: November 01, 2005, 06:07:48 am »
What's the desktop OS?
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Usb Networking
« Reply #3 on: November 01, 2005, 09:47:13 am »
Debian Etch
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Usb Networking
« Reply #4 on: November 01, 2005, 12:10:54 pm »
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
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

EdbO

  • Newbie
  • *
  • Posts: 31
    • View Profile
    • http://
Usb Networking
« Reply #5 on: November 01, 2005, 01:45:30 pm »
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/, for NAT google around.
/**********************************/
Slackware current with Dropline Gnome on the desktop
Zaurus SL-5500  {
   OZ/Opie
   1 GB  and 64MB SD-card
   16 MB and 256 MB CF-card
   Sitecom (Billionton) bluetoothcard
}

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Usb Networking
« Reply #6 on: November 01, 2005, 04:08:03 pm »
No, this is my laptop, which just connects to our wireless router. I don't know anything about NAT, is there an easier way?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

larrycow

  • Newbie
  • *
  • Posts: 15
    • View Profile
Usb Networking
« Reply #7 on: November 02, 2005, 12:20:28 pm »
Quote
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):

Code: [Select]
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.

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Usb Networking
« Reply #8 on: November 02, 2005, 06:14:44 pm »
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?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

larrycow

  • Newbie
  • *
  • Posts: 15
    • View Profile
Usb Networking
« Reply #9 on: November 03, 2005, 04:42:53 am »
Quote
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...

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Usb Networking
« Reply #10 on: November 03, 2005, 09:38:54 am »
there was something called dynamic routing on the wifi router, but I didn't see anything else. Other suggestions?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

EdbO

  • Newbie
  • *
  • Posts: 31
    • View Profile
    • http://
Usb Networking
« Reply #11 on: November 03, 2005, 11:31:50 am »
/**********************************/
Slackware current with Dropline Gnome on the desktop
Zaurus SL-5500  {
   OZ/Opie
   1 GB  and 64MB SD-card
   16 MB and 256 MB CF-card
   Sitecom (Billionton) bluetoothcard
}

microsoft/linux

  • Full Member
  • ***
  • Posts: 237
    • View Profile
    • http://
Usb Networking
« Reply #12 on: November 03, 2005, 08:55:02 pm »
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?
C3200(exiguitas) Angstrom Beta(version not designated)/GPE
SL-5500(immotus) OpenZaurus 3.5.4/GPE, OpenZaurus 3.5.4/Opie(loopmount)
1GB SD Card
128MB CF Card/8MB CF Card
Gentoo/Windows XP Home SP2

Numbers rule the Universe.
        --The Pythagoreans

Microsoft/Linux

EdbO

  • Newbie
  • *
  • Posts: 31
    • View Profile
    • http://
Usb Networking
« Reply #13 on: November 04, 2005, 02:42:19 pm »
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
Code: [Select]
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

Enabling masquerading is also in the document.
[/computerside]

I hope this help  
/**********************************/
Slackware current with Dropline Gnome on the desktop
Zaurus SL-5500  {
   OZ/Opie
   1 GB  and 64MB SD-card
   16 MB and 256 MB CF-card
   Sitecom (Billionton) bluetoothcard
}