[Download] libhpcalcs: a toolkit for communicating with Prime calcs... Message #1 Posted by debrouxl on 17 Nov 2013, 2:59 a.m.
Over the past month or so, I've been working on reverse-engineering Prime communications (thanks to packet dumps sent by critor), and from that knowledge, implementing a 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).
I've posted about it in the traditionally TI community (TI-Planet, Omnimaga, Cemetech), but not in the HP community, as I didn't feel it's fully baked yet... but now that Edwin Ried has announced he's working on the same, I'd like to reduce reverse-engineering duplication work for him, and also, propose a more portable code base :)
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;
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/master/install_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 .
EDIT: 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...
From the POV of most end users, lack of a GUI makes the program worthless. That's why libhpcalcs wasn't announced outside of the traditionally TI community yet. I don't know how people here would react to working, but arguably hard to use for a significant portion of the target user base, code... therefore, as a newcomer, better staying quiet than spamming people with my programs too early, or so I thought :)
The architecture and API are derived from the time-proven libti* architecture. They're likely to be able to support the 39gII as well (should someone provide descriptor and packet dumps), which is closer to the Prime than, say, a TI-85 with BlackLink cable is to a Nspire with USB cable.
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 !);
- sending keypresses;
- 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.
Edited: 18 Nov 2013, 1:20 a.m. after one or more responses were posted
|