View Single Post
Old 05-10-2010, 02:04 PM   #55
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I could do all that for windows and perhaps for linux (would need to set up a VM), but not for Mac. So I will ignore it.

I have a driver for my phone, an HTC Touch Diamond2 running WM 6.5. It took me a little while to understand what to do because I didn't fully understand card matching until I traced it through the code. My phone won't show its main mem as a drive and it presents its card without any significant ID details.

Although the driver works, the lack of extra ID details makes me nervous.

The USB ID info is u'usb\\vid_0bb4&pid_0c30&rev_0000']
The storage ID is
Code:
\\?\STORAGE#VOLUME#_??_USBSTOR#DISK&VEN_&PROD_&REV_#3FBF5000-7351-0801-3561-580209983530&0#{53F56307-B6BF-11D0-94F2-0A0C91EFB8B}#{53F5630D-B6BF-11D0-94F2-00A0C91EFB8B}
All of VEN, PROD, and REV are empty.

I have no idea how this will present on a Mac or Linux, so my driver doesn't permit them.

FYI - the driver code is:
Code:
class HTC_TD2(USBMS):

    name           = 'HTC TD2 Phone driver'
    gui_name       = 'HTC TD2'
    description    = _('Communicate with HTC TD2 phones.')
    author         = 'Charles Haley'
    supported_platforms = ['windows']

    # Ordered list of supported formats
    FORMATS     = ['epub', 'pdf']

    VENDOR_ID   = {
            # HTC
            0x0bb4 : { 0x0c30 : [0x000]},
            }
    EBOOK_DIR_MAIN = ['EBooks']
    EXTRA_CUSTOMIZATION_MESSAGE = _('Comma separated list of directories to '
            'send e-books to on the device. The first one that exists will '
            'be used')
    EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(EBOOK_DIR_MAIN)

    VENDOR_NAME      = ['']
    WINDOWS_MAIN_MEM = ['']

#    OSX_MAIN_MEM = 'HTC TD2 Phone Media'
#    MAIN_MEMORY_VOLUME_LABEL  = 'HTC Phone Internal Memory'

    SUPPORTS_SUB_DIRS = True

    def post_open_callback(self):
        opts = self.settings()
        dirs = opts.extra_customization
        if not dirs:
            dirs = self.EBOOK_DIR_MAIN
        else:
            dirs = [x.strip() for x in dirs.split(',')]
        self.EBOOK_DIR_MAIN = dirs
chaley is offline   Reply With Quote