Fork de la libp7 avec un système de build CMake.
Go to file
Thomas Touhey af5948d8ec Changed the logging system. 2017-04-22 02:31:58 +02:00
doc Added HTML generation, slightly clarified p7_sinit's manpage 2017-03-03 15:57:21 +01:00
include Changed the logging system. 2017-04-22 02:31:58 +02:00
src Changed the logging system. 2017-04-22 02:31:58 +02:00
tools Corrected serial management, made libg1m required. 2017-04-03 16:36:21 +02:00
.editorconfig Here, an editor configuration file. 2017-01-16 18:23:59 +01:00
.gitignore Added HTML generation, slightly clarified p7_sinit's manpage 2017-03-03 15:57:21 +01:00
AUTHORS.md Added commands to the server. 2017-01-25 14:13:07 +01:00
CONTRIBUTING.md Added some documents. 2017-02-07 16:25:48 +01:00
LICENSE.md To LGPL. 2017-01-26 15:10:40 +01:00
Makefile Reorganized a little, better comments in headers. 2017-03-25 13:43:44 +01:00
Makefile.msg Corrected quirks and added MS-Windows cross-compilation utilities 2016-12-21 16:30:08 +01:00
Makefile.vars Tried new things in headers. 2017-04-20 02:28:36 +02:00
PORTING.md Modified way streams are managed. 2017-02-07 17:54:11 +01:00
README.md Started integrating libg1m usage, reorganized. 2017-02-25 10:55:27 +01:00
TODO.md Updated TODO. 2017-01-19 15:48:44 +01:00
configure Corrected serial management, made libg1m required. 2017-04-03 16:36:21 +02:00

README.md

libp7 - Casio Communication Protocol 7.00 implementation

Introduction

Protocol 7.00 (or "Protocol 7") is the communication protocol used by CASIO FX calculators, between them and with a PC (serial and USB). It allows model identification, file interaction (with main memory and flash/SD storage devices), screenstreaming and OS updating.

This library, under LGPL, brings functions to send and receive packets, and packet flows such as file getting/sending, remote file interaction (listing, copying, deleting), filesystem optimization, screen receiving and OS Update-related (backup, executable sending). No interaction with the main memory is implemented yet.

Screen receiving is only supported for monochrome calculator as the format for other calculators are yet to be known.

This library has two main parts: find the devices to communicate with, through cross-platform streams (P7 streams, a superset of local streams, including libc and libusb ones), and talk P7 with them.

This library require environment knowledges because of protocol failure. Those are hardcoded; for each newly discovered environment (new calculator, ...), entry must be added in the src/core/devices.c file, in the known_environments list, using and updating command masks if necessary. A precise environment listing is required to have a clean detection of what commands and devices we can or cannot run so we don't have any surprise.

More on the P7 homepage.

Prerequisites

Side note: the library might work with older versions of these dependencies, I took these as a reference because these are the ones I work with.

Making-only dependencies

Name Version
make >= 4.0
gcc >= 4.9
binutils >= 2.25
asciidoc >= 8.6.9
gzip >= 1.6

Making and runtime dependencies

Name Version
libusb >= 1.0
libg1m >= 1.0

Configuring

First of all, the configure script has a help message where all of the options are listed. The defaults should be appropriate for a native build, just ./configure if that's what you want to do, but you should read at least the next paragraph.

If you're installing on or packaging for a GNU/Linux distribution, you might want to install the udev rule to let the access to the direct calculator connexions to normal users. As calculators can be connected as serial devices, which are attributed to the uucp group (on Manjaro GNU/Linux), I chose to attribute the uucp group to calculators plugged directly as USB. If you agree with that, just add the --udev option to the configuration command line; otherwise, make your own, or make nothing, I don't really care.

Building for the MS-Windows platform is supported, just use a -mingw32 target.

Also, building a static library, for both PC and embedded systems, is supported : just use the --static option. If you want to build a static library so that a cross-compiler that uses Microsoft Windows static library formats, add the --windows option (notice that for a -mingw32 target and a dynamic library generation, this option is automatically added).

Building and installing

Once configuring is done, just make. To install, use make install.

To build and install only the lib, use all-lib and install-lib.
To build and install only the docs, use all-doc and install-doc.

If you ought to package this library, use the DESTDIR Makefile variable, e.g. make install DESTDIR=./package-root. Do not use the --root configure options for this, as configure tools (libp7-config and the pkg-config configuration file) will add what's in the --root option value but not in the DESTDIR option.

Other useful targets:

  • uninstall, uninstall-lib, uninstall-bin uninstall-doc: will try to uninstall using the current configuration;
  • mostlyclean, clean, clean-doc, mclean-lib, clean-lib: remove built files at different levels;
  • re, re-lib, re-doc: regenerate built files at different levels (clean and build) -- useful when configuration changes.