Skip to content

Commit

Permalink
Merge pull request #1119 from siiky/feat/lam-1089/bcs-device-script
Browse files Browse the repository at this point in the history
LAM-1089 feat: script to find GenMega's BCS device path
  • Loading branch information
RafaelTaranto authored Apr 8, 2024
2 parents 9f04fea + 5d2c0ec commit 09f8a13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/bcs.js
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)
})
5 changes: 5 additions & 0 deletions tools/find-bcs-device.sh
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

0 comments on commit 09f8a13

Please sign in to comment.