02-09-2007, 10:15 PM | #1 |
Member
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. |
02-09-2007, 11:08 PM | #2 |
creator of calibre
Posts: 44,559
Karma: 24495948
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 11:38 PM. |
Advert | |
|
02-09-2007, 11:27 PM | #3 |
Banned
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. |
02-09-2007, 11:39 PM | #4 |
Member
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 11:45 PM. |
02-09-2007, 11:45 PM | #5 |
Banned
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. |
Advert | |
|
02-09-2007, 11:56 PM | #6 |
creator of calibre
Posts: 44,559
Karma: 24495948
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?
|
02-10-2007, 12:21 AM | #7 |
Member
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 |
02-10-2007, 12:22 AM | #8 |
Member
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-10-2007 at 12:32 AM. |
02-10-2007, 12:32 AM | #9 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
d777f0fd8c4368d8f1007b6890b20727 serial.img
666dd21918e73a6c753a99983dd216c0 serial |
02-10-2007, 12:34 AM | #10 |
Member
Posts: 16
Karma: 10
Join Date: Feb 2007
Device: /Reader/
|
starts with 666
thx, this should be ok for now. |
02-10-2007, 03:50 AM | #11 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
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 04:09 AM. |
|
02-10-2007, 04:03 AM | #12 |
Banned
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 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?" |
02-10-2007, 04:38 AM | #13 | |
creator of calibre
Posts: 44,559
Karma: 24495948
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:
|
|
02-10-2007, 04:55 AM | #14 |
Banned
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..... |
02-10-2007, 05:04 AM | #15 |
Banned
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 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 05:19 AM. |
|
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-23-2010 12:06 AM |
Kindle's USB Serial Gadget: What is it? | yifanlu | Kindle Developer's Corner | 0 | 08-05-2010 10:31 PM |
Is this reader's anonymous? | motormaroon | Introduce Yourself | 9 | 05-21-2010 02:30 PM |
Which reader's best for me? | mistermouse | Which one should I buy? | 2 | 04-11-2010 06:15 AM |
iLiad USB serial modules | drazvan | iRex Developer's Corner | 8 | 07-30-2007 06:43 PM |