Author Topic: Usb Connection Howto  (Read 122321 times)

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #30 on: April 17, 2006, 10:33:51 am »
followed 7_feet_up's guide (thanks) and it would work as far as assigning the ip to usb0, but it seemed the pointopoint command wasnt working as i couldn't ping either way unless i executed the command:

Code: [Select]
route add -host 192.168.129.201 usb0
but i wanted this down automatically so i added it into /etc/network/interfaces like so:

Code: [Select]
iface usb0 inet static
address 192.168.1.105
netmask 255.255.255.0

post-up route add -host 192.168.1.201 usb0

* adjust your ip's to suit and enjoy ~1-3ms response times  

now onto ICS ...
« Last Edit: April 17, 2006, 10:35:26 am by telemetric_au »
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #31 on: April 17, 2006, 11:11:25 am »
well after mucking aroun some i cant get my z to ping past my pc which is connected by ethernet to  adsl/router and the interent ...

have put the iptables config commands as suggeste in the interfaces file and is executing but doesnt seem to work

i d like explained this code : specifically the choice of ip's that relevance...

Code: [Select]
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
« Last Edit: April 17, 2006, 11:28:33 am by telemetric_au »
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #32 on: April 18, 2006, 08:17:43 am »
I GOT IT WORKING !!!  --finally after trying every other tech...

(SL-5500 connected via usb cradle to DEBAIN SID connected via ethernet to ADSL router)

with another method briefly touched on in this and most threads.... "bridging"

here's the config:  

first: apt-get install bridge-utils
(this gives you the brctl command)

PC's : /etc/network/interfaces (note: 192.168.1.105 is simply a dummy address to bring usb0 up with and is then reset to 0.0.0.0)

Code: [Select]
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 0.0.0.0
netmask 0.0.0.0

auto br0
iface br0 inet dhcp
pre-up brctl addbr br0
pre-up brctl addif br0 eth0
post-down brctl delbr br0

allow-hotplug usb0
mapping hotplug
script grep
map usb0
iface usb0 inet static
address 192.168.1.105
netmask 255.255.255.0
post-up ifconfig usb0 0.0.0.0 up
post-up brctl addif br0 usb0
post-down brctl delif br0 usb0

exec # /etc/init.d/networking restart

alternatively br0 can be assigned manually rather than dhcp from a router etc...

Zaurus's Network Set-up GUI ;

configure usbd0:

Code: [Select]
check automatically bring-up
set ip address, subnet, gateway, dns's as needed (with gateway being your pc's assigned ip *(not router), be that for eth0 or what would now be br0)

now as i did a fair bit of mucking around first there may be some of the things prior to this method needed though i dont recon here they are:

on Z;  edit /etc/resolv.conf to match your pc's ... and add def gateway commands etc as commonly done, but i think OPZ's GUI setup screen handles that...

   -can now ping www.google.com ... now onto package management ...

references:

http://www.gumstix.org/tikiwiki/tiki-index...page=Networking
http://www.stolk.org/debian/bluetooth.html
« Last Edit: April 18, 2006, 08:34:33 am by telemetric_au »
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #33 on: April 18, 2006, 08:44:59 am »
Just to make life even more sweet, i just set the OPZ GUI network interefaces setup for usbd0 to DHCP,
took it out the cradle put it back in, waited a bit, closed and opened the config applet (to refresh) and it's now been assigned an ip from my router !!

and just to check can still ping www.google.com

-and the package manager has started working , just updated the package list and about to start checkin' the feed  
« Last Edit: April 18, 2006, 08:49:04 am by telemetric_au »
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #34 on: April 28, 2006, 07:25:18 pm »
i just added an updated bridging guide to  the wiki:

https://www.oesf.org/index.php?title=Generi...and_Bridging%29
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Usb Connection Howto
« Reply #35 on: April 29, 2006, 06:03:21 pm »
Please add stuff to the official OZ wiki: http://openzaurus.berlios.de/

Thanks


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

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #36 on: April 29, 2006, 06:25:16 pm »
trying to do it now, but the server is soooo slow...

would also like to be able to upoad images...
« Last Edit: April 29, 2006, 06:30:08 pm by telemetric_au »
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

