View Single Post
Old 12-20-2009, 01:34 PM   #8
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
You don't want to use the ouptput of lsusb because it will convert certain values to make them easier to read. Use the calibre-debug with the -d option.

Code:
$ calibre-debug -d
This will output all usb devices connected to your computer. The form for connected devices on Linux is (vendor_id, product_id, bcd, vendor_string, product_string)

The vendor_id, product_id and bcd are all in decimal so you will want to convert them to hex for use in the plugin. Decimal will work but hex is preferred for consistency.

You can easily convert decimal to binary by doing:

Code:
$ python -c "print hex(123)"
Where 123 is replaced by the number you want to convert.
user_none is offline   Reply With Quote