Themyth
V2EX  ›  macOS

mac os x 如何让某个蓝牙设备无法连接?

  •  
  •   Themyth · Apr 25, 2017 · 5055 views
    This topic created in 3491 days ago, the information mentioned may be changed or developed.
    特殊需求,如何屏蔽某个蓝牙设备无法连接 mac?
    8 replies  •  2017-04-26 17:27:51 +08:00
    paloalto
    paloalto
    Apr 25, 2017
    1


    从 devices 里移除掉?
    Themyth
    Themyth
    OP
    Apr 25, 2017
    2
    @paloalto 这样他在我电脑前很轻松的配对一下不就又连接了么?
    我指的是有没有不好重新配对的方法,譬如在命令行下输入些什么命令来限制?
    感谢!
    paloalto
    paloalto
    Apr 25, 2017 via iPhone
    3
    “他在我电脑前很轻松的配对一下”,这句话的意思是别人能操作你的电脑吗?
    从 devices 删除之后,需要经过电脑操作确认后,蓝牙设备才会再次连接成功。我没记错的话是这样的,你可以试试。
    不过如果你的电脑能被其他人操作的话,那就没有什么好办法了。
    evillions
    evillions
    Apr 26, 2017
    4
    @Themyth 是不是蓝牙会莫名其妙的连上附近的 mac ?
    Themyth
    Themyth
    OP
    Apr 26, 2017
    5
    @paloalto 有没有增加点操作难度的办法?就像是 iptables 屏蔽某个 IP 一样。。。
    thekoc
    thekoc
    Apr 26, 2017
    6
    @Themyth #5
    增加难度的话:
    `system_profiler SPBluetoothDataType`
    用这个命令可以查看蓝牙设备状况。

    `defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0`
    用这个命令可以关闭蓝牙。

    配合起来可以做到检查到某个设备连接时自动关闭蓝牙。
    如果要做到某个设备连接时,自动 Disable 掉这个指定设备,可能要用到原生代码了。
    Themyth
    Themyth
    OP
    Apr 26, 2017
    8
    @thekoc 看起来不错,基本解决我的问题了,感谢!!!非常感谢!
    @hackpro 我呆会看一下先,谢谢啦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2033 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 14:54 · PVG 22:54 · LAX 06:54 · JFK 09:54
    ♥ Do have faith in what you're doing.