NickNak

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • http://www.basilisk.uklinux.net
Usb Connection Howto
« Reply #37 on: May 01, 2006, 04:17:42 pm »
I have run into problems with my bridging setup:  I can log into my SL-5500 using ssh, ping hosts on the internet, download small files using wget, but if I try to download anything bigger than about 1k I get "no response from the server".  I have noticed that usb0 on the desktop gets an MTU of 1494 whereas usbd0 at the other end on the Zaurus gets an MTU of 1500. I can't increase usb0 to 1500 on the desktop, but if I decrease usbd0 to 1494 on the Z ('ifconfig usbd0 mtu 1494') the problem is fixed.  My question is: why doesn't this 'just work'?  Why do usb0 and usbd0 get different MTUs? Is there a bug somewhere, or is there something wrong with my setup?
« Last Edit: May 02, 2006, 02:57:19 pm by NickNak »
SL-5500 OZ3.5.4 (Opie)
Gentoo

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #38 on: May 02, 2006, 07:09:19 pm »
sorry, but i have no experience with that problem ... i have seen mention of it elsewhere, either in the wiki or on the boards...
« Last Edit: May 02, 2006, 07:30:03 pm by telemetric_au »
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

7_feet_up

  • Newbie
  • *
  • Posts: 27
    • View Profile
    • http://
Usb Connection Howto
« Reply #39 on: May 03, 2006, 06:32:57 am »
Quote
I have run into problems with my bridging setup:  I can log into my SL-5500 using ssh, ping hosts on the internet, download small files using wget, but if I try to download anything bigger than about 1k I get "no response from the server".  I have noticed that usb0 on the desktop gets an MTU of 1494 whereas usbd0 at the other end on the Zaurus gets an MTU of 1500. I can't increase usb0 to 1500 on the desktop, but if I decrease usbd0 to 1494 on the Z ('ifconfig usbd0 mtu 1494') the problem is fixed.  My question is: why doesn't this 'just work'?  Why do usb0 and usbd0 get different MTUs? Is there a bug somewhere, or is there something wrong with my setup?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
I don't know what causes the necessity to shrink the mtu, but the issue has been described before [a href=\"http://www.linux-usb.org/usbnet/]on the usbnet driver page[/url] and already has been reported on the kernel bugzilla. I certainly would consider it a bug, either on the zaurus side, or on the desktop side.
Zaurus SL-5600
OpenZaurus 3.5.4.2-rc2
Wireless LAN CF Card NL-2511CF MERCURY
Destinator CF GPS receiver
PEAK Compact Flash Card 512MB
SanDisk Standard SD Card 64 MB
Brandless SD Card 1 GB
Sharp Zaurus SL5500 3E-Piel Frama Luxury Black Tan leather PDA case
PSP Battery Pack PW-2992p

NickNak

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • http://www.basilisk.uklinux.net
Usb Connection Howto
« Reply #40 on: May 04, 2006, 05:54:42 pm »
The "USB Networking" howto submitted by telemetric_au seems to be Debian-specific, maybe the title should reflect that.  I have just added a Gentoo-specific howto: http://openzaurus.berlios.de/HowTos/Bridging_with_Gentoo which includes a workaround for the MTU problem I mention above.
SL-5500 OZ3.5.4 (Opie)
Gentoo

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #41 on: May 04, 2006, 07:04:07 pm »
Quote
The "USB Networking" howto submitted by telemetric_au seems to be Debian-specific, maybe the title should reflect that.  I have just added a Gentoo-specific howto: http://openzaurus.berlios.de/HowTos/Bridging_with_Gentoo which includes a workaround for the MTU problem I mention above.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=125779\"][{POST_SNAPBACK}][/a][/div]


would like to get a look at that, but the server wont even load the page...

i do mention what system its setup on...

will look into it more though when can load your page...

good to hear you got it worked
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Usb Connection Howto
« Reply #42 on: May 04, 2006, 07:20:20 pm »
NickNak:

fixed up my title to debian rather than generic,

and gave a link to your page ...

nice guide, i didnt realise there was such difference between the systems...

thanks
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

benplaut

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Usb Connection Howto
« Reply #43 on: July 18, 2006, 10:51:52 pm »
waiting for an arch tutorial, all you arch users hidden in the shadows

anyway, if i figure it out, i'll post

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Usb Connection Howto
« Reply #44 on: July 19, 2006, 06:32:13 am »
If someone fancies tidying up the info in this thread and adding it to the OZ wiki (http://openzaurus.berlios.de/ or http://wiki.openzaurus.org/), that would be useful.


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