Hello,

I want to use a Speedtouch 330 ADSL modem with a ASUS WL-500gP router 
running OpenWrt embedded distribution. To be more precise I'm running 
Kamikaze version, which comes with kernel-2.6.19.2.

I've compiled everything I though was necessary as a module:
hotplug2 - 0.9-1
kmod-atm - 2.6.19.2-brcm47xx-1
kmod-usb-core - 2.6.19.2-brcm47xx-1
kmod-usb-speedtouch - 2.6.19.2-brcm47xx-1
kmod-usb-uhci - 2.6.19.2-brcm47xx-1
udevtrigger - 106-1

My modem is a black one, so it's rev. 4.0:
[EMAIL PROTECTED]:~# awk '/4061/ { print $5 }' /proc/bus/usb/devices
4.00

I've uploaded the firmware in the right location:
[EMAIL PROTECTED]:~# ls -al /lib/firmware/
-rw-r--r--    1 root     root          935 Jan  1 00:12 speedtch-1.bin
-rw-r--r--    1 root     root       775545 Jan  1 00:12 speedtch-2.bin

At boot time I get the following messages:
ssb: Core 3 found: USB 1.1 Hostdev (cc 0x808, rev 0x02, vendor 0x4243)
[...]
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
[...]
USB Universal Host Controller Interface driver v3.0
PCI: Enabling device 0000:00:03.0 (0000 -> 0001)
PCI: Fixing up device 0000:00:03.0
uhci_hcd 0000:00:03.0: UHCI Host Controller
uhci_hcd 0000:00:03.0: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:03.0: irq 6, io base 0x00000100
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
PCI: Enabling device 0000:00:03.1 (0000 -> 0001)
PCI: Fixing up device 0000:00:03.1
uhci_hcd 0000:00:03.1: UHCI Host Controller
uhci_hcd 0000:00:03.1: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:03.1: irq 6, io base 0x00000120
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver speedtch

Here is the output from lspci:
[EMAIL PROTECTED]:~# lspci
00:00.0 Host bridge: Broadcom Corporation BCM4704 PCI to SB Bridge
00:02.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 
54g] 802.11g Wireless LAN Controller (rev 02)
00:03.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (rev 61)
00:03.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (rev 61)
00:03.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 63)
[EMAIL PROTECTED]:~# lspci -s 00:03.0 -G -v
Trying method 1......cannot open /sys/bus/pci...No.
Trying method 2......using /proc/bus/pci...OK
Decided to use Linux-proc
00:03.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (rev 61) (prog-if 00 [UHCI])
         Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
         Flags: bus master, medium devsel, latency 22, IRQ 6
         I/O ports at 0100 [size=32]
         Capabilities: [80] Power Management version 2

[EMAIL PROTECTED]:~# lspci -s 00:03.1 -G -v
Trying method 1......cannot open /sys/bus/pci...No.
Trying method 2......using /proc/bus/pci...OK
Decided to use Linux-proc
00:03.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (rev 61) (prog-if 00 [UHCI])
         Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
         Flags: bus master, medium devsel, latency 22, IRQ 6
         I/O ports at 0120 [size=32]
         Capabilities: [80] Power Management version 2

The modules look like this:
[EMAIL PROTECTED]:~# lsmod
Module                  Size  Used by    Tainted: P
speedtch               10000  0
usbatm                 13952  1 speedtch
uhci_hcd               18480  0
ath_pci                68288  0
wlan_xauth               480  0
wlan_wep                4320  0
wlan_tkip               9984  0
wlan_ccmp               5856  0
wlan_acl                2208  0
ath_rate_sample         8000  1 ath_pci
ath_hal               222016  2 ath_pci,ath_rate_sample
wlan_scan_sta           8224  0
wlan_scan_ap            2720  0
wlan                  135488  9 
ath_pci,wlan_xauth,wlan_wep,wlan_tkip,wlan_ccmp,wlan_acl,ath_rate_sample,wlan_scan_sta,wlan_scan_ap
ip_conntrack_tftp       1680  0
ip_nat_irc               960  0
ip_conntrack_irc        2832  1 ip_nat_irc
ip_nat_ftp              1696  0
ip_conntrack_ftp        4016  1 ip_nat_ftp
ppp_async               9504  0
ppp_generic            20480  1 ppp_async
slhc                    5472  1 ppp_generic
crc_ccitt               1024  1 ppp_async
br2684                  5616  0
atm                    43056  2 usbatm,br2684
usbcore               102016  4 speedtch,usbatm,uhci_hcd
switch_robo             4048  0
switch_core             5056  1 switch_robo
diag                    7696  0

