Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-13-2015, 06:18 AM   #1
friflaj
Member
friflaj began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2011
Device: Irex 1000S
Sync protocol documentation?

Is the protocol Calibre Companion uses documented? I'd like to mimic the server side so I can make CC work with my reference manager, Zotero.
friflaj is offline   Reply With Quote
Old 01-13-2015, 08:11 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,424
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
No, there is no documentation other than the code. However, calibre and CC debug logs provide a reasonable protocol trace, and the calibre device driver class documents what many of the various methods in the wireless device driver are supposed to do.

One hint: this is a push protocol. With the exception of connection, all operations are initiated by calibre.
chaley is offline   Reply With Quote
Advert
Old 01-13-2015, 03:40 PM   #3
friflaj
Member
friflaj began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2011
Device: Irex 1000S
Cool, push is even better. How do I enable the logs for Calibre/CC? I've looked through the settings of both, and I didn't see anything beyond "Mail logs to MultiPie"
friflaj is offline   Reply With Quote
Old 01-13-2015, 03:55 PM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,424
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by friflaj View Post
Cool, push is even better. How do I enable the logs for Calibre/CC? I've looked through the settings of both, and I didn't see anything beyond "Mail logs to MultiPie"
For CC, use the setting you found but email it to yourself. Alternatively, note the path to the attachment, which is where the log file is located.

For calibre, the easiest way to get a debug log is to "restart calibre in debug mode". You do this by clicking on the down arrow on the preferences icon and making the obvious selection. After calibre restarts, the next time you quit calibre you will get a popup window containing its debug log.

The other way is to start calibre using the command "calibre-debug -g" (no quotes). The debug log will go to standard output.
chaley is offline   Reply With Quote
Old 01-13-2015, 04:34 PM   #5
friflaj
Member
friflaj began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2011
Device: Irex 1000S
OK, I got both, but it looks like I'll have to break out wireshark. OTOH, from what I can glean from the logs, it doesn't look overly complicated.
friflaj is offline   Reply With Quote
Advert
Old 01-13-2015, 05:09 PM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,424
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by friflaj View Post
OTOH, from what I can glean from the logs, it doesn't look overly complicated.
It isn't very complicated. Most packets are JSON-encoded. The exceptions are the binary packets used for file transfer. I can't see why you would need wireshark given that you can run calibre from source and look at actual packets, but if it makes life easier for you ...

Most of the complication comes from historical evolution of the protocol. Options have been introduced over time to avoid breaking older clients. That is why you will see many "CanDoX" and "WillDoX" booleans in the handshake packets. You will see similar things in the initialization sequence, specifically around metadata and book syncing.

The protocol version # has never been used and has never changed.
chaley is offline   Reply With Quote
Old 01-14-2015, 07:23 AM   #7
friflaj
Member
friflaj began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2011
Device: Irex 1000S
I see now. I had assumed it would have been built atop HTTP, as so much is these days, but that isn't the case, and I'm sort of restricted to HTTP because Zotero has all the plumbing for it aboard.

Thanks in any case.
friflaj is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
e-Book Care and Protocol. sceadugenga General Discussions 46 08-22-2010 02:09 AM
iLiad displayMgrClient protocol scotty1024 iRex Developer's Corner 2 03-12-2010 08:31 PM
Whispernet Protocol xeijix Kindle Developer's Corner 1 03-08-2009 10:22 PM
PC sync protocol dumky Which one should I buy? 2 01-04-2008 01:33 PM
Skype protocol disassembled TadW Lounge 0 01-27-2005 07:11 AM


All times are GMT -4. The time now is 10:14 AM.


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