Total Pageviews

Sunday 28 April 2024

blue

 

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

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

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

    小米音箱

    参考资料

  • DingdangD1-PoC
  • GGLyn swift version
  • Cloudflare Argo Tunnel 小试:我终于可以用树莓派做网站啦

from https://github.com/yihong0618/blue

No comments:

Post a Comment