# USB thumb drive not recognized (fine on Windows 10 though)



## Maelstorm (Apr 4, 2018)

I have this USB drive that FreeBSD will not recognize.  Here's some things that I did:

```
strata:/root 663 ### ->usbconfig -d ugen0.2 dump_device_desc
ugen0.2: <vendor 0x1f75 product 0x0817> at usbus0, cfg=255 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0008
  idVendor = 0x1f75
  idProduct = 0x0817
  bcdDevice = 0x0001
*  iManufacturer = 0x0001  <retrieving string failed>*
*  iProduct = 0x0002  <retrieving string failed>*
*  iSerialNumber = 0x0003  <retrieving string failed>*
  bNumConfigurations = 0x0001
```

Now the thing that caught my eye are the i fields where it said that retrieving string failed.  I always thought that those field are required for it to work.  Now when I plug a different drive in the same port, this is what I get:


```
strata:/root 668 ### ->usbconfig -d ugen0.2 dump_device_desc
ugen0.2: <SanDisk Cruzer Glide> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0781
  idProduct = 0x5575
  bcdDevice = 0x0126
*  iManufacturer = 0x0001  <SanDisk>*
*  iProduct = 0x0002  <Cruzer Glide>*
*  iSerialNumber = 0x0003  <20044530110C6190F50C>*
  bNumConfigurations = 0x0001
```

Now the question is how do I get FreeBSD to recognize the drive and assign a usable daX device to it?  Windows sees it just fine, which is strange since Windows is supposed to cough on it if the serial number is missing.


----------



## Maelstorm (Apr 5, 2018)

Update,

I tried it on a Linux machine and it sees the info of the three missing fields, but it's having problems as well.  The error code it gives is -110 which I cannot find anywhere, and it says that it cannot set configuration 1.  So, looks like FreeBSD and Linux are both having the problem.


----------



## Crivens (Apr 5, 2018)

Is that by any chance one of the drives with a SD card slot? They contain some kind of switch, which is usually on the cheap side of a bargain that fell of some lorry in a dark alley. 

I had some of those and gave up on them.

That windows can use that thing does not surprise me. It is not really strict on checking some things (was, at least). You could reboot it by using a carefully crafted stick that claimed to have one endpoint but had configurations for more.


----------



## shepper (Apr 6, 2018)

If your thumb drive were formated with ntfs would FreeBSD, without sysutils/fusefs-ntfs, recognize it?
If your drive is formated with FAT32 (msdosfs in FreeBSD speak) then the device id is likely missing in FreeBSD


----------



## tingo (Apr 6, 2018)

FWIW, yes - NTFS-formatted thumb drives are normally detected fine in FreeBSD, you just can't mount the partitions on them (unless you use fusefs-ntfs or one of the other capable programs for that purpose).


----------



## ralphbsz (Apr 6, 2018)

The vendor ID 0x1F75 tells us that this USB stick is made by Innostor (or more accurately, that the controller chip in there comes from Innostor, and either the whole stick is made by them, or the OEM who assembled the stick didn't even bother to register its own vendor ID).  If you look around the web a little bit, you quickly find that Innostor seems to be the bottom of the barrel of USB storage controller and hub chips.  Fundamentally, cheap crap.  Not surprised that it works reasonably well with Windows: probably they tested their firmware against the largest OS until it worked, and then shipped it.  Standards conformance, high quality, and good testing all cost money, too much money.

The problem here has nothing to do with file systems (FAT versus NTFS); the problems Maelstrom reports are at a much lower layer, when the USB stack tries to identify and attach the device.

Personally, I would throw it into the trash.  Or use a Windows machine to copy the files to another stick and then use it on Windows only.


----------



## shepper (Apr 6, 2018)

It is not a major deal to add VendorID/DeviceID to the FreeBSD source code
https://wiki.freebsd.org/USB
usb_quirk(4)
https://svnweb.freebsd.org/base/head/sys/dev/usb/storage/


----------



## Maelstorm (Apr 10, 2018)

No, it doesn't contain a slot, switch, or anything like that.  What is strange though is that Linux is able to pull a serial number from the drive while FreeBSD can't.  So there is something else going on there too.


----------



## tingo (Apr 10, 2018)

Bad usb hardware exist (and can't easily be fixed). When you find one, my advice is to write down as much info about it as you can (including symptoms of misbehaving on any OS you have tested it on), share that info and then put the device away. Try  a different one (different model or vendor) - life is too short to spend too much time on bad hardware.


----------



## ShelLuser (Apr 10, 2018)

What exactly does `dmesg` tell you when you plug in the device?  Thing is: usbconfig doesn't really tell you all that much. When I use this command on a memory stick which is recognized and fully supported then dump_device_desc still doesn't tell me much about that feat:


```
peter@unicron:~/updates# usbconfig -d ugen4.2 dump_info
ugen4.2: <Kingston DataTraveler G3> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA)
```

vs:


```
ugen4.2: <Kingston DataTraveler G3> at usbus4
umass0 on uhub1
umass0: <Kingston DataTraveler G3, class 0/0, rev 2.00/1.00, addr 2> on usbus4
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:6:0: Attached to scbus6
da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <Kingston DataTraveler G3 1.00> Removable Direct Access SCSI-2 device
da0: Serial Number 001CC0EC34C8F071164515B9
da0: 40.000MB/s transfers
da0: 3817MB (7818184 512 byte sectors)
da0: quirks=0x6<NO_6_BYTE,NO_PREVENT>
```
The first tells me that the OS did recognize some kind of USB device whereas the latter shows me more about that.


----------



## Maelstorm (Apr 15, 2018)

I just get one line saying that some USB device was plugged in along with the vendor and product IDs and that's it.

*ugen0.2: <vendor 0x1f75 product 0x0817> at usbus0*

That is the line.


----------



## BSDAppentic3 (Apr 16, 2018)

Ja ja ja...both have the same avatar!
The logo of the organization that created the mechas in Evangelion, right?
What a coincidence...
Their motto was (if I remember good): "God's in heaven/ All right in the world"


----------



## Maelstorm (Apr 16, 2018)

BSDAppentic3 said:


> Ja ja ja...both have the same avatar!
> The logo of the organization that created the mechas in Evangelion, right?
> What a coincidence...
> Their motto was (if I remember good): "God's in heaven/ All right in the world"



For what it's worth, I had my logo before ShelLuser did.  But yeah, the NERV motto is "God's in his heaven/ All's right with the world."  So you were close.  For you to even know that tells me that you are an anime fan as well.


----------



## BSDAppentic3 (Apr 17, 2018)

Maelstorm said:


> For you to even know that tells me that you are an anime fan as well.


Well, not really. I just prefer it instead of the cr4py cartoons.
In a anime, you could treat such themes from a nice day to the origin of the life. In a cartoon, well, it's not so easy. It is a whole multiverse of possibles themes to speak.
For example: look the topics treated in a anime like Evangelion. It could be possible in a cartoon?
Anyway, I don't want to be off-topic. So the best would be leave it here.


----------

