View Single Post
Old 02-10-2007, 03:09 PM   #20
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,405
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm not sure what vintage your copy of the code is, but revision 209 https://libprs500.kovidgoyal.net/changeset/209 (when I implemented device unlocking) had the following structure for UnlockDevice commands. May have been 4 before that.

class UnlockDevice(Command):
""" Unlock the device """
NUMBER = 0x106 #: Command number
key = stringfield(8, start=16) #: The key defaults to -1

def __init__(self, key='-1\0\0\0\0\0\0'):
Command.__init__(self, 24)
self.number = UnlockDevice.NUMBER
self.type = 0x01
self.length = 8
self.key = key

Last edited by kovidgoyal; 02-10-2007 at 03:18 PM.
kovidgoyal is offline   Reply With Quote