Add device configuration for HAL drivers #20

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

Migrated from aiolabs/lamassu-next#20 — opened by @padreug on 2026-01-27.\n\n## Summary

Add configuration system for specifying serial device paths and other hardware settings.

Background

Sintra uses specific device paths:

  • Bill validator: /dev/ttyJ5
  • Bill dispenser: /dev/ttyJ7

These need to be configurable per-machine without code changes.

Tasks

  • Create config schema for device settings
  • Support config file (e.g., device-config.json)
  • Support environment variables as override
  • Add validation for device paths (check exists, is character device)
  • Document configuration options

Example Config

{
  "validator": {
    "type": "id003",
    "device": "/dev/ttyJ5",
    "fiatCode": "USD"
  },
  "dispenser": {
    "type": "f56",
    "device": "/dev/ttyJ7",
    "cassettes": [
      { "denomination": 20, "count": 500 }
    ]
  }
}

Acceptance Criteria

  • App reads device paths from config file
  • Missing config shows clear error message
  • Invalid device path fails fast with helpful error

References

  • hardware/codebase/upboard/sintra/device_config.json - Original lamassu format
  • packages/hal/src/types.ts - ValidatorConfig, DispenserConfig interfaces
> _Migrated from [aiolabs/lamassu-next#20](https://git.atitlan.io/aiolabs/lamassu-next/issues/20) — opened by @padreug on 2026-01-27._\n\n## Summary Add configuration system for specifying serial device paths and other hardware settings. ## Background Sintra uses specific device paths: - Bill validator: `/dev/ttyJ5` - Bill dispenser: `/dev/ttyJ7` These need to be configurable per-machine without code changes. ## Tasks - [ ] Create config schema for device settings - [ ] Support config file (e.g., `device-config.json`) - [ ] Support environment variables as override - [ ] Add validation for device paths (check exists, is character device) - [ ] Document configuration options ## Example Config ```json { "validator": { "type": "id003", "device": "/dev/ttyJ5", "fiatCode": "USD" }, "dispenser": { "type": "f56", "device": "/dev/ttyJ7", "cassettes": [ { "denomination": 20, "count": 500 } ] } } ``` ## Acceptance Criteria - App reads device paths from config file - Missing config shows clear error message - Invalid device path fails fast with helpful error ## References - `hardware/codebase/upboard/sintra/device_config.json` - Original lamassu format - `packages/hal/src/types.ts` - ValidatorConfig, DispenserConfig interfaces
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#20
No description provided.