Themyth
V2EX  ›  macOS

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

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


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

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

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