zoukankan      html  css  js  c++  java
  • Ubuntu 和 MobilePhone 的 Bluetooth 互联

    因单位的Aliware机器显卡有问题,经常不显示GUI;又,偶尔需要用蓝牙和手机之间互传文件。

    故,ssh连接ubuntu,想通过命令行来和连接手机蓝牙 & 发送/接收文件。

    $ hciconfig


    $ hciconfig hci0 up
        [Error] Can't init device hci0: Operation not possible due to RF-kill (132)
        [Fix] rfkill unblock all
        OR
        rfkill list all


    $ sudo bluetoothctl
    > scan on
    > 当找到你需要连接的蓝牙设备时,输入scan off,停止探索
        ps, list的设备,不显示device name,只有bluetooth的mac address,
        在手机 关于手机-状态-蓝牙地址 中查看到bluetooth mac address,
        或在手机端尝试连接ubuntu,会在终端有log提示
    > pair <bt mac>    
    > connect <bt mac>
        [Error] Failed to connect: org.bluez.Error.Failed
        [Fix] install bluez-tools, 源码安装 bluez-hid2hci, 仍然没能解决
        +++ TBD +++

    $ bluetooth-sendto --device=<mac address>  <file>
        . send from ubuntu to mobile phone
        . although there was error:  Failed to connect: org.bluez.Error.Failed



    # REFERENCE

    $ hciconfig - HCI device configuration utility


    $ rfkill
        RFKill 是 Linux 内 核 中 的 一 个 子 系 统 ,它 可 提 供 一 个 界 面 ,在 此 界 面 中 可 查 询 、 激 活 并 取 消 激 活 计 算 机 系 统 中 的 无 线 电 传 输 。
        RFKill 界 面 位 于 /dev/rfkill
        使 用 命 令 rfkill list 获 得 设 备 列 表 ,每 个 都 包 含 与 之 关 联 的 索 引 号 ,从 0 开 始 。 您 可 以 使 用 这 个 索 引 号 让 rfkill 停 止 使 用 或 者 使 用 某 个 设 备 ,例 如 :   rfkill block 0 
          rfkill block wifi
          rfkill unblock  xx

  • 相关阅读:
    win10下查看进程,杀死进程
    Pycharm,debug调试时怎样带参数
    struts2,登录功能模块实现
    struts2处理.do后缀的请求
    struts2 修改action的后缀
    j2ee中如何拦截jsp页面?
    4个好用的JS联动选择插件
    css position:absolute 如何居中对齐
    使用jquery插件报错:TypeError:$.browser is undefined的解决方法
    phpcms v9后台多表查询分页代码
  • 原文地址:https://www.cnblogs.com/bouygues/p/12360975.html
Copyright © 2011-2022 走看看