You are not logged in.

#1 2018-04-12 12:35:49

CodeAsm
Member
From: The Netherlands
Registered: 2014-04-16
Posts: 17
Website

[SOLVED] (somewhat solved) USB Storage device not recognized.

EDIT: I guess I need to write my own drivers/kernel module.


Hello hi,

Normaly I google and search before I go ask questions. including searching on stackoverflow(and friends). But now I do not know what the best course of action is.
I have a few Xbox (classic) memory units, dont let the name fool you, its basicly normal usb storage devices that are normaly arround 8mb in size.

lsusb

ID 045e:0280 Microsoft Corp. Xbox Memory Unit (8MB)

dmesg

[82388.546902] usb 1-1.2.2: new full-speed USB device number 35 using ehci-pci
[82388.625731] usb 1-1.2.2: New USB device found, idVendor=045e, idProduct=0280
[82388.625735] usb 1-1.2.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0

if more or other output is required, ill post those.

On my laptop, normal usb devices work fine, usb sticks, usb harddisks or external cdrom players, all work fine. I am using a XBox controller (with a usb cable) as a means to connect the odd shaped usb connector to my laptop (its basicly USB, power, data+ and data- and the regual ground (ignoring the yellow wire)). the Controller works both in Steam and usb forwarded to Xqemu (xbox emulator based on qemu). the memory unit seems to kinda work in this forwarding mode, but I would want to read it with say a hexeditor or copy data off with dd.

My question
Is it posible to make the kernel, Linux (wich is Arch 4.15.15-1-ARCH), udev rule or whatever modification I need to make in a kernel module to get a /dev/sd[number] or similiar?

When using a normal usb stick, inserted into the xbox, it will format it and it will work on the xbox and on the PC. but I guess the VID and PID doesnt match any of the standard stuff the kernel would expect or some product identifier is missing? I just want to dd a copy of this memory unit and/or modify bytes on it. I do not require partitioning or formatting, but if those are also there when its detected, fine.

(for Windows XP there is a hacked driver availeble to make it apear as a usb storage device)

I hope someone has a trick for me to get me reading and writing to these devices. if I need to explore the FATX filesystem, I would probably use this: https://github.com/mborgerson/fatx or even modify it to work on the FATX variant used on Memory units.

Im sure we could asume its just a usb storage device, yet it isnt detected as one.

Last edited by CodeAsm (2018-04-16 09:27:25)

Offline

#2 2018-04-12 13:38:46

citecite
Member
Registered: 2018-03-29
Posts: 8

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

Is the kernel module for USB storage loaded? You can check that with:

lsmod | grep usb_storage

If the module is not loaded, can you load it?

modprobe usb_storage

If this succeeds, what is the output of:

journalctl -k | tail -n10

Offline

#3 2018-04-12 14:51:40

CodeAsm
Member
From: The Netherlands
Registered: 2014-04-16
Posts: 17
Website

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

citecite wrote:

Is the kernel module for USB storage loaded?

it wasnt, now it is

citecite wrote:
journalctl -k | tail -n10
Apr 12 16:46:16 LAPTOP kernel: usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Apr 12 16:46:16 LAPTOP kernel: hub 1-1.2:1.0: USB hub found
Apr 12 16:46:16 LAPTOP kernel: hub 1-1.2:1.0: 3 ports detected
Apr 12 16:46:16 LAPTOP kernel: usb 1-1.2.1: new full-speed USB device number 41 using ehci-pci
Apr 12 16:46:16 LAPTOP kernel: usb 1-1.2.1: New USB device found, idVendor=045e, idProduct=0289
Apr 12 16:46:16 LAPTOP kernel: usb 1-1.2.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Apr 12 16:46:16 LAPTOP kernel: input: Microsoft X-Box pad v2 (US) as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1:1.0/input/input40
Apr 12 16:46:16 LAPTOP kernel: usb 1-1.2.2: new full-speed USB device number 42 using ehci-pci
Apr 12 16:46:16 LAPTOP kernel: usb 1-1.2.2: New USB device found, idVendor=045e, idProduct=0280
Apr 12 16:46:16 LAPTOP kernel: usb 1-1.2.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0

