View Single Post
Old 01-22-2015, 05:13 PM   #23
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by PeterT View Post
The H2O is a NON android device; it is in the Kobo eReader series, not the defunct Kobo tablet series.

The only issue is that currently the Kobo Touch driver in 1.48 does not support the H2O. However, if you're prepared to run from source (ie both calibre 1.48 and source for 1.48) a few very simple changes can be made to the Kobo driver.

In the 1.48 source you need to edit calibre\src\calibre\devices\kobo\driver.py

Around line 1364 you will see
Code:
    AURA_PRODUCT_ID     = [0x4203]
    AURA_HD_PRODUCT_ID  = [0x4193]
    GLO_PRODUCT_ID      = [0x4173]
    MINI_PRODUCT_ID     = [0x4183]
    TOUCH_PRODUCT_ID    = [0x4163]
    PRODUCT_ID          = AURA_PRODUCT_ID + AURA_HD_PRODUCT_ID + GLO_PRODUCT_ID + MINI_PRODUCT_ID + TOUCH_PRODUCT_ID
Add in a line for the Aura H2O
Code:
    AURA_H2O_PRODUCT_ID = [0x4213]
and change the PRODUCT_ID = line to
Code:
    PRODUCT_ID          = AURA_PRODUCT_ID + AURA_HD_PRODUCT_ID + AURA_H2O_PRODUCT_ID + GLO_PRODUCT_ID + MINI_PRODUCT_ID + TOUCH_PRODUCT_ID
Around line 2767 you will see
Code:
    def isAura(self):
        return self.detected_device.idProduct in self.AURA_PRODUCT_ID
    def isAuraHD(self):
        return self.detected_device.idProduct in self.AURA_HD_PRODUCT_ID
    def isGlo(self):
        return self.detected_device.idProduct in self.GLO_PRODUCT_ID
    def isMini(self):
        return self.detected_device.idProduct in self.MINI_PRODUCT_ID
    def isTouch(self):
        return self.detected_device.idProduct in self.TOUCH_PRODUCT_ID
Add in
Code:
    def isAuraH2O(self):
        return self.detected_device.idProduct in self.AURA_H2O_PRODUCT_ID
Look for
Code:
    def cover_file_endings(self):
        return self.GLO_COVER_FILE_ENDINGS if self.isGlo() or self.isAura() else self.AURA_HD_COVER_FILE_ENDINGS if self.isAuraHD() else self.COVER_FILE_ENDINGS
Change this to
Code:
    def cover_file_endings(self):
        return self.GLO_COVER_FILE_ENDINGS if self.isGlo() or self.isAura() else self.AURA_HD_COVER_FILE_ENDINGS if self.isAuraHD() or self.isAuraH2O() else self.COVER_FILE_ENDINGS
Finally look for
Code:
    def set_device_name(self):
        device_name = self.gui_name
        if self.isAura():
            device_name = 'Kobo Aura'
        elif self.isAuraHD():
            device_name = 'Kobo Aura HD'
        elif self.isGlo():
            device_name = 'Kobo Glo'
        elif self.isMini():
            device_name = 'Kobo Mini'
        elif self.isTouch():
            device_name = 'Kobo Touch'
        self.__class__.gui_name = device_name
        return device_name
Change this to
Code:
    def set_device_name(self):
        device_name = self.gui_name
        if self.isAura():
            device_name = 'Kobo Aura'
        elif self.isAuraHD():
            device_name = 'Kobo Aura HD'
        elif self.isAuraH2O():
            device_name = 'Kobo Aura H2O'
        elif self.isGlo():
            device_name = 'Kobo Glo'
        elif self.isMini():
            device_name = 'Kobo Mini'
        elif self.isTouch():
            device_name = 'Kobo Touch'
        self.__class__.gui_name = device_name
        return device_name
If I've done it right https://www.dropbox.com/s/ocly93z9c5...atched.py?dl=0 should be a link to a patched version of the source. Of coruse it would have to be renamed to driver.py and placed in the correct source directory.
Or clone: https://github.com/eli-schwartz/cali...inXP-backports
Or download a static copy: https://github.com/eli-schwartz/cali...-backports.zip

These will always point to the latest version of whatever driver/stuff backports I added. If anything else is needed for any reason, I can add those too.

Last edited by eschwartz; 01-22-2015 at 05:19 PM.
eschwartz is offline   Reply With Quote