Toon posts:

[Debian] Kiiro mp3 speler via usb...

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo!!

Ik probeer mijn removable hdd/ mp3 speler via debian met een usb kabel te benaderen...
Dit gaat niet helemaal zoals het moet en ik kan er ook helemaal niks over vinden op het internet...

Ik laad de modules:
- usbcore
- usb-uhci
- usb-storage

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Module                  Size  Used by    Tainted: P  
usb-storage            43156   0  (unused)
NVdriver             1064864  10  (autoclean)
ide-cd                 27108   0  (autoclean)
cdrom                  28896   0  (autoclean) [ide-cd]
usb-uhci               21516   0  (unused)
usbcore                62624   1  [usb-storage usb-uhci]
ide-scsi                7632   0 
8139too                13928   1 
mii                     1120   0  [8139too]
via82cxxx_audio        18456   0  (unused)
uart401                 6148   0  [via82cxxx_audio]
ac97_codec              9992   0  [via82cxxx_audio]
sound                  54284   0  [via82cxxx_audio uart401]
rtc                     5948   0  (autoclean)


Dan plug ik de mp3 speler er aan en dan merkt hotplug wel wat:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Sep 17 18:41:20 BlueDog kernel: hub.c: USB new device connect on bus2/1, assigned device number 2
Sep 17 18:41:20 BlueDog kernel: Manufacturer: Sigmatel, Inc.
Sep 17 18:41:20 BlueDog kernel: Product: STMP3400
Sep 17 18:41:20 BlueDog kernel: usb.c: USB device 2 (vend/prod 0x66f/0x3400) is not claimed by any active driver.
Sep 17 18:41:20 BlueDog kernel:   Length              = 18
Sep 17 18:41:20 BlueDog kernel:   DescriptorType      = 01
Sep 17 18:41:20 BlueDog kernel:   USB version         = 1.10
Sep 17 18:41:20 BlueDog kernel:   Vendor:Product      = 066f:3400
Sep 17 18:41:20 BlueDog kernel:   MaxPacketSize0      = 64
Sep 17 18:41:20 BlueDog kernel:   NumConfigurations   = 1
Sep 17 18:41:20 BlueDog kernel:   Device version      = 0.03
Sep 17 18:41:20 BlueDog kernel:   Device Class:SubClass:Protocol = 00:00:00
Sep 17 18:41:20 BlueDog kernel:     Per-interface classes
Sep 17 18:41:20 BlueDog kernel: Configuration:
Sep 17 18:41:20 BlueDog kernel:   bLength             =    9
Sep 17 18:41:20 BlueDog kernel:   bDescriptorType     =   02
Sep 17 18:41:20 BlueDog kernel:   wTotalLength        = 0020
Sep 17 18:41:20 BlueDog kernel:   bNumInterfaces      =   01
Sep 17 18:41:20 BlueDog kernel:   bConfigurationValue =   01
Sep 17 18:41:20 BlueDog kernel:   iConfiguration      =   00
Sep 17 18:41:20 BlueDog kernel:   bmAttributes        =   c0
Sep 17 18:41:20 BlueDog kernel:   MaxPower            =  100mA
Sep 17 18:41:20 BlueDog kernel: 
Sep 17 18:41:20 BlueDog kernel:   Interface: 0
Sep 17 18:41:20 BlueDog kernel:   Alternate Setting:  0
Sep 17 18:41:20 BlueDog kernel:     bLength             =    9
Sep 17 18:41:20 BlueDog kernel:     bDescriptorType     =   04
Sep 17 18:41:20 BlueDog kernel:     bInterfaceNumber    =   00
Sep 17 18:41:20 BlueDog kernel:     bAlternateSetting   =   00
Sep 17 18:41:20 BlueDog kernel:     bNumEndpoints       =   02
Sep 17 18:41:20 BlueDog kernel:     bInterface Class:SubClass:Protocol =   ff:01:ff
Sep 17 18:41:20 BlueDog kernel:     iInterface          =   00
Sep 17 18:41:20 BlueDog kernel:     Endpoint:
Sep 17 18:41:20 BlueDog kernel:       bLength             =    7
Sep 17 18:41:20 BlueDog kernel:       bDescriptorType     =   05
Sep 17 18:41:20 BlueDog kernel:       bEndpointAddress    =   01 (out)
Sep 17 18:41:20 BlueDog kernel:       bmAttributes        =   02 (Bulk)
Sep 17 18:41:20 BlueDog kernel:       wMaxPacketSize      = 0040
Sep 17 18:41:20 BlueDog kernel:       bInterval           =   00
Sep 17 18:41:20 BlueDog kernel:     Endpoint:
Sep 17 18:41:20 BlueDog kernel:       bLength             =    7
Sep 17 18:41:20 BlueDog kernel:       bDescriptorType     =   05
Sep 17 18:41:20 BlueDog kernel:       bEndpointAddress    =   82 (in)
Sep 17 18:41:20 BlueDog kernel:       bmAttributes        =   02 (Bulk)
Sep 17 18:41:20 BlueDog kernel:       wMaxPacketSize      = 0040
Sep 17 18:41:20 BlueDog kernel:       bInterval           =   00
Sep 17 18:41:20 BlueDog /sbin/hotplug: arguments (usb) env (DEVFS=/proc/bus/usb OLDPWD=/ PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ DEVICE=/proc/bus/usb/002/002 INTERFACE=255/1/255 PRODUCT=66f/3400/3 TYPE=0/0/0 DEBUG=kernel _=/usr/bin/env)
Sep 17 18:41:20 BlueDog /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
Sep 17 18:41:23 BlueDog /etc/hotplug/usb.agent: ... no modules for USB product 66f/3400/3