(edit) I rebooted, to see if it would solve any thing. the module is again not loaded and after reloading that, the same (similiar) output as above.

Last edited by CodeAsm (2018-04-12 15:12:03)

Offline

#4 2018-04-13 06:49:32

citecite
Member
Registered: 2018-03-29
Posts: 8

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

I would have expected to at least get one entry like

Apr 12 15:34:19 hostname kernel: usbcore: registered new interface driver usb-storage

when the module loads. Are there ANY entries related to USB mass storage at all?

Furthermore, if you use the command (as root)

lsusb -v 2>/dev/null 

can you identify the memory unit? If so, could you either copy/paste it's description here, or let us know what the bInterfaceClass and bInterfaceSubClass entries are? There is a somewhat old thread over at linux-usb-users which seems to indicate that the device is NOT a normal USB mass storage device.

And last but not least, do other USB sticks work when connected to the replay adapter?

Offline

#5 2018-04-15 15:05:33

CodeAsm
Member
From: The Netherlands
Registered: 2014-04-16
Posts: 17
Website

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

No, I donot use a replay adapter, I do own one, but use a cheap aliexpress usb adapter: https://www.aliexpress.com/item/High-Qu … 66524.html (I do not know this seller and do not earn anything from giving this link.)

The Live communicator seems to be working when I plug it in (its even in the sound settings panel).

The following you asked:
bInterfaceClass  8 Mass Storage
bInterfaceSubClass     66

(this 66 is not Scsi(wich is just 6) but is this flipping the kernel? )

