Author Topic: 2.6.6/connectivity/hotplug/etc  (Read 5697 times)

beak

  • Newbie
  • *
  • Posts: 8
    • View Profile
2.6.6/connectivity/hotplug/etc
« on: May 30, 2004, 10:28:50 pm »
Hello all,

I\'m going to be getting an SL-5500 in a few days (shipping right now), and I\'d like to connect it to my Linux machine. As we speak, I\'m upgrading from 2.6.5 to 2.6.6 and I included the Zaurus stock ROM support under USB. Now, my questions are as follows:

1.) Besides the USB support for the Zaurus ROMs, what, if any, kernel parameters are necessary for connecting the Zaurus to my PC (so that I can sync [see question 3], browse the internet [through tunneling or masq.? I\'m not familiar to either], etc.)

2.) After question 1 is sucessfully answered, I would like to be able to hotplug this baby right into the cradle and have it get an IP. How can I do this?

3.) I\'d like to be able to use this PDA as a, well, PDA. I understand that Sharp made the mortal mistake of not supporting sync with Linux while basing their PDA on Linux. How does one do this, or does the 2.6.6 kernel\'s Zaurus support fix this issue?

Thanks for any info you can give me. I ordered the PDA Thursday night and it\'s supposed to take a few more days; UPS doesn\'t ship on Saturday, Sunday or Memorial Day, so I\'m itching for it to arrive

EDIT: If it helps anyone, I\'m using Slackware 9.1, so any help you give me should be of help to anyone running anything, not just a Debian or RPM fix  8)

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
2.6.6/connectivity/hotplug/etc
« Reply #1 on: May 31, 2004, 12:39:01 am »
1) You will need to compile you kernal (pc) with usbnet support, the 2.6.x kernels have an option for zaurus type devices - your choice whether you do modules or compile in the kernel. THat and installing hotplug was all I needed to connect me C760 to Gentoo 2.6.x (currently 2.6.7_rc2)

2) When you set up the Z to use USB over TCP/IP (USB net) then you give it an ip - no hotpluging needed here - although I do have hotplug add a default route to my desktop so I can search internet over usb. My desktop is set up to load the usbnet module and give /dev/usb0 an ip (192.168.201.1) - my firewall is set to allow portforwarding on this subnet already. Don\'t have the hotplug script here but will post it when I get home (if someone doesn\'t bet me to it)

3) The kernel has nothing to do with the non-sync-ability of the Z on linux - it\'s Sharp\'s choosing to use a proprietory database for the PIM apps and only releasing a version of qtopia-desktop that can read this database for Windoze. If you change to Ko/PI then you can happily sync your calendar. I also use ssh, scp and rsync for copying other files to/from the desktop and Z.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

beak

  • Newbie
  • *
  • Posts: 8
    • View Profile
2.6.6/connectivity/hotplug/etc
« Reply #2 on: June 04, 2004, 10:33:03 pm »
Hmm, I must be doing something wrong here. \"ifconfig usb0 192.168.201.1 netmask 255.255.255.0 up\" yields that usb0 doesn\'t exist as a network interface. Maybe I\'m just being dense, but I don\'t know what I should do!

I\'m running 2.6.6 on my desktop. dmesg tells me nothing.           lsmod:         usbnet                 16072  0
usbcore               107732  1 usbnet
crc32                   4352  1 usbnet

And finally, the ifconfig message...

ifconfig usb0 192.168.201.1 netmask 255.255.255.0 up
SIOCSIFADDR: No such device
usb0: unknown interface: No such device
SIOCSIFNETMASK: No such device
usb0: unknown interface: No such device

Oh, and btw, I didn\'t configure the Zaurus at all, besides what was needed...help!

whit

  • Full Member
  • ***
  • Posts: 145
    • View Profile
2.6.6/connectivity/hotplug/etc
« Reply #3 on: June 05, 2004, 12:53:07 pm »
Quote
1) You will need to compile you kernal (pc) with usbnet support, the 2.6.x kernels have an option for zaurus type devices


So that would be \"Multi-purpose USB Networking Framework\" plus \"Sharp Zaurus (stock ROMs)\" and perhaps \"Embedded ARM Linux links (iPaq, ...)\"? From the notes, looks like that second one may be more appropriate for alternate ROMs?

beak

  • Newbie
  • *
  • Posts: 8
    • View Profile
2.6.6/connectivity/hotplug/etc
« Reply #4 on: June 06, 2004, 01:34:55 pm »
I already posted this on another thread, but here goes!

