Panda II USB MSD / Force USB 1.1 or 2.0?

We have a prototype built using the Panda II board that connects to a PC and functions as a mass storage device. When a button is pressed, we disconnect MSD and handle the file that was copied from the PC. This works on most systems we connect to. However, we have a Linux based board that will not recognize the Panda II as a MSD. It seems like something is happening during the stage where it gets identified as either full speed or high speed (USB v1.1 or 2.0).

Is there a way to force the USB support to only v1.1, not v2.0 compatible? I would like to rule out whether the version negotiation is the problem or not.

We have also seen the following message in the console output of our Linux system when MSD isn’t working:

hub 2-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
hub 2-0:1.0: unable to enumerate USB device on port 2

Has anyone seen anything similar to this? What information would be useful to help figure out why this device isn’t recognizing the Panda II as MSD when other system do?



@ RickG03 - I am not sure how, or if it is even possible to switch compatibility modes. However, if you unplug the device, and plug it back in immediately issue the following command:

dmesg | grep -i usb

This will show you more about what the system is attempting to do with the USB device.

We had tried that and this is what comes up:

[20159.336122] usb 3-2: new full-speed USB device number 5 using uhci_hcd
[20159.516744] scsi23 : usb-storage 3-2:1.0
[20160.524459] scsi 23:0:0:0: Direct-Access 1.00 PQ: 0 ANSI: 0 CCS
[20160.525244] sd 23:0:0:0: Attached scsi generic sg2 type 0
[20160.535449] sd 23:0:0:0: [sdb] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)
[20160.538449] sd 23:0:0:0: [sdb] Write Protect is off
[20160.538453] sd 23:0:0:0: [sdb] Mode Sense: 03 00 00 00
[20160.541441] sd 23:0:0:0: [sdb] No Caching mode page present
[20160.541445] sd 23:0:0:0: [sdb] Assuming drive cache: write through
[20160.559437] sd 23:0:0:0: [sdb] No Caching mode page present
[20160.559441] sd 23:0:0:0: [sdb] Assuming drive cache: write through
[20160.580532] sdb:
[20160.604581] sd 23:0:0:0: [sdb] No Caching mode page present
[20160.604589] sd 23:0:0:0: [sdb] Assuming drive cache: write through
[20160.604595] sd 23:0:0:0: [sdb] Attached SCSI removable disk

So it appears that it is recognizing the device is connected, but is not mounting it. In fact, those messages aren’t that different from a known working USB device on that same Linux host. The only difference in the output is that one is seen as high speed (working) and the Panda II is seen as full speed (not working). After that output in DMESG, I see the error that says, “Cannot enable port 2. Maybe the USB cable is bad?”.

@ RickG03 - Have you tried manually mounting the device?

If this does not work, it may be an incompatibility issue with the underlying NETMF device.

That’s not working either. If it is an incompatibility issue, do you know what could cause that? Is it a driver issue on the Linux system? Something on the Panda II? I’m just trying to figure out where to go from here.

Thanks. -Rick

@ RickG03 - It is most likely a driver issue, unfortunately, personally I have not done much in this area other than playing around with LibUSB in Qt. Do not quote me on this, but since this is a NETMF device, it may handle storing and exchanging data slightly differently or it could be expecting commands to be executed in a specific order, that would not be covered by the generic USB Mass Storage driver.

You could see if it is a driver issue on the Linux system, if you know C++ you can use Qt and LibUSB to test communication through code. There are plenty of examples of interfacing LibUSB with mass storage devices.

I do not believe this to be an impossible task to overcome, as we have been successful in performing simple communications with our devices under a Virtual Machine in Ubuntu 12.04 with VirtualBox.

Well, the upside is that we have no problem seeing the device as MSD on a full blown Linux distribution. It shows up fine in Ubuntu running on a laptop and in other distributions running in VMs. The device we are connecting to is a dedicated device running embedded Linux. All other flash drives we have connected to it show up just fine. It’s just the Panda II that we’re having trouble with. The Panda II works on every other system we have tried it on too. It’s difficult to figure out since each side works great with other devices and system, they just don’t work together for some reason.