lsusb -v (and I cut everything except the memory unit, the controller its in (wich has a buildin hub)

Bus 001 Device 012: ID 045e:0280 Microsoft Corp. Xbox Memory Unit (8MB)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x045e Microsoft Corp.
  idProduct          0x0280 Xbox Memory Unit (8MB)
  bcdDevice            0.0e
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               60mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass     66 
      bInterfaceProtocol     80 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 011: ID 045e:0289 Microsoft Corp. Xbox Controller S
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x045e Microsoft Corp.
  idProduct          0x0289 Xbox Controller S
  bcdDevice            1.20
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        88 Xbox
      bInterfaceSubClass     66 Controller
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4

Bus 001 Device 010: ID 045e:0288 Microsoft Corp. Xbox Controller S Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0         8
  idVendor           0x045e Microsoft Corp.
  idProduct          0x0288 Xbox Controller S Hub
  bcdDevice            1.20
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval             255

Dint test usb sticks at the time again, but today I did, and they work.

First connected a xpad, then usb stick (USB DISK Pro) then a memoryunit in the lower port (upper gives same result)

journalctl -k | tail -n10
Apr 15 17:07:40 LAPTOP kernel: usb 1-4: new high-speed USB device number 8 using xhci_hcd
Apr 15 17:07:40 LAPTOP kernel: usb 1-4: New USB device found, idVendor=13fe, idProduct=3e23
Apr 15 17:07:40 LAPTOP kernel: usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 15 17:07:40 LAPTOP kernel: usb 1-4: Product: USB DISK Pro
Apr 15 17:07:40 LAPTOP kernel: usb 1-4: Manufacturer:         
Apr 15 17:07:40 LAPTOP kernel: usb 1-4: SerialNumber: 07BA(redacted)
Apr 15 17:07:40 LAPTOP kernel: usb-storage 1-4:1.0: USB Mass Storage device detected
Apr 15 17:07:40 LAPTOP kernel: scsi host6: usb-storage 1-4:1.0
Apr 15 17:07:41 LAPTOP kernel: scsi 6:0:0:0: Direct-Access              USB DISK Pro     PMAP PQ: 0 ANSI: 4
Apr 15 17:07:41 LAPTOP kernel: sd 6:0:0:0: Attached scsi generic sg3 type 0
Apr 15 17:07:42 LAPTOP kernel: usb 3-1.2.3: new full-speed USB device number 10 using ehci-pci
Apr 15 17:07:42 LAPTOP kernel: usb 3-1.2.3: New USB device found, idVendor=045e, idProduct=0280
Apr 15 17:07:42 LAPTOP kernel: usb 3-1.2.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0

With the USB stick attached (wich works) a xpad with memorycard still doesnt change dmesg output much or journal. no /dev/sd device for the memorycard device (or other).
I did forward the memory stick with xqemu, and it works fine, can see all the saves and read and write to it. but thats not from Linux, a driver/module isue I gues. hope someone can tell me where to look for to add support for this (weird) type of usb memory card.

Last edited by CodeAsm (2018-04-15 15:10:25)

Offline

#6 2018-04-15 15:44:01

14u2ponder
Banned
Registered: 2018-04-15
Posts: 17

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

Delete

Last edited by 14u2ponder (2020-09-12 22:46:19)

Offline

#7 2018-04-15 18:49:12

CodeAsm
Member
From: The Netherlands
Registered: 2014-04-16
Posts: 17
Website

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

14u2ponder wrote:

have you considered that the usb is broke? I really don't understand the convoluted question to begin with.

I understand your first thougth. Maybe my "convoluted" question isnt at place in the newbie corner. yet I have no real good experience with trying to get working drivers or module for new/old usb devices that dont work "out of the box".

So yeah, "convoluted" because I do know a few things arround Linux, and tried things myself. But I feel like a newbie arround hardware drivers and attacking a problem like this: My USB memory unit, the xbox memorycard does work, both in a real xbox and in xqemu(its qemu, assigning Host USB device to a Guest VM works fine).

But maybe I should go on IRC and ask some local Linux guru's to guide me. The question is less of a newb level an more of a "hardware support is missing, how to add it myself" questions. The newbie forums is maybe for easy questions aswell wink (14u2ponder, You might have convinced me im less of a linux noob and more of a "too desperatly want to use linux geek" wink )

Offline

#8 2018-04-16 01:58:43

14u2ponder
Banned
Registered: 2018-04-15
Posts: 17

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

Delete

Last edited by 14u2ponder (2020-09-12 22:46:49)

Offline

#9 2018-04-16 09:23:56

CodeAsm
Member
From: The Netherlands
Registered: 2014-04-16
Posts: 17
Website

Re: [SOLVED] (somewhat solved) USB Storage device not recognized.

14u2ponder wrote:

if you need an adapter to connect it to a usb port, it's not a usb.

It is USB.
(did you try to make sense out of my earlier posts and you got the idea of what I tried to say was: "it was not usb but I was trying to connect to it over usb anyway?" I dint, but sorry if I made you think I did try to say that. )

Anyway, I bougth, as seen in the Aliexpress link, an USB adapter cable. connect it to my PC, connect any Xbox device and it works.
I took a picture of the very memory unit I try to make work here:
https://i.imgur.com/cj3lTug.jpg

memory unit works as USB device under windows XP using Datel drivers (http://www.theisozone.com/downloads/xbox/tools/action-replay-105/ download link to software with its drivers) So I should be ok just using these drivers under XP in a qemu VM using usb forwarding? Yeah for most people this works fine.

Again, my question was (and I now believe this isnt the right place for this question): How or where should I look to make this USB mass storage device work and register as a /dev/ something device so I can get data off it?
citecite replied with a older thread: https://www.spinics.net/lists/usb/msg07022.html and I start to think I should try to look into this more instead of asking in a newbie thread. I do have the hardware to sniff the USB (for a previous project to dump usb firmware). and I compiled LinuxFromScratch before twice already, I know how to compile the kernel, just wondered if there was an easier solution... seems like no, and I would need to do something similair as in that older thread on spinics.net.

Thanks everyone for thinking with or somewhat with me. I guess I need to do my own sniffing and writing of an unusual device module/driver thing.

have a wonderfull day big_smile

Mod Edit - Replaced oversized images with links.
CoC - Pasting pictures and code

Last edited by Slithery (2018-04-16 11:31:13)

Offline

Board footer

Powered by FluxBB