I finally got it to work!

This is how you can connect the Zaurus SL-5500 to your 2.6.6 and beyond computer via the USB docking cradle.

1.) You\'ll need to make sure that your kernel (on your computer) supports both USB and the Sharp Stock ROM image (or, if your SL-5500 has another ROM, such as OpenZaurus, then support for the ARM devices). Make sure that you enable, at a minimum, the following:

A.) Support for host-side USB (CONFIG_USB)
B.) Controller Interface Support *I compiled using modules and never loaded! That was the problem
i.) EHCI HCD
ii.) OHCI HCD
iii.) UHCI HCD
C.) Multi-purpose USB Networking Framework
i.) Sharp Zaurus (stock ROMs)

There are other things that I enabled, such as USB_DEVICEFS, but I\'m unsure if they make a difference. I don\'t think they do, but then again, I think rain is wet

2.) Now, with your shiny new kernel, under root, and assuming you compiled using modules...under your computer...

root@galadriel:~# modprobe usbnet
root@galadriel:~# modprobe modprobe [u, o, e]hci_hcd
root@galadriel:~# ifconfig usb0 192.168.3.2 up
root@galadriel:~#

Now, under your Zaurus...this might get a little tricky. If you cheated like I did and sent the terminal program over to the PDA with a Windows machine, then you should make sure that usbdcore and net_fd are enabled. If they aren\'t, then modprobe them into the PDA.

After making sure those modules are there, then do the following:

bash-2.05# ifconfig usbd0 192.168.3.1 up
bash-2.05#

If you can ping 192.168.3.1 from your computer and 192.168.3.2 from your PDA, then you\'re connected!

It should be pretty much the same way with the Network & Sync...under Services, select USB. Specify the TCP/IP info information, and set your IP as 192.168.3.1. Broadcast is 192.168.3.255. I think I put the gateway as 192.168.3.2, but someone may want to check that out.

Anyway, I got it working! Whooo!

whit

  • Full Member
  • ***
  • Posts: 145
    • View Profile
2.6.6/connectivity/hotplug/etc
« Reply #5 on: June 06, 2004, 03:42:46 pm »
Quote
Make sure that you enable, at a minimum, the following:

A.) Support for host-side USB (CONFIG_USB)
B.) Controller Interface Support *I compiled using modules and never loaded! That was the problem
i.) EHCI HCD
ii.) OHCI HCD
iii.) UHCI HCD
C.) Multi-purpose USB Networking Framework
i.) Sharp Zaurus (stock ROMs)


Happy to see you\'ve got it working. Thanks for posting the recipe.

I\'ve got all those compiled in (not modules), have rebooted with this kernel, yet I have no usb0 device. Was there a trick to create that?

Later: - ah, I see, it only exists on either device if the cable is plugged in. Unlike, say, eth0 which exists whether-or-not there\'s a cable plugged in to the eth0 nic. (I hate it when behavioral inconsistencies are added in the name of programming \'cleverness\' - silly kernel developers  :?)

beak

  • Newbie
  • *
  • Posts: 8
    • View Profile
2.6.6/connectivity/hotplug/etc
« Reply #6 on: June 06, 2004, 06:05:24 pm »
Well...I now have YET another problem. Hotplugging. Stubear, if it isn\'t too much to ask, could you post that hotplug script? I\'m lost at what I should do...

ecloud

  • Newbie
  • *
  • Posts: 1
    • View Profile
2.6.6/connectivity/hotplug/etc
« Reply #7 on: August 26, 2004, 09:09:52 pm »
I'm on Gentoo, and all I really had to do was add an /etc/init.d/net.usb0 script (copy from net.lo and modify accordingly):

start() {
        ebegin "Bringing ${IFACE} up"
        /sbin/ifconfig ${IFACE} 192.168.129.200 up 2>/dev/null
        eend 0
}

stop() {
        ebegin "Bringing ${IFACE} down"
        /sbin/ifconfig ${IFACE} down &>/dev/null
        eend 0
}

and add to /etc/conf.d/net the following:

iface_usb0="192.168.129.200 broadcast 192.168.129.255 netmask 255.255.255.0"

AFAICT, hotplug automatically loads the usbnet module, the module claims the Zaurus and creates the usb0 network interface (you can see it with ifconfig -a even if it's not properly configured), and then /etc/hotplug/net.agent runs the /etc/init.d/net.usb0 script.