Skip to content

bidwbb/ngz

Repository files navigation

NGZ — SPORTident Card Reader

A desktop app for reading SPORTident cards at orienteering events. Shows a full-screen happy/sad face result display with course validation — great for school and youth events.

Quick Start

1. Download

Go to the Releases page and download the right file for your computer:

  • Windows: NGZ Setup 0.1.1.exe (installer) or NGZ 0.1.1.exe (portable, no install needed)
  • macOS: NGZ-0.1.1.dmg
  • Linux: NGZ-0.1.1.AppImage

2. Install the USB Driver

Your computer needs the Silicon Labs CP210x driver to communicate with the SPORTident station.

  • Windows: Download from Silicon Labs. Windows 10/11 may install it automatically when you plug in the station.
  • macOS: Download from Silicon Labs.
  • Linux: Usually built in. If the station isn't detected, run sudo usermod -a -G dialout $USER and log out/in.

3. Run

  1. Plug in your SPORTident station via USB
  2. Launch NGZ
  3. Select the COM port (auto-detected SPORTident stations are marked with ★)
  4. Select an event (Animal-O is built in, or create your own)
  5. Click Connect — the station beeps twice when ready
  6. Insert SI cards to read them!

How It Works

Reading Cards

Insert an SI card into the station and a full-screen result appears:

  • Green happy face + ascending chime = all controls correct
  • Red sad face + descending buzz = missing or wrong controls

Shows the course name, race time, card number, and a per-control breakdown. Click to pause the display, click again to dismiss (or it auto-dismisses after 10 seconds).

Events and Courses

An event is a set of courses. On the setup screen:

  • The Animal-O event is built in with 10 courses (Lion, Bee, Crab, etc.)
  • Click + New Event to create your own:
    • Paste Controls — type courses like Lion: 31, 33, 36, 38, 39 (one per line)
    • IOF XML — import a course file from Purple Pen, OCAD, or Condes

The app auto-detects which course a card matches based on the punches.

Course Validation

  • Inline courses: Controls must appear in the correct order. Extra controls are allowed (the app only checks that the required sequence is present).
  • Score-O courses: Controls can be in any order.
  • Only punches between the card's start and finish times are considered, so you don't need to clear cards between runs.

Log Screen

  • Read History: Table of all cards read with OK/PM status
  • Protocol Log: Raw SI protocol messages for debugging

Station Configuration

Your SPORTident station must be configured with:

  1. Extended protocol → ON
  2. Handshake mode → ON (autosend → OFF)
  3. Operating mode → Readout

Configure using SI-Config or SportIdent Config+.

Supported SI Cards

SiCard 5, 6, 6*, 8, 9, 10, 11, SIAC (including 192-punch mode)

Troubleshooting

Windows: CP210x driver installed but station not appearing under Ports

After installing the CP210x driver and plugging in the SPORTident station, it may appear under Other devices as "SPORTident USB to UART Bridge Controller" with a warning icon instead of under Ports (COM & LPT). To fix this, force Windows to use the CP210x driver:

  1. In Device Manager, right-click SPORTident USB to UART Bridge ControllerUpdate driver
  2. Choose Browse my computer for drivers
  3. Choose Let me pick from a list of available drivers on my computer
  4. In the device type list, select Ports (COM & LPT) → Next
  5. On the left (Manufacturer), select Silicon Labs
  6. On the right, select Silicon Labs CP210x USB to UART Bridge → Next

The device should now appear under Ports (COM & LPT) with a COM port number.

"No SPORTident station found"

  • Check USB connection and make sure the CP210x driver is installed
  • Try unplugging and replugging the USB cable
  • Linux: sudo usermod -a -G dialout $USER

"Master station did not answer"

  • Verify station is in readout mode with extended protocol
  • Ensure no other program (SI-Config, etc.) is using the serial port

Windows SmartScreen warning

The app is not code-signed, so Windows may show a blue warning the first time you run it. Click More infoRun anyway. This only happens once.


For Developers

Prerequisites

Install and Run

# Install dependencies
npm install
npm install serialport
npm install --save-dev @types/serialport
npm run renderer:install

# Development mode (hot-reload)
npm run dev

# Build and run production
npm start

CLI (no GUI)

npx ts-node src/cli.ts              # Auto-detect SI station
npx ts-node src/cli.ts COM3         # Specify port
npx ts-node src/cli.ts --list       # List available ports

Building Installers

npm run dist:win     # Windows .exe
npm run dist:mac     # macOS .dmg
npm run dist:linux   # Linux .AppImage

Installers are output to the release/ folder. The GitHub Actions workflow builds all three platforms automatically when you push a version tag (git tag v0.2.0 && git push origin v0.2.0).

Project Structure

ngz/
├── src/                        # Core library (no Electron dependency)
│   ├── si-protocol/            # SI protocol implementation (from GecoSI)
│   │   ├── crc.ts              # CRC calculator
│   │   ├── SiMessage.ts        # Frame structure and constants
│   │   ├── SiDataFrame.ts      # Card data parsers
│   │   ├── SiDriver.ts         # Protocol state machine
│   │   ├── SiSerial.ts         # Serial port adapter
│   │   └── __tests__/          # Unit tests with real card data
│   ├── course-validator/       # Course validation algorithms
│   │   └── validator.ts        # Inline (Levenshtein) + Score-O
│   └── cli.ts                  # CLI card reader tool
├── electron/
│   ├── main.ts                 # Electron main process
│   ├── preload.ts              # IPC bridge to renderer
│   └── renderer/               # React UI (Vite + React)
│       └── src/
│           ├── App.tsx          # Main app component
│           └── App.css          # Styles
├── .github/workflows/
│   └── build.yml               # CI/CD: builds all platforms on tag push
└── package.json

Credits

  • SI protocol ported from GecoSI by Simon Denier (MIT)
  • CRC calculator from SPORTident (CC BY 3.0)
  • Course validation inspired by EasyGec by Thierry Porret

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors