linux下轻量级蓝牙用法

来源:互联网 发布:免费搭建论坛 知乎 编辑:程序博客网 时间:2024/06/01 08:05

如果想用蓝牙存取文件,又不想安装blueman等笨重的东西,可以这样:

pacman -S bluez (安装蓝牙协议栈)
/etc/rc.d/dbus start
/etc/rc.d/bluetooth start
hcitool scan (查找设备)
bluez-simple-agent(依赖dbus-python和pygobject,它用于配对,需要配对时以root权限运行它)
pacman -S obexfs (用于文件操作)
obexfs -b <devices mac address> /mountpoint (以普通用户运行就行)

然后就可以在/mountpoint看到文件,可读可写,但注意不能用touch创建文件,可以echo > filename。另外速度很慢。

原创粉丝点击