But when I plugin the modem I get the following messages:
[EMAIL PROTECTED]:~# dmesg | tail
usb 1-2: new full speed USB device using uhci_hcd and address 2
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: reset full speed USB device using uhci_hcd and address 2
speedtch 1-2:1.0: speedtch_find_firmware: no stage 1 firmware found!

As you can see from above, I'm using hotplug2 instead of udev, because I 
think it's better fitted for the an embedded environment. But I also 
think this is the source of my problems. Now I've done some research 
about hotplug2 on OpenWrt and here is what I've found.

First, in /etc/init.d/boot there are some lines that starts hotplug2 as 
a daemon at boot time;
/sbin/hotplug2 --persistent --max-children 1 &

echo /sbin/hotplug-call > /proc/sys/kernel/hotplug

The script /sbin/hotplug-call is called whenever the kernel detects a 
new device. Now I've modified this script to get some debugging messages.

# begin /sbin/hotplug-call
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org

export HOTPLUG_TYPE="$1"

# bypass the normal hotplug path for firmware loading
# would otherwise cause problems with drivers like bcm43xx
[ "$HOTPLUG_TYPE" = "firmware" -a "$ACTION" = "add" ] && {
         echo "/sbin/hotplug-call :: $FIRMWARE :: $DEVPATH">>/var/log/mesaje
         [ -f "/lib/firmware/$FIRMWARE" ] && {
                 echo "/sbin/hotplug-call :: /lib/firmware/$FIRMWARE 
exists">>/var/log/mesaje
                 echo 1 > "/sys$DEVPATH/loading"
                 cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
                 echo 0 > "/sys$DEVPATH/loading"
         }
         exit 0
}

. /etc/functions.sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin
LOGNAME=root
USER=root
export PATH LOGNAME USER

[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
         for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
                 [ -f $script ] && . $script
         ); done
}
# end /sbin/hotplug-call

After plugging the modem I get the following output in the file 
/var/log/mesaje:

[EMAIL PROTECTED]:~# cat /var/log/mesaje
/sbin/hotplug-call :: speedtch-1.bin.4.00 :: /class/firmware/1-2:1.0
/sbin/hotplug-call :: speedtch-1.bin.4 :: /class/firmware/1-2:1.0
/sbin/hotplug-call :: speedtch-1.bin :: /class/firmware/1-2:1.0
/sbin/hotplug-call :: /lib/firmware/speedtch-1.bin exists

So everything looks fine, except the files in /sys are not created and 
the firmware is not copied there.
/sys/class/firmware/1-2:1.0/loading - does not exists

The rules for hotplug2 are stored in the file /etc/hotplug2.rules, which 
contains the following lines:

# begin /etc/hotplug2.rules,
DEVICENAME ~~ (tun|tap[0-9]) {
         makedev /dev/net/%DEVICENAME% 0644
         next
}

DEVPATH is set {
                         makedev /dev/%DEVICENAME% 0644
}

MODALIAS is set {
                         exec /sbin/modprobe -q %MODALIAS% ;
}
# end /etc/hotplug2.rules

I guess these rules should be responsible for loading the firmware, but 
I don't see how they are doing it. I'm inexperienced with both udev and 
hotplug2, so I don't know how these rules should look like.


If you can help me, please drop me a line.

Here is the same problem on openwrt forum:
http://forum.openwrt.org/viewtopic.php?id=10204

Here is hotplug2 homepage:
http://isteve.bofh.cz/~isteve/hotplug2/

Thank you,
Radu.

Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]

        

Reply via email to