Zoals jullie al wel kunnen lezen find ie geen modules voor usb product 66f/3400/3

en 'cat /proc/bus/usb/devices' zegt:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d800
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=066f ProdID=3400 Rev= 0.03
S:  Manufacturer=Sigmatel, Inc.
S:  Product=STMP3400
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=ff Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms


Iemand een idee wat ik kan doen????? Wat ik word er 8)7 (eigenlijk niet maar ik vond het een coole smilie!! :P)
Heeeeeeeeeeeeeeeeeelp..

Verwijderd

Topicstarter
hmm.. ik ben maar begonnen met mijn eigen driver...
Nu moet ik alleen weten welke variables ik nodig denk te hebben...
Wat denken jullie..
(kies maar een aantal uit het volgende rijtje!)

#define US_FL_SINGLE_LUN 0x00000001 /* allow access to only LUN 0 */
#define US_FL_MODE_XLATE 0x00000002 /* translate _6 to _10 commands for Win/MacOS compatibility */
#define US_FL_START_STOP 0x00000004 /* ignore START_STOP commands */
#define US_FL_IGNORE_SER 0x00000010 /* Ignore the serial number given */
#define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */
#define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs fixing */

En graag 1 keuze uit het volgende rijtje.. :) (is net een spelletje.. )

/* Protocols */

#define US_PR_CBI 0x00 /* Control/Bulk/Interrupt */
#define US_PR_CB 0x01 /* Control/Bulk w/o interrupt */
#define US_PR_BULK 0x50 /* bulk only */

(BEDANKT!!)

  • deadinspace
  • Registratie: Juni 2001
  • Laatst online: 17-05 14:06

deadinspace

The what goes where now?

:D
Help, mijn MP3 player werktnie!
..
Nou, dan maak ik zelluf wel een driver!

Voeg eens aan /etc/hotplug/usb.usermap de volgende regel toe:
code:
1
usb-storage 0x00 0x066f 0x3400 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

Restart dan hotplug, stop je apparaat er nog eens in en kijk naar de logs (messages en daemon.log).

Verwijderd

