/blue

新的 PR(Issue) 来了来了来了!

Primary LanguagePythonMIT LicenseMIT

blue

image

pr.mp4

新的 PR(Issue) 来了来了来了!

树莓派 + 蓝牙热敏打印机 + 内网穿透 + GitHub Actions

如何在树莓派中设置蓝牙设备并找到地址

  1. bluetoothctl (以下步骤都在 ctl 中执行)
  2. agent on
  3. discoverable on
  4. scan on --> 这步找到蓝牙热敏打印机的地址
  5. trust ${地址}
  6. pair ${地址}

利用 rfcomm 连接

sudo rfcomm connect 1 ${地址} &

how to?

  • raspberry(3b+) 以上有蓝牙的版本 set up bluetooth
  • 内网穿透
  • 更改 raspberry_printer 中的 secret (为了安全)
  • 找到蓝牙设备地址
  • 利用 rfcomm 连接蓝牙设备
  • 启动 server
  • 设置 GitHub Actions
  • Enjoy it

raspberry server

  • pip install -r requirements.txt
  • nohup python3 app.py &
  • or use Gunicorn or uWSGI or others

GitHub Actions

  • change ./github/workflows/new_pr_bluetooth.yml to your own
  • add secret BLUE in your repo (Actions secrets)
  • Done or left some issues

小米音箱

参考资料

赞赏

  • 谢谢就够了
  • Just enjoy it.