Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2007, 09:15 PM   #1
VladSukhoy
Member
VladSukhoy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Feb 2007
Device: /Reader/
How to get reader's serial # through USB?

Hi,
Working on multiple reader support in my mountable filesystem project..
is there a way to figure out serial number or any other persistent identifier for the reader? Serial number would be great, but pretty much anything equivalent is ok.
VladSukhoy is offline   Reply With Quote
Old 02-09-2007, 10:08 PM   #2
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,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The serial number is reported in the about page of the reader, but is not reported over the USB interface (verify with lsusb).

Last edited by kovidgoyal; 02-09-2007 at 10:38 PM.
kovidgoyal is online now   Reply With Quote
Advert
Old 02-09-2007, 10:27 PM   #3
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
You do realize you don't need a serial number right?

The libusb library automatically provides arbitration. I've mounted both my wife's and my own Sony Reader on the same Mac with out any special coding to support it.
scotty1024 is offline   Reply With Quote
Old 02-09-2007, 10:39 PM   #4
VladSukhoy
Member
VladSukhoy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Feb 2007
Device: /Reader/
@scotty1024 Yes, I do realize that I can implement the functionality w/o serial number, nevertheless thank you, it is also possible that you understand my intent better than me..
But the idea is to implement automatic on-demand binding of prs units without any special listener application with just FUSE module itself (so that upon access the FUSE module is able to restore access to the needed device even if it was reconnected, switched its usb bus location, etc.) and also having persistent directory name for each connected device could be useful. Serial # is the natural choice in building such a name.

Last edited by VladSukhoy; 02-09-2007 at 10:45 PM.
VladSukhoy is offline   Reply With Quote
Old 02-09-2007, 10:45 PM   #5
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
Actually the reader protocol is pretty disconnect-able. I'm not really certain why they've put the big "Don't disconnect me" icon permanently up on the screen.

In my examination of the USB protocol it seems as though the units can be named.

I think it makes more sense to an Average Joe to have his Sony show up as "Average Joe" than "Sony 3456108". Sort of like an iPod.
scotty1024 is offline   Reply With Quote
Advert
Old 02-09-2007, 10:56 PM   #6
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,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I think the button is for people who get anxiety attacks when disconnecting USB devices. Interesting, can you provide a packet stream for naming the device?
kovidgoyal is online now   Reply With Quote
Old 02-09-2007, 11:21 PM   #7
VladSukhoy
Member
VladSukhoy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Feb 2007
Device: /Reader/
any insight on how to obtain that serial from About page?
I noticed stuff like /Data/tmp/serial.img and also /Data/tmp/info/serial.. Looks like this is it, but.. here is md5 of the first one from my reader:
MD5 (serial.img) = 644471de540300d942c874f4240f16e1
and the second one:
MD5 (serial) = 3e72e87134c816a791cf064d3d5ac3e5
VladSukhoy is offline   Reply With Quote
Old 02-09-2007, 11:22 PM   #8
VladSukhoy
Member
VladSukhoy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Feb 2007
Device: /Reader/
I wonder if you guys have different checksums - if so then I can use that as unique id, and get over it..

Last edited by VladSukhoy; 02-09-2007 at 11:32 PM.
VladSukhoy is offline   Reply With Quote
Old 02-09-2007, 11:32 PM   #9
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,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
d777f0fd8c4368d8f1007b6890b20727 serial.img
666dd21918e73a6c753a99983dd216c0 serial
kovidgoyal is online now   Reply With Quote
Old 02-09-2007, 11:34 PM   #10
VladSukhoy
Member
VladSukhoy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Feb 2007
Device: /Reader/
starts with 666
thx, this should be ok for now.
VladSukhoy is offline   Reply With Quote
Old 02-10-2007, 02:50 AM   #11
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
I think the button is for people who get anxiety attacks when disconnecting USB devices. Interesting, can you provide a packet stream for naming the device?
THe button is for people used to dealing with block protocols, where the host operating system has to do a block mounting of the filesystem and thus has to write out super block data to unmount the filesystem prior to it being un-plugged.

The Sony of course uses a high level VFS based protocol and doesn't deal in anything as crude as blocks of raw disk data.

I've decoded the Sony Heart Beat.

They do this once per second to make sure the Sony Reader is still there (or perhaps poll to see if the Reader has anything to say?):

Code:
0x40  0x80  : 0x00 0x01 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0xc0  0x81  : 0x00 0x10 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x00 0x00 0x00
              0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
BULKR 0x81  : 0x02 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x00 0x00 0x00
              0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x40  0x80  : 0x00 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x00
              0x02 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0xc0  0x81  : 0x00 0x10 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x00 0x00 0x00
              0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

Last edited by scotty1024; 02-10-2007 at 03:09 AM.
scotty1024 is offline   Reply With Quote
Old 02-10-2007, 03:03 AM   #12
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
Eject button sends...

Code:
0x40  0x80  : 0x01 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x04 0x00 0x00 0x00
              0x00 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
They stop polling the device and the "Don't disconnect me" icon tries to disappear on the Reader display.

Thats the standard "End of Session", so I think the real question is "What do they send to make the 'Don't disconnect me' icon show up?"
scotty1024 is offline   Reply With Quote
Old 02-10-2007, 03:38 AM   #13
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,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In my experience the reader never spontaneously has anything to say. The protocol seems to be entirely host driven. I also don't understand why they'd need to poll the reader. The USB system on the host should inform them if the device is disconnected.

Just goes to show that the heart really is good for nothing ;-)

Quote:
Originally Posted by scotty1024
The Sony of course uses a high level VFS based protocol and doesn't deal in anything as crude as blocks of raw disk data.

I've decoded the Sony Heart Beat.

They do this once per second to make sure the Sony Reader is still there (or perhaps poll to see if the Reader has anything to say?):

Code:
0x40  0x80  : 0x00 0x01 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0xc0  0x81  : 0x00 0x10 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x00 0x00 0x00
              0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
BULKR 0x81  : 0x02 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x00 0x00 0x00
              0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x40  0x80  : 0x00 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x00
              0x02 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0xc0  0x81  : 0x00 0x10 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x00 0x00 0x00
              0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
kovidgoyal is online now   Reply With Quote
Old 02-10-2007, 03:55 AM   #14
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
I agree you'd think disconnect could be a USB event to them so that's why I suspect DRM conversation perhaps?

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.
scotty1024 is offline   Reply With Quote
Old 02-10-2007, 04:04 AM   #15
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
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 scotty1024; 02-10-2007 at 04:19 AM.
scotty1024 is offline   Reply With Quote
Reply


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 11:25 PM.


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