Topicstarter
okee.... gedaan...
In daemon.log staat niks over usb, en in messages het volgende:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Sep 18 15:09:48 BlueDog kernel: hub.c: USB new device connect on bus2/1, assigne                                                       d device number 2
Sep 18 15:09:48 BlueDog kernel: Manufacturer: Sigmatel, Inc.
Sep 18 15:09:48 BlueDog kernel: Product: STMP3400
Sep 18 15:09:48 BlueDog kernel: usb.c: USB device 2 (vend/prod 0x66f/0x3400) is                                                        not claimed by any active driver.
Sep 18 15:09:48 BlueDog kernel:   Length              = 18
Sep 18 15:09:48 BlueDog kernel:   DescriptorType      = 01
Sep 18 15:09:48 BlueDog kernel:   USB version         = 1.10
Sep 18 15:09:48 BlueDog kernel:   Vendor:Product      = 066f:3400
Sep 18 15:09:48 BlueDog kernel:   MaxPacketSize0      = 64
Sep 18 15:09:48 BlueDog kernel:   NumConfigurations   = 1
Sep 18 15:09:48 BlueDog kernel:   Device version      = 0.03
Sep 18 15:09:48 BlueDog kernel:   Device Class:SubClass:Protocol = 00:00:00
Sep 18 15:09:48 BlueDog kernel:     Per-interface classes
Sep 18 15:09:48 BlueDog kernel: Configuration:
Sep 18 15:09:48 BlueDog kernel:   bLength             =    9
Sep 18 15:09:48 BlueDog kernel:   bDescriptorType     =   02
Sep 18 15:09:48 BlueDog kernel:   wTotalLength        = 0020
Sep 18 15:09:48 BlueDog kernel:   bNumInterfaces      =   01
Sep 18 15:09:48 BlueDog kernel:   bConfigurationValue =   01
Sep 18 15:09:48 BlueDog kernel:   iConfiguration      =   00
Sep 18 15:09:48 BlueDog kernel:   bmAttributes        =   c0
Sep 18 15:09:48 BlueDog kernel:   MaxPower            =  100mA
Sep 18 15:09:48 BlueDog kernel: 
Sep 18 15:09:48 BlueDog kernel:   Interface: 0
Sep 18 15:09:48 BlueDog kernel:   Alternate Setting:  0
Sep 18 15:09:48 BlueDog kernel:     bLength             =    9
Sep 18 15:09:48 BlueDog kernel:     bDescriptorType     =   04
Sep 18 15:09:48 BlueDog kernel:     bInterfaceNumber    =   00
Sep 18 15:09:48 BlueDog kernel:     bAlternateSetting   =   00
Sep 18 15:09:48 BlueDog kernel:     bNumEndpoints       =   02
Sep 18 15:09:48 BlueDog kernel:     bInterface Class:SubClass:Protocol =   ff:01                                                       :ff
Sep 18 15:09:48 BlueDog kernel:     iInterface          =   00
Sep 18 15:09:48 BlueDog kernel:     Endpoint:
Sep 18 15:09:48 BlueDog kernel:       bLength             =    7
Sep 18 15:09:48 BlueDog kernel:       bDescriptorType     =   05
Sep 18 15:09:48 BlueDog kernel:       bEndpointAddress    =   01 (out)
Sep 18 15:09:48 BlueDog kernel:       bmAttributes        =   02 (Bulk)
Sep 18 15:09:48 BlueDog kernel:       wMaxPacketSize      = 0040
Sep 18 15:09:48 BlueDog kernel:       bInterval           =   00
Sep 18 15:09:48 BlueDog kernel:     Endpoint:
Sep 18 15:09:48 BlueDog kernel:       bLength             =    7
Sep 18 15:09:48 BlueDog kernel:       bDescriptorType     =   05
Sep 18 15:09:48 BlueDog kernel:       bEndpointAddress    =   82 (in)
Sep 18 15:09:48 BlueDog kernel:       bmAttributes        =   02 (Bulk)
Sep 18 15:09:48 BlueDog kernel:       wMaxPacketSize      = 0040
Sep 18 15:09:48 BlueDog kernel:       bInterval           =   00
Sep 18 15:09:48 BlueDog /sbin/hotplug: arguments (usb) env (DEVFS=/proc/bus/usb                                                        OLDPWD=/ PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1                                                        HOME=/ DEVICE=/proc/bus/usb/002/002 INTERFACE=255/1/255 PRODUCT=66f/3400/3 TYPE=                                                       0/0/0 DEBUG=kernel _=/usr/bin/env)
Sep 18 15:09:48 BlueDog /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
Sep 18 15:09:52 BlueDog /etc/hotplug/usb.agent: Setup usb-storage for USB produc                                                       t 66f/3400/3
Sep 18 15:09:52 BlueDog kernel: Initializing USB Mass Storage driver...
Sep 18 15:09:52 BlueDog kernel: usb.c: registered new driver usb-storage
Sep 18 15:09:52 BlueDog kernel: scsi1 : SCSI emulation for USB Mass Storage devi                                                       ces
Sep 18 15:10:13 BlueDog mc: /dev/gpmctl: No such file or directory
Sep 18 15:10:24 BlueDog kernel: usb.c: USB disconnect on device 2
Sep 18 15:10:24 BlueDog /sbin/hotplug: arguments (usb) env (DEVFS=/proc/bus/usb                                                        OLDPWD=/ PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=remove PWD=/etc/hotplug SHLVL                                                       =1 HOME=/ DEVICE=/proc/bus/usb/002/002 INTERFACE=255/1/255 PRODUCT=66f/3400/3 TY                                                       PE=0/0/0 DEBUG=kernel _=/usr/bin/env)
Sep 18 15:10:24 BlueDog /sbin/hotplug: invoke /etc/hotplug/usb.agent ()
Sep 18 15:10:24 BlueDog kernel: hub.c: USB new device connect on bus2/1, assigne                                                       d device number 3
Sep 18 15:10:24 BlueDog kernel: Manufacturer: Sigmatel, Inc.
Sep 18 15:10:24 BlueDog kernel: Product: STMP3400
Sep 18 15:10:29 BlueDog kernel: usb-uhci.c: interrupt, status 2, frame# 1397
Sep 18 15:10:29 BlueDog kernel: scsi: device set offline - not ready or command                                                        retry failed after bus reset: host 1 channel 0 id 0 lun 0
Sep 18 15:10:29 BlueDog kernel: USB Mass Storage support registered.
Sep 18 15:10:29 BlueDog kernel: scsi2 : SCSI emulation for USB Mass Storage devices


