Re: One Button Backup for JMicron controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 23 May 2011, Pantelis Koukousoulas wrote:

> Hi,
> 
> I 've just been looking into what would be needed to support the
> one-button backup functionality in my external disk enclosure
> and adaptor, because I 'm becoming fed up with windows users
> posting in forums that "for me backup is just to plug the
> external disk and push its button".
> 
> Both devices have JMicron controllers inside (JM20336 for the
> dual SATA -> USB enclosure and JM20337/20338 for the adaptor)
> and in Windows they are handled by the PCCloneEx software by
> some company called Fnet.
> 
> These controllers are in a large variety of devices from relatively
> small manufacturers and they all use the same software, so
> supporting one of them will mean supporting all of the others
> as well "for free" from what it seems.
> 
> Unfortunately (as you will see from the attached lsusb output)
> neither device exposes a HID interface for the button
> (like Maxtor Onetouch). Instead, the JMicron people seem to use
> special SCSI commands to poll for the button status.
> 
> E.g., for the JM20338 we can see in the usbmon log a custom
> CDB with command "df" and the result is 0x96 if the button
> is pressed and 0x97 if not (looks like the LSB is used, active-low).
> 
> For JM20336 it seems slightly more complex but it looks like the
> method is essentially the same.
> 
> The PCCloneEx software includes a small windows device driver
> which I guess is used for this polling since I only see USB
> activity on the device when this program is started.
> 
> I attach for each chip the following:
> 
>    * lsusb output
>    * usbmon output (includes device initialization, 4 presses
>                     of the button and one long hold)
> 
> Where in the stack would I need to hack in order to add support
> for this functionality?

You don't need to hack anything in the stack.  Just write a program 
that opens the device file and sends the appropriate commands using the 
SG_IO ioctl.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux