我的设备如下:
电脑:安装Ubuntu 6.06 (6.06版本内核已自带蓝牙模块)
手机: Nokia 5500
电脑上装有USB蓝牙适配器
1.配置/etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none – Security manager disabled
# auto – Use local PIN for incoming connections
# user – Always ask user for a PIN
#
#修改成auto模式
security auto;
# Pairing mode
# none – Pairing disabled
# multi – Allow pairing with already paired devices
# once – Pair once and deny successive attempts
pairing multi;
# Default PIN code for incoming connections
# 默认PIN码,与手机匹配时使用
passkey “1234”;
}
# Default settings for HCI devices
device {
# Local device name
# %d – device id
# %h – host name
# 设置PC端的蓝牙名称,可随意设置
name “%h-%d”;
# Local device class
class 0x3e0100;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
discovto 0;
# Default link mode
# none – no specific policy
# accept – always accept incoming connections
# master – become master on incoming connections,
# deny role switch on outgoing connections
lm accept;
# Default link policy
# none – no specific policy
# rswitch – allow role switch
# hold – allow hold mode
# sniff – allow sniff mode
# park – allow park mode
lp rswitch,hold,sniff,park;
} 2.配置完成后,重启蓝牙服务
sudo /etc/init.d/bluetooth restart
3.手机连接PC端蓝牙设备,完成匹配,匹配时需要输入hcid.conf中的匹配码
4.配置/etc/bluetooth/rfcomm.conf
#
# RFCOMM configuration file.
#
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
# 手机端的蓝牙地址可以通过hcitool scan获得
device 00:18:0F:8B:B0:63;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment “NOKIA 5500 Bluetooth device”;
}
配置完成后,可以用rfcomm connect 0连接手机
4.下载安装GNOME下的GUI蓝牙工具
sudo apt-get install gnome-bluetooth gnome-phone-manager
5.开启蓝牙文件共享服务
gnome-obex-server 用来接收手机端发送过来的文件
gnome-obex-send 发送文件到手机端,在gnome里也可以选择文件点右键发送到手机(发送为选择Bluetooth)
gnome-phone-manmager 启用后选择手机设置,可以通过PC端给朋友发短信
备注:gnome-obex-send找不到手机的解决办法
sudo hciconfig hci0 inqmode 0
Linux下手机与蓝牙连接配置方案
转载请注明出处:服务器评测 » Linux下手机与蓝牙连接配置方案
相关推荐
- *🍂 黑色星期五前促销🔥30% 折扣!👉 即时服务器!💎 不限流量!💎 Ryzen 9 ECC
- 新加坡 AMD Ryzen 和 AMD EPYC 售价 129 美元起!
- *黑色星期五特惠,每月 29 美元起 | 即时设置 Intel AMD Nvida | 3 个美国地点
- *ShineServers.Com ★ Intel Atom C2350 起价 69.40 美元/月 ★ 10% 定期折扣 ★ 欧盟/美国/阿联酋/印度
- ★ PSYCHZ NETWORKS ★ – 10Gbps 无限流量服务器闪电战
- WordPress使用腾讯云CDN配置如何实现https访问?
- 阿里云ecs服务器购买流程教程(小白架设图文教程)
- 云谷XenSystem云主机管理系统,云谷主机管理系统价格多少钱?