How do I connect a USB mass storage device that has a custom pid and vid?

jc__

I have a device, custom mp3 player, that the pid and vid show up as a011:a011.

dmesg

usb 1-1.1: new high-speed USB device number 4 using ehci-pci
usb 1-1.1: New USB device found, idVendor=a011, idProduct=a011
usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
usb 1-1.1: Product: Custom-Mp3
usb 1-1.1: SerialNumber: 123456789abcdef
usb 1-1.1: USB disconnect, device number 4
usb 3-3: new high-speed USB device number 2 using xhci_hcd
usb 3-3: New USB device found, idVendor=a011, idProduct=a011
usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
usb 3-3: Product: Custom-Mp3
usb 3-3: SerialNumber: 123456789abcdef

I can connect to this device in windows 7 by selecting a generic mass storage device driver. It has a single fat32 partition that I can read and write to.

My system is Ubuntu 14. Every thing works. I connect a USB thumb drive and it auto loads the driver and creates the /dev/sdX point.

How do I connect this mp3 player to my linux pc. If I can create the /dev/sdX point then I can mount it.

I have been reading and trying to use modprobe and creating a /etc/udev/rules.d/80-mp3_a011.rules, but It has not clicked yet.

I would like to connect a single time via the command line first.

Next I would like it to connect every time I plug it in.

Last using this information I will create the rules for mdev that I use on my embedded system.

jc__

Got the second part working.

"Next I would like it to connect every time I plug it in."

Created a udev rule at:

sudo vi /etc/udev/rules.d/80-mp3_a011.rules

Added this info that simply modprobes usb-storage and adds my pid:vid to the usb-storage new_id.

ACTION=="add", ATTRS{idVendor}=="a010", ATTRS{idProduct}=="a010", RUN+="/sbin/modprobe usb-storage" RUN+="/bin/sh -c 'echo a011 a011 > /sys/bus/usb/drivers/usb-storage/new_id'"

restart udev

sudo /etc/init.d/udev restart

Now as soon as I connect the device it is handled like any other usb mass storage device.

First part working:

"I would like to connect a single time via the command line first."

sudo echo a011 a011 > /sys/bus/usb/drivers/usb-storage/new_id

Did NOT work because the sudo was applied to the echo command and not the new_id file, or some such thing.

Changed to a root shell first then added the PID:VID to the new_id.

sudo su

echo a011 a011 > /sys/bus/usb/drivers/usb-storage/new_id

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I remove all drivers and other files related to a USB Mass Storage device?

From Dev

How to install CentOS 6 via USB mass storage device?

From Dev

How to install CentOS 6 via USB mass storage device?

From Dev

How to share a folder as an USB mass storage device (from a raspberry pi)

From Dev

How to auto-sync with a plugged-in USB mass storage device?

From Dev

Example of detecting USB device with VID and PID

From Dev

Find /dev entry with VID/PID of USB device

From Dev

How do I hot-swap a mass storage LUN backing file in the Linux composite USB gadget?

From Dev

Read bytes of a USB mass storage device

From Dev

Get access to USB mass storage device in android

From Dev

Find out if a specific device is an USB mass storage

From Dev

USB mass storage device split to 2 devices

From Dev

Can I make a USB port on my Linux computer look like a mass storage device?

From Dev

Can I make a USB port on my Linux computer look like a mass storage device?

From Dev

How to get the USB VID, PID and serial number of a device in Ubuntu using C++ from /dev/xxx path

From Dev

How to get the file path from a device acting as a usb mass storage in android

From Dev

How to read from usb mass storage device when AppSand box is enabled

From Dev

opening a usb-serial port using the device VID/PID

From Dev

Get device path based on USB VID:PID in Linux

From Dev

opening a usb-serial port using the device VID/PID

From Dev

Get device path based on USB VID:PID in Linux

From Dev

How to automount an Android phone as USB mass storage?

From Dev

How to access usb mass storage in android NDK

From Dev

Finding Volume Label of a usb mass storage device using python

From Dev

Finding Volume Label of a usb mass storage device using python

From Dev

file is too large to copy on 8 giga USB Mass Storage Device

From Dev

The via USB connected SCSI (UAS)-device for mass storage cannot be stopped

From Dev

Disable read cache/buffer for USB mass storage device in Linux

From Dev

Disabling read buffering in Linux for USB mass storage device

Related Related

  1. 1

    How can I remove all drivers and other files related to a USB Mass Storage device?

  2. 2

    How to install CentOS 6 via USB mass storage device?

  3. 3

    How to install CentOS 6 via USB mass storage device?

  4. 4

    How to share a folder as an USB mass storage device (from a raspberry pi)

  5. 5

    How to auto-sync with a plugged-in USB mass storage device?

  6. 6

    Example of detecting USB device with VID and PID

  7. 7

    Find /dev entry with VID/PID of USB device

  8. 8

    How do I hot-swap a mass storage LUN backing file in the Linux composite USB gadget?

  9. 9

    Read bytes of a USB mass storage device

  10. 10

    Get access to USB mass storage device in android

  11. 11

    Find out if a specific device is an USB mass storage

  12. 12

    USB mass storage device split to 2 devices

  13. 13

    Can I make a USB port on my Linux computer look like a mass storage device?

  14. 14

    Can I make a USB port on my Linux computer look like a mass storage device?

  15. 15

    How to get the USB VID, PID and serial number of a device in Ubuntu using C++ from /dev/xxx path

  16. 16

    How to get the file path from a device acting as a usb mass storage in android

  17. 17

    How to read from usb mass storage device when AppSand box is enabled

  18. 18

    opening a usb-serial port using the device VID/PID

  19. 19

    Get device path based on USB VID:PID in Linux

  20. 20

    opening a usb-serial port using the device VID/PID

  21. 21

    Get device path based on USB VID:PID in Linux

  22. 22

    How to automount an Android phone as USB mass storage?

  23. 23

    How to access usb mass storage in android NDK

  24. 24

    Finding Volume Label of a usb mass storage device using python

  25. 25

    Finding Volume Label of a usb mass storage device using python

  26. 26

    file is too large to copy on 8 giga USB Mass Storage Device

  27. 27

    The via USB connected SCSI (UAS)-device for mass storage cannot be stopped

  28. 28

    Disable read cache/buffer for USB mass storage device in Linux

  29. 29

    Disabling read buffering in Linux for USB mass storage device

HotTag

Archive