Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content

This is a preview of the documentation for the next version of Cahute.

It may describe features that are not available in the latest release.

Cahute 0.6
Logo
Cahute 0.6

How-to guides

  • Installation guides
    • Installing Cahute on Linux distributions
    • Installing Cahute on macOS / OS X
    • Installing Cahute on Microsoft Windows
    • Installing Cahute on AmigaOS
  • Build from source guides
    • Building Cahute for Linux distributions
    • Building Cahute for macOS / OS X
    • Building Cahute for Microsoft Windows
    • Building Cahute for AmigaOS
  • Contribution guides
    • Contributing to Cahute
    • Reporting a bug or vulnerability
    • Requesting a feature
    • Packaging Cahute
    • Creating a merge request
  • Command line user guides
    • Getting information regarding a calculator
    • Sending a file to a calculator’s storage memory
    • Getting a file from the calculator’s storage memory
    • Displaying the screen from a calculator
  • Developer guides
    • Building with the Cahute library
    • Using device detection
      • Listing calculators connected by USB
      • Listing available serial ports
    • Using links
      • Opening a link to a calculator connected by USB
      • Opening a generic link to a calculator connected by serial
    • Reading and writing files
      • Guessing the type of a file
    • Using text conversion utilities
      • Converting text from an encoding to another
  • Miscellaneous guides
    • Getting started with Cahute in Visual Studio
    • Capturing USB communications for CASIO calculators on Windows using Wireshark

Discussion topics

  • Communication protocols
    • Rationales behind the communication protocols
    • Transports and protocols
    • USB detection for CASIO calculators
    • CAS40 protocol – Serial protocol used by pre-1996 calculators
      • CAS40 packet format
      • CAS40 data types
      • CAS40 flows
    • CAS50 protocol – Serial protocol used by calculators from 1996 to 2004
      • CAS50 packet format
      • CAS50 data types
      • CAS50 flows
    • CAS100 protocol – Serial protocol used by AFX / Graph 100
      • CAS100 packet format
      • CAS100 data types
      • CAS100 flows
    • CAS300 – Serial and USB protocol used by Classpad 300 / 330 (+)
      • CAS300 packet format
      • CAS300 commands
      • CAS300 flows
    • Protocol 7.00 – Serial and USB protocol used by post fx-9860G calculators
      • Specific formats for Protocol 7.00
      • Protocol 7.00 packet format
      • Protocol 7.00 communication flows
      • Known Protocol 7.00 commands by CASIO
      • Known Protocol 7.00 command extensions in fxRemote
      • Protocol 7.00 use cases
      • Known hardware identifiers for Protocol 7.00
    • Protocol 7.00 Screenstreaming – fx-9860G and fx-CG screenstreaming
      • Protocol 7.00 Screenstreaming packet format
      • Protocol 7.00 Screenstreaming communication flows
    • USB Mass Storage (UMS)
  • File formats
    • Known file extensions
    • CASIO container format
    • fx-CG add-ins
    • fx-9860G add-ins
    • Calculator Text Format (CTF)
    • CASIOLINK archives
    • casrc configuration file
    • Catalog files (CAT)
    • e-Activity files
    • eAct Maker file
    • fx-CG f-key files
    • fx-9860G f-key files
    • FX Program (FXP)
    • GraphCard file format
    • fx-CG language files
    • fx-9860G language files
    • Main memory archives
    • fx-CG picture
    • fx-CP picture
  • Other data formats
    • Number formats
    • Picture formats
    • Text encodings
  • Cahute features
    • System compatibility
    • Contexts
    • Links
    • Files
    • Main memory data
    • Logging facilities
  • Cahute internals
    • Internal compatibility utilities
    • Context internals
    • Link internals
    • File internals
    • Characters, encodings and conversions
    • Platform-specific utilities
      • AmigaOS specific implementation details
      • libusb specific implementation details
      • POSIX specific implementation details
      • Win16 specific implementation details
      • Win32 specific implementation details
  • Project management
    • Project governance
    • Git and release versioning
    • Contribution style
    • Coding style
    • Code of conduct
    • Community feedback

References

  • Command line reference
    • CaS command-line reference
    • p7 command line reference
    • p7os command line reference
    • p7screen command line reference
    • xfer9860 command line reference
  • Header reference
    • <cahute.h> – Main header for Cahute
      • <cahute/cdefs.h> – Basic definitions for Cahute
      • <cahute/config.h> – Cahute configuration details
      • <cahute/context.h> – Context management for Cahute
      • <cahute/data.h> – Calculator data resource and methods for Cahute
      • <cahute/detection.h> – Device detection for Cahute
      • <cahute/error.h> – Error definitions for Cahute
      • <cahute/file.h> – File related utilities for Cahute
      • <cahute/info.h> – Cahute library information
      • <cahute/link.h> – Calculator link resource and methods for Cahute
      • <cahute/logging.h> – Logging control for Cahute
      • <cahute/path.h> – Path related utilities for Cahute
      • <cahute/picture.h> – Picture format related utilities for Cahute
      • <cahute/text.h> – Text encoding related utilities for Cahute
  • CMake setting reference
Back to top

Links¶

All communication implementations are centered around resources called links. Internally, links are mostly constituted of:

  • A context; see Contexts for more information;

  • A platform-specific transport implementation;

  • A protocol, which is a set of resources and functions that do not constitute an interface, since protocols may obey different logics.

Links are opened using one of the following functions:

  • cahute_open_simple_usb_link();

  • cahute_open_usb_link();

  • cahute_open_serial_link().

Note

The internal behaviour of these methods is documented in Opening behaviours.

USB device names¶

On detection or opening a link to a USB device, the name or path depends on the platform:

  • On platforms using libusb, including Linux distributions and macOS, OS X, it represents the bus and address numbers in decimal separated by :, e.g. 001:014.

  • On Win32, it represents the device path, such as USB\VID_07CF&PID_6101\6&1ff8b909&0&9 or USB\VID_07CF&PID_6102\0000uJPLBWa1.

Generic links¶

While Cahute aims at implementing official and widespread community protocols, the portability of its transports can be appealing to developers implementing a custom, possibly program-specific protocol between a host and a CASIO calculator, notably for the host part.

Since Cahute does not expose transports publicly, it allows selecting a special kind of links called “generic links”, which allows the following functions to be used on such links:

  • cahute_receive_on_link();

  • cahute_send_on_link();

  • cahute_set_serial_params_to_link().

The following methods can be used to open a generic link with Cahute:

  • Call cahute_open_serial_link() with the CAHUTE_SERIAL_PROTOCOL_NONE protocol, for opening a generic link over a serial transport;

  • Call cahute_open_simple_usb_link() or cahute_open_usb_link() with the CAHUTE_USB_NOPROTO flag, for opening a generic link to a USB device.

The following developer guides demonstrate how to open and use generic links using the aforementioned methods:

  • Opening a generic link to a calculator connected by serial.

Next
Files
Previous
Contexts
Copyright © 2024-2025, Thomas Touhey
Made with Sphinx and @pradyunsg's Furo
Cover image by Massena
On this page
  • Links
    • USB device names
    • Generic links