On Fri, Jul 12, 2013 at 12:27:20PM +0700, rusman wrote: > I would like to know whether someone has been documenting the USB > protocol as in TODO list.
Not yet :-) > I don't have any experience documenting such protocol before. So if it > is ok for me contribute to this project then I need guidance from you > guys here. You're more than welcome to begin the documentation. You will want to start looking at the following files: src/probe.{h,cc} src/protostructs.h src/protocol.{h,cc} src/socket.{h,cc} src/packet.{h,cc} And the most useful part is grabbing a blackberry and dumping all traffic with the -v options on most of the Barry commands. You probably want to start with btool. When you view the raw packet hex codes, compare them with the structs inside src/protostructs.h, starting with Packet struct, and follow the unions and substructs from there (all in the same header). The bird's eye view of the protocol is (roughly, from memory): 1. a few initial probe commands, which determine a few important pieces (probe.cc) 2. open the mode (Desktop, javaloader, modem, etc) 3. open a socket (this determines the first 2 bytes of most of the rest of the traffic) Then depending on the mode, the protocol varies. For Desktop, which is the protocol used for database access, it is something like: 4. fetch command code list 5. use the Database Access command code 6. fetch the database database 7. for each database you want to read, use the database access subcommands for read each record, or upload records, etc. The desktop mode is the largest, as it expands into other source files, such as the record parsers, which have the r_ prefix: r_bookmark.h r_cstore.h r_message.h r_task.h r_calendar.h r_folder.h r_saved_message.h r_timezone.h r_calllog.h r_hhagent.h r_pin_message.h r_servicebook.h r_contact.h r_memo.h r_sms.h These have .cc files as well. For other modes, the protocol is different, but still based on a socket system, so the initial steps are the same. You can see the various mode files with a m_ prefix: src/m_desktop* src/m_ipmodem* src/m_javaloader* src/m_jvmdebug* src/m_raw_channel* It will take some commitment to read through the code, as I don't have time to document things via email, but I can certainly point you at the right source files to look at if you find an apparent dead end. :-) Good luck, and please keep the us updated with your progress. If you can put your work under the doc/ directory somewhere, and send patches or git pull requests, I'd be pleased to include it in the official Barry sources. Thanks, - Chris ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Barry-devel mailing list Barry-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/barry-devel