Sep 18 15:10:24 BlueDog kernel: usb.c: USB disconnect on device 2
It wasn't me :?

Verwijderd

Topicstarter
en cat /proc/bus/usb/devices zegt nog steeds:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d800
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=066f ProdID=3400 Rev= 0.03
S:  Manufacturer=Sigmatel, Inc.
S:  Product=STMP3400
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=ff Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms

Verwijderd

Topicstarter
tsja.. dit werkt dus niet....

Nu het volgende.. ik heb usb.usermap zo gemaakt:

code:
1
2
# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
usb-storage           0x0380        0x06ff  0x3400     0x0000       0x0000        0x00          0x00              0x00          0xff            0x01              0xff              0x00000000

usb module is logisch.. ;)
Matchflags zou ik echt niet weten... In distmap staan 0x000f en 0x0380 dus ik denk dat ik ze alle twee ff test.. ;) :?
idVendor en idProduct is uittelezen in de logs.
Van bcdDevice_lo en bcdDevice_hi weet ik echt niet wat ze ermee bedoelen.. dus die heb ik maar op 0x0000 gehouden.. :?
bDeviceClass/SubClass/protocol zijn ook uit de logs te lezen.. (00:00:00) dus die zijn alle drie 0x00...
bInterfaceClass/SubClass/Protocol zijn ook weer in de logs uit te lezen.. (ff:01:ff)
En driver_info weet ik niet wat ik ermee moet doen.. dus die staat ook op de standaard 0x00000000.. :?

Iemand nog idee-en voor de dingen die ik niet weet????

Verwijderd

Topicstarter
perongeluk naartoe gesurft ;)

code:
1
2
3
4
USB_DEVICE (vendorId, productId)
... matching devices with specified vendor and product ids
USB_DEVICE_VER (vendorId, productId, lo, hi)
... like USB_DEVICE with lo <= productversion <= hi


bron: http://lxr.linux.no/source/Documentation/usb/hotplug.txt

die kan ik dus gewoon op 0x0000 (lo) en 0x9999 (hi) zetten.. ;)

  • deadinspace
  • Registratie: Juni 2001
  • Laatst online: 17-05 14:06

deadinspace

The what goes where now?

Verwijderd schreef op 18 september 2002 @ 17:10:
Matchflags zou ik echt niet weten... In distmap staan 0x000f en 0x0380 dus ik denk dat ik ze alle twee ff test.. ;) :?
Oh, 0x0003 staat er ook vaak (hier dan). Ik dacht eerst dat ik wist wat match_flags was, maar kheb me vergist.
En driver_info weet ik niet wat ik ermee moet doen.. dus die staat ook op de standaard 0x00000000.. :?
Mja, volgensmij zijn dat extra opties die aan de driver meegegeven worden oid... 0x00000000 lijkt me een veilige default.

  • deadinspace
  • Registratie: Juni 2001
  • Laatst online: 17-05 14:06

deadinspace

The what goes where now?

Hmm, google eens op "linux mp3 Sigmatel usb". Zitten dingen tussen die misschien van belang zijn (weet jij waarschijnlijk beter dan ik, ik weet niet eens precies wat je nou hebt).
Pagina: 1