Skip to content

Repository containing all Keyple ticketing demo applications. This demo is an open source project provided by Calypso Networks Association, you can adapt the demo for your cards, terminals, projects, etc.

License

Notifications You must be signed in to change notification settings

calypsonet/keyple-demo-ticketing

Keyple Demo Ticketing Ecosystem

License Java Android

A comprehensive open source ticketing ecosystem demonstrating the Eclipse Keyple middleware in real-world use cases. This project is provided by the Calypso Networks Association and serves as a foundation for building contactless card and NFC smartphone-based ticketing systems.

Overview

The Keyple Demo Ecosystem consists of three interconnected applications that simulate a complete public transportation ticketing workflow:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   RELOAD DEMO   │────>│ VALIDATION DEMO │────>│  CONTROL DEMO   │
│                 │     │                 │     │                 │
│ Load contracts  │     │ Validate entry  │     │ Check validity  │
│ onto cards      │     │ to transport    │     │ after use       │
└─────────────────┘     └─────────────────┘     └─────────────────┘

Application Roles

  • Reload Demo: Remote contract loading using distributed client/server architecture
  • Validation Demo: Entry validation for transportation networks
  • Control Demo: Post-validation card inspection and compliance checking

Supported Card Technologies

Calypso Cards

Standard Calypso contactless cards supporting:

  • Secure sessions with SAM authentication
  • Multiple contracts (1-4 depending on product type)
  • Cryptographic security operations
  • Full transaction traceability

Storage Cards

Simple storage cards featuring:

  • Basic read/write operations without SAM requirements
  • Single contract storage
  • Simplified validation procedures
  • Note: This demo implementation is intentionally basic for demonstration purposes

Security Consideration: Storage Card implementations in this demo lack production-level security mechanisms. Production deployments should implement appropriate cryptographic protections, signature verification, and secure key management.

Architecture

Distributed Client/Server Model

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Mobile/Web    │     │   Java Server   │     │      SAM        │
│    Clients      │────>│   + Dashboard   │────>│   (Security)    │
│                 │     │                 │     │                 │
│ User Interface  │     │ Business Logic  │     │ Cryptographic   │
│ Card Interface  │     │ Data Management │     │   Operations    │
└─────────────────┘     └─────────────────┘     └─────────────────┘

Supported Platforms

Client Applications:

  • Android 7.0+ (Native and KMP)
  • iOS 14+ (KMP)
  • Windows Desktop (.NET 7.0)
  • JVM Desktop (Kotlin Multiplatform)

Server Requirements:

  • Java 8+ with PC/SC reader
  • SAM (Security Access Module) for Calypso cards
  • Web dashboard for monitoring

Quick Start

1. Server Setup

# Download latest server release
wget https://github.com/calypsonet/keyple-demo-ticketing/releases/latest

# Start server (requires PC/SC reader with SAM)
java -jar kdt-reloading-server-X.Y.Z-full.jar

# Access dashboard at http://localhost:8080

2. Card Personalization

Use any client application's personalization feature to initialize cards with:

  • Environment data (validity dates, application number)
  • Clean contract slots
  • Reset event logs and counters

3. Workflow Execution

  1. Load Contracts: Use Reload Demo to add Season Pass or Multi-trip tickets
  2. Validate Entry: Present card to Validation Demo terminal
  3. Control Check: Verify card status using Control Demo

Supported Hardware

Tested Terminals

  • Famoco FX205 - Enterprise NFC terminal
  • Coppernic C-One 2 - Rugged Android terminal
  • Standard NFC Smartphones - Consumer devices
  • PC/SC Readers - Desktop integration

Proprietary Plugins (Available on Request)

  • Bluebird EF501
  • Flowbird Axio 2

Contact CNA for access to proprietary terminal plugins.

Data Model

The ecosystem uses standardized data structures defined in the Common Library:

  • Environment Record: Card metadata and validity information
  • Event Log: Transaction history and validation events
  • Contract Records: Transportation titles and their properties
  • Counter Files: Usage tracking for multi-trip and stored value

See Common Library Documentation for detailed specifications.

Development

Prerequisites

  • JDK 8+ for server components
  • Android Studio for mobile development
  • Node.js for web dashboard
  • PC/SC compatible readers for testing

Project Structure

keyple-demo-ticketing/
├── README.md                               # This file
├── src/common/                             # Shared data structures and utilities
├── src/reloading-remote/                   # Remote reload clients and server
│   ├── server/                             # Java server application
│   ├── client/
│   │   ├── keyple-mobile-android/          # Android native client
│   │   ├── pc-dotnet/                      # .NET desktop client  
│   │   └── interop-mobile-multiplatform/   # Kotlin Multiplatform client
├── src/validation/                         # Android validation terminal
└── src/control/                            # Android control terminal

Building from Source

# Build all components
./gradlew build

# Run tests
./gradlew test

# Start development server
./gradlew startServer

Card Application Identifiers

Compatible Calypso card AIDs:

  • A000000291FF9101 - Keyple Generic test card
  • 315449432E49434131 - CD Light/GTML Compatibility
  • 315449432E49434133 - Calypso Light
  • A0000004040125090101 - Navigo IDF

Test cards available in the CNA Test Kit.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Follow the coding standards and documentation templates
  4. Submit a pull request with clear description
  5. Ensure all tests pass and documentation is updated

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Support

Related Projects

About

Repository containing all Keyple ticketing demo applications. This demo is an open source project provided by Calypso Networks Association, you can adapt the demo for your cards, terminals, projects, etc.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •