HAL: Implement real hardware drivers (validators and dispensers) #15

Open
opened 2026-06-13 22:02:46 +00:00 by padreug · 0 comments
Owner

Migrated from aiolabs/lamassu-next#15 — opened by @padreug on 2026-01-26.\n\n## Overview

The HAL (Hardware Abstraction Layer) package currently only has mock drivers implemented. All real hardware drivers are stubbed and return "not yet implemented" errors.

Current State

// validators/mod.rs
impl BillValidator {
    pub fn new(driver: ValidatorDriver) -> Result<Self> {
        match driver {
            ValidatorDriver::Mock => Ok(MockValidator::new()),
            _ => Err(HalError::NotImplemented("Driver not yet implemented"))
        }
    }
}

Drivers to Implement

Bill Validators

  • Id003 - Most common MEI validator
  • Ccnet - CashCode NET protocol
  • CashflowSc - Crane validator
  • BnrAdvance - BNR cash recycler
  • Genmega - Genmega proprietary
  • Hcm2 - Hitachi cash recycler
  • Gsr50 - Glory SR-50

Bill Dispensers

  • Puloon - Most common (LCDM-1000/2000)
  • F56 - Fujitsu F56
  • Genmega - Genmega proprietary
  • Hcm2 - Hitachi
  • Gsr50 - Glory

Implementation Notes

Each driver needs:

  1. Serial port communication (tokio-serial)
  2. Protocol implementation (refer to lamassu-machine/lib/ for JS implementations)
  3. Error handling and recovery
  4. Unit tests with mock serial

Reference Code

The JavaScript implementations exist in lamassu-machine/lib/:

  • id003/ - MEI validator
  • puloon/ - Puloon dispenser
  • ccnet/ - CashCode
  • etc.

Priority

P0 - Critical blocker for physical ATM deployment

Without real drivers, the ATM can only run in mock mode.

  • lamassu-machine JS drivers
  • #11 (Cash-out flow needs dispenser)
> _Migrated from [aiolabs/lamassu-next#15](https://git.atitlan.io/aiolabs/lamassu-next/issues/15) — opened by @padreug on 2026-01-26._\n\n## Overview The HAL (Hardware Abstraction Layer) package currently only has mock drivers implemented. All real hardware drivers are stubbed and return "not yet implemented" errors. ## Current State ```rust // validators/mod.rs impl BillValidator { pub fn new(driver: ValidatorDriver) -> Result<Self> { match driver { ValidatorDriver::Mock => Ok(MockValidator::new()), _ => Err(HalError::NotImplemented("Driver not yet implemented")) } } } ``` ## Drivers to Implement ### Bill Validators - [ ] `Id003` - Most common MEI validator - [ ] `Ccnet` - CashCode NET protocol - [ ] `CashflowSc` - Crane validator - [ ] `BnrAdvance` - BNR cash recycler - [ ] `Genmega` - Genmega proprietary - [ ] `Hcm2` - Hitachi cash recycler - [ ] `Gsr50` - Glory SR-50 ### Bill Dispensers - [ ] `Puloon` - Most common (LCDM-1000/2000) - [ ] `F56` - Fujitsu F56 - [ ] `Genmega` - Genmega proprietary - [ ] `Hcm2` - Hitachi - [ ] `Gsr50` - Glory ## Implementation Notes Each driver needs: 1. Serial port communication (tokio-serial) 2. Protocol implementation (refer to lamassu-machine/lib/ for JS implementations) 3. Error handling and recovery 4. Unit tests with mock serial ## Reference Code The JavaScript implementations exist in `lamassu-machine/lib/`: - `id003/` - MEI validator - `puloon/` - Puloon dispenser - `ccnet/` - CashCode - etc. ## Priority P0 - **Critical blocker for physical ATM deployment** Without real drivers, the ATM can only run in mock mode. ## Related - lamassu-machine JS drivers - #11 (Cash-out flow needs dispenser)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/bitspire#15
No description provided.