Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2007, 05:22 AM   #16
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Quote:
Originally Posted by kovidgoyal
In my experience the reader never spontaneously has anything to say.

...

Just goes to show that the heart really is good for nothing ;-)
I just caught this off one of the heart beat's....

Result in bulk transfer was:
Code:
 02 00 01 00 00 00 00 00 00 00 00 00 08 00 00 00   ................
 00 00 02 01 00 00 00 00                           .......
Right after that CONNECT issued this:
Code:
53 00 00 00 01 00 00 00 00 00 00 00 07 00 00 00   S...............
 03 00 00 00 62 3A 2f                               ....b:/
That was during the initial startup after plugging the Reader into CONNECT.

Hmm, did the Reader suddenly announce "I've got a SD card!"???

I'll have to try this again with MS and nothing...
scotty1024 is offline   Reply With Quote
Old 02-10-2007, 01:05 PM   #17
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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
EDIT: Looking at my code, I always sent 8bytes as the key, never 4

Hmm the screen lock code is still 4 characters in length, so this seems to be pretty pointless.

Quote:
Originally Posted by scotty1024
Anyway, this is a change in the new firmware I think, this is the unlock device packet being sent by the new CONNECT software:

Code:
06 01 00 00 01 00 00 00 00 00 00 00 08 00 00 00   ................
2D 31 00 00 00 00 00 00                           -1.....
You will note it is now 8 bytes of payload. Apparently the Reader still supports the older 4 byte model.

Last edited by kovidgoyal; 02-10-2007 at 01:23 PM.
kovidgoyal is offline   Reply With Quote
Advert
Old 02-10-2007, 01:24 PM   #18
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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You are correct that does cause the do not disconnect to show up. Interestingly, sending the end session changes the text to 'USB Connected' but not the icon. A SONY bug?

Quote:
Originally Posted by scotty1024
Hmm looks like Igorsky may have gotten one wrong...

Code:
0x40  0x80  : 0x01 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x04 0x00 0x00 0x00
              0x01 0x00 0x00 0x00
0xc0  0x81  : 0x00 0x10 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x00 0x00 0x00
              0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
So I'm thinking command number 1 is really SessionBeginEnd not ReqEndSession with the payload of DWORD 0 for end and 1 for start.

I'm going to try this and see if that turns on the "Don't disconnect me" icon.

Last edited by kovidgoyal; 02-10-2007 at 01:27 PM.
kovidgoyal is offline   Reply With Quote
Old 02-10-2007, 02:13 PM   #19
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Quote:
Originally Posted by kovidgoyal
EDIT: Looking at my code, I always sent 8bytes as the key, never 4

Hmm the screen lock code is still 4 characters in length, so this seems to be pretty pointless.
The --log-packets says 4 and the source code I have says 4...

Code:
class UnlockDevice(ShortCommand):
    """ Unlock the device """
    NUMBER = 0x106 #: Command number
    def __init__(self, key=0x312d):
        ShortCommand.__init__(self, \
        number=UnlockDevice.NUMBER, type=0x01, command=key)

class ShortCommand(Command):

    """ A L{Command} whoose data section is 4 bytes long """

    SIZE = 20 #: Packet size in bytes
    # Usually carries additional information
    command = field(start=16, fmt=DWORD)

    def __init__(self, number=0x00, type=0x00, command=0x00):
        """
        @param number: L{Command.number}
        @param type: L{Command.type}
        @param command: L{ShortCommand.command}
        """
        Command.__init__(self, ShortCommand.SIZE)
        self.number  = number
        self.type    = type
        self.length  = 4
        self.command = command
I believe the hard coded "self.length = 4" seals the deal.

Code:
        res = self.send_validated_command(SetBulkSize(size=0x028000))
        if res.code != 0:
            raise ProtocolError("Unable to set bulk size.")
        self.send_validated_command(UnlockDevice(key=0x312d))
scotty1024 is offline   Reply With Quote
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: 43,835
Karma: 22666666
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
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-600 Serial console (i.e. shell) over USB Xaphiosis Sony Reader Dev Corner 6 08-22-2010 11:06 PM
Kindle's USB Serial Gadget: What is it? yifanlu Kindle Developer's Corner 0 08-05-2010 09:31 PM
Is this reader's anonymous? motormaroon Introduce Yourself 9 05-21-2010 01:30 PM
Which reader's best for me? mistermouse Which one should I buy? 2 04-11-2010 05:15 AM
iLiad USB serial modules drazvan iRex Developer's Corner 8 07-30-2007 05:43 PM


All times are GMT -4. The time now is 08:50 PM.


MobileRead.com is a privately owned, operated and funded community.