Post Reply 
libhpcalcs: portable (Windows / MacOS X / Linux) connectivity kit library
12-12-2013, 05:55 PM (This post was last modified: 12-13-2013 06:15 AM by debrouxl.)
Post: #1
libhpcalcs: portable (Windows / MacOS X / Linux) connectivity kit library
Since mid-October 2013, I've been working on reverse-engineering Prime communications (thanks to packet dumps sent by critor), and from that knowledge, implementing a lightweight backend for a FLOSS third-party Prime connectivity kit aimed at Windows, Linux and MacOS X (possibly FreeBSD and derivatives as well, the USB HID library I've chosen to use works on FreeBSD) Smile
No dependency on a huge, bloated non-native framework.

libhpcalcs currently has support for the following operations, through a terminal-based interface ("test_hpcalcs"):
* sending files;
* receiving files;
* receiving backups;
* receiving screenshots;
* getting undecoded information about the calculator, including firmware version;
* setting the calculator's time;
* triggering some form of "ready" check, or something like that;
* sending keypresses.
(more is in the pipeline)

Development source code: https://github.com/debrouxl/hplp (master branch is stable, master2 contains changes for testing, which may be rewritten before integration to master)
Ready-made install script aimed at *nix: https://raw.github.com/debrouxl/hplp/mas...ll_hplp.sh. Unless your distro packages hidapi (Debian and derivatives do not), you'll have to compile it yourself (autotools-based program, so configure && make && sudo make install).
Latest Windows binaries + source tarball: http://tiplanet.org/beta/libhpcalcs-0.0.1-package.zip .
Program to be run after decompressing or compiling: test_hpcalcs(.exe).


The current state of the code base (written in C99 for interoperability and portability, BTW) is that:
* on the plus side, the aforementioned operations usually work, for my several beta-testers, on Windows, Linux and MacOS X. One of the operations is reported to choke on MacOS X, but it works on Linux and Windows;
* on the minus side, there's no post-processing of screenshots so that they have proper colors... and most of all, there's no GUI yet...

The architecture and API are derived from the time-proven libti* architecture. They can support the 39gII, which is closer to the Prime than, say, a TI-85 with BlackLink cable is to a Nspire with USB cable. Ditto for computer versions of the Prime.

The Prime might support more operations, but that's undetermined yet. For instance (those are operations available on some, or all, TI graphing calculators):
* quickly getting the list of files without triggering a lengthy full backup ("dirlist", an very important operation - IMO, if HP hasn't implemented it yet, they should do it !);
* remote file operations (delete, rename, maybe even calculator-side copy).


Tim Wessman needs to be thanked once more for publicly helping with the peculiarities of CRC computations and screenshots on the Prime Smile
Thanks to the beta testers and users as well.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
libhpcalcs: portable (Windows / MacOS X / Linux) connectivity kit library - debrouxl - 12-12-2013 05:55 PM



User(s) browsing this thread: 1 Guest(s)