-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1119 from siiky/feat/lam-1089/bcs-device-script
LAM-1089 feat: script to find GenMega's BCS device path
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const bcs = require('../lib/scanner-genmega') | ||
const { argv } = require('node:process'); | ||
const device = argv[2] | ||
bcs.config({ scanner: { device } }) | ||
bcs.scanMainQR('BTC', (res, err) => { | ||
if (res) process.exit(0) | ||
process.exit(1) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
for dev in /dev/ttyS*; do | ||
echo "Trying ${dev}" | ||
timeout 5s node tools/bcs.js "${dev}" | ||
done |