The MiniX clone’s OTG USB port under FreeBSD

I’ve recently purchased a tiny, Android-based “MiniX” clone media player from DX.com. Primarily for my own records, this post summarises what the MiniX’s OTG USB port looks like when plugged into a FreeBSD host. It might be of interest to you if you’re reading this and you’re not me.

Console output after connecting

Using a male-male (A-A) USB cable, I plugged the MiniX’s OTG USB port into my FreeBSD 8.2 (PC-BSD 8.2) desktop system. If the MiniX is off at the time (no external power being supplied) it will boot up, drawing power from the USB port at the other end of the cable. For a few seconds the MiniX’s front LED will be red, but fairly soon it turns blue indicating the MiniX is booted and running.

We soon see the following in /var/log/messages of my FreeBSD desktop machine:

 Sep 14 16:20:13 gjadesktop root: Unknown USB device: vendor 0x18d1 product 0x0003 bus uhub4
 Sep 14 16:20:13 gjadesktop kernel: ugen4.4: <USB Developer> at usbus4
 Sep 14 16:20:14 gjadesktop kernel: umass0: <USB Developer Android, class 0/0, rev 2.00/2.30, addr 4> on usbus4
 Sep 14 16:20:14 gjadesktop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000
 Sep 14 16:20:15 gjadesktop kernel: umass0:3:0:-1: Attached to scbus3
 Sep 14 16:20:15 gjadesktop root: Unknown USB device: vendor 0x18d1 product 0x0003 bus uhub4
 Sep 14 16:20:15 gjadesktop kernel: (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
 Sep 14 16:20:15 gjadesktop kernel: (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
 Sep 14 16:20:15 gjadesktop kernel: (probe0:umass-sim0:0:0:0): SCSI status: Check Condition
 Sep 14 16:20:15 gjadesktop kernel: (probe0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power on, reset, or bus device reset occurred)
 Sep 14 16:20:16 gjadesktop kernel: (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
 Sep 14 16:20:16 gjadesktop kernel: (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
 Sep 14 16:20:16 gjadesktop kernel: (probe0:umass-sim0:0:0:0): SCSI status: Check Condition
 Sep 14 16:20:16 gjadesktop kernel: (probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present)
 Sep 14 16:20:16 gjadesktop kernel: da0 at umass-sim0 bus 0 scbus3 target 0 lun 0
 Sep 14 16:20:16 gjadesktop kernel: da0: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:16 gjadesktop kernel: da0: 40.000MB/s transfers
 Sep 14 16:20:16 gjadesktop kernel: da0: Attempt to query device size failed: NOT READY, Medium not present
 Sep 14 16:20:16 gjadesktop kernel: (probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0
 [...similar probe0 messages to above...]
 Sep 14 16:20:17 gjadesktop kernel: da1 at umass-sim0 bus 0 scbus3 target 0 lun 1
 Sep 14 16:20:17 gjadesktop kernel: da1: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:17 gjadesktop kernel: da1: 40.000MB/s transfers
 Sep 14 16:20:17 gjadesktop kernel: da1: Attempt to query device size failed: NOT READY, Medium not present
 Sep 14 16:20:17 gjadesktop kernel: (probe0:umass-sim0:0:0:2): TEST UNIT READY. CDB: 0 40 0 0 0 0
 [...similar probe0 messages to above...]
 Sep 14 16:20:18 gjadesktop kernel: da2 at umass-sim0 bus 0 scbus3 target 0 lun 2
 Sep 14 16:20:18 gjadesktop kernel: da2: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:18 gjadesktop kernel: da2: 40.000MB/s transfers
 Sep 14 16:20:18 gjadesktop kernel: da2: Attempt to query device size failed: NOT READY, Medium not present
 Sep 14 16:20:18 gjadesktop kernel: (probe0:umass-sim0:0:0:3): TEST UNIT READY. CDB: 0 60 0 0 0 0
 [...similar probe0 messages to above...]
 Sep 14 16:20:19 gjadesktop kernel: da3 at umass-sim0 bus 0 scbus3 target 0 lun 3
 Sep 14 16:20:19 gjadesktop kernel: da3: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:19 gjadesktop kernel: da3: 40.000MB/s transfers
 Sep 14 16:20:19 gjadesktop kernel: da3: Attempt to query device size failed: NOT READY, Medium not present
 Sep 14 16:20:19 gjadesktop kernel: (probe0:umass-sim0:0:0:4): TEST UNIT READY. CDB: 0 80 0 0 0 0
 [...similar probe0 messages to above...]
 Sep 14 16:20:20 gjadesktop kernel: da4: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:20 gjadesktop kernel: da4: 40.000MB/s transfers
 Sep 14 16:20:20 gjadesktop kernel: da4: Attempt to query device size failed: NOT READY, Medium not present
 Sep 14 16:20:20 gjadesktop kernel: (probe0:umass-sim0:0:0:5): TEST UNIT READY. CDB: 0 a0 0 0 0 0
 [...similar probe0 messages to above...]
 Sep 14 16:20:21 gjadesktop kernel: da5 at umass-sim0 bus 0 scbus3 target 0 lun 5
 Sep 14 16:20:21 gjadesktop kernel: da5: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:21 gjadesktop kernel: da5: 40.000MB/s transfers
 Sep 14 16:20:21 gjadesktop kernel: da5: Attempt to query device size failed: NOT READY, Medium not present
 Sep 14 16:20:21 gjadesktop kernel: (probe0:umass-sim0:0:0:6): TEST UNIT READY. CDB: 0 c0 0 0 0 0
 [...similar probe0 messages to above...]
 Sep 14 16:20:22 gjadesktop kernel: da6 at umass-sim0 bus 0 scbus3 target 0 lun 6
 Sep 14 16:20:22 gjadesktop kernel: da6: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:22 gjadesktop kernel: da6: 40.000MB/s transfers
 Sep 14 16:20:22 gjadesktop kernel: da6: Attempt to query device size failed: NOT READY, Medium not present
 Sep 14 16:20:22 gjadesktop kernel: (probe0:umass-sim0:0:0:7): TEST UNIT READY. CDB: 0 e0 0 0 0 0
 [...similar probe0 messages to above...]
 Sep 14 16:20:23 gjadesktop kernel: da7 at umass-sim0 bus 0 scbus3 target 0 lun 7
 Sep 14 16:20:23 gjadesktop kernel: da7: <USB 2.0 USB Flash Driver 0100> Removable Direct Access SCSI-2 device
 Sep 14 16:20:23 gjadesktop kernel: da7: 40.000MB/s transfers
 Sep 14 16:20:23 gjadesktop kernel: da7: Attempt to query device size failed: NOT READY, Medium not present

Turns out that /dev/da0 is the 2nd internal 2GB Flash partition, and /dev/da1 is the TF (microSD) card slot on the front of the MiniX.  I’m not sure at this point what da2 – da7 represent.

Mounting and accessing internal drive space

Curiously, /dev/da0 has also been disk labeled “APOLLO”, KDE (my desktop environment) offered to automount it under /media/APOLLO (very helpful!).  As it happened, I had an 8GB Sandisk TF card inserted too (with about 2G of content) so I also mounted /dev/da1 as an msdosfs formatted drive.

  [gja@gjadesktop] /usr/ports# mount -t msdosfs /dev/da1 /mnt/ttt
  [gja@gjadesktop] /usr/ports# df -h
  Filesystem                   Size    Used   Avail Capacity  Mounted on
	  [..]
  /dev/da0                     1.6G    3.3M    1.6G     0%    /media/APOLLO
  /dev/da1                     7.4G    2.0G    5.4G    27%    /mnt/ttt
  [gja@gjadesktop] /usr/ports#

There isn’t very much on the internal “APOLLO” drive at the moment, looks more like placeholders for downloaded content.

[gja@gjadesktop]/home/gja/Documents(108)% ll /media/APOLLO/
 total 56
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 .android_secure
 drwxr-xr-x 1 gja gja 4096 Sep 12 17:25 .dxcms
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Alarms
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Android
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 DCIM
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Download
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 LOST.DIR
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Movies
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Music
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Notifications
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Pictures
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Podcasts
 drwxr-xr-x 1 gja gja 4096 Jan 1 2010 Ringtones
 drwxr-xr-x 1 gja gja 4096 Sep 12 17:32 pptv
 [gja@gjadesktop]/home/gja/Documents(109)%

Detailed information from usbconfig

A little later, when plugged into a different FreeBSD machine, I extracted the following information from usbconfig:

gja@gjabkup2.space4me.com :usbconfig -d 7.2 list
ugen7.2: <Android USB Developer> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
gja@gjabkup2.space4me.com :
gja@gjabkup2.space4me.com :usbconfig -d 7.2 dump_device_desc
ugen7.2: <Android USB Developer> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000 
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x18d1 
  idProduct = 0x0003 
  bcdDevice = 0x0230 
  iManufacturer = 0x0002  <USB Developer>
  iProduct = 0x0003  <Android>
  iSerialNumber = 0x0004  <20080411>
  bNumConfigurations = 0x0001 

gja@gjabkup2.space4me.com :
gja@gjabkup2.space4me.com :usbconfig -d 7.2 dump_curr_config_desc
ugen7.2: <Android USB Developer> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

 Configuration index 0

    bLength = 0x0009 
    bDescriptorType = 0x0002 
    wTotalLength = 0x0037 
    bNumInterfaces = 0x0002 
    bConfigurationValue = 0x0001 
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x00c0 
    bMaxPower = 0x00fa 

    Interface 0
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0000 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0002 
      bInterfaceClass = 0x0008 
      bInterfaceSubClass = 0x0006 
      bInterfaceProtocol = 0x0050 
      iInterface = 0x0001  <Mass Storage>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0000 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

     Endpoint 1
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0002  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

    Interface 1
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0001 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0002 
      bInterfaceClass = 0x00ff 
      bInterfaceSubClass = 0x0042 
      bInterfaceProtocol = 0x0001 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0083  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0000 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

     Endpoint 1
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0004  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0000 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

gja@gjabkup2.space4me.com :
asdasd

(usbconfig -d 7.2 dump_all_config_desc produces exactly the same output as usbconfig -d 7.2 dump_curr_config_desc)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: