linux系统怎样连手机,Linux下手机与蓝牙的连接配置
我的設備如下:
電腦:安裝ubuntu6.06(6.06版本內核已自帶藍牙模塊)
手機:Nokia5500
電腦上裝有USB藍牙適配器
1.配置/etc/bluetooth/hcid.conf
#
#HCIdaemonconfigurationfile.
#
#HCIdoptions
options{
#Automaticallyinitializenewdevices
autoinityes;
#SecurityManagermode
#none-Securitymanagerdisabled
#auto-UselocalPINforincomingconnections
#user-AlwaysaskuserforaPIN
#
#修改成auto模式
securityauto;
#Pairingmode
#none-Pairingdisabled
#multi-Allowpairingwithalreadypaireddevices
#once-Paironceanddenysuccessiveattempts
pairingmulti;
#DefaultPINcodeforincomingconnections
#默認PIN碼,與手機匹配時使用
passkey"1234";
}
#DefaultsettingsforHCIdevices
device{
#Localdevicename
#%d-deviceid
#%h-hostname
#設置PC端的藍牙名稱,可隨意設置
name"%h-%d";
#Localdeviceclass
class0x3e0100;
#Defaultpackettype
#pkt_typeDH1,DM1,HV1;
#InquiryandPagescan
iscanenable;pscanenable;
discovto0;
#Defaultlinkmode
#none-nospecificpolicy
#accept-alwaysacceptincomingconnections
#master-becomemasteronincomingconnections,
#denyroleswitchonoutgoingconnections
lmaccept;
#Defaultlinkpolicy
#none-nospecificpolicy
#rswitch-allowroleswitch
#hold-allowholdmode
#sniff-allowsniffmode
#park-allowparkmode
lprswitch,hold,sniff,park;
}
2.配置完成后,重啟藍牙服務
sudo/etc/init.d/bluetoothrestart
3.手機連接PC端藍牙設備,完成匹配,匹配時需要輸入hcid.conf中的匹配碼
4.配置/etc/bluetooth/rfcomm.conf
#
#RFCOMMconfigurationfile.
#
rfcomm0{
#Automaticallybindthedeviceatstartup
bindyes;
#Bluetoothaddressofthedevice
#手機端的藍牙地址可以通過hcitoolscan獲得
device00:18:0F:8B:B0:63;
#RFCOMMchannelfortheconnection
channel1;
#Descriptionoftheconnection
comment"NOKIA5500Bluetoothdevice";
}
配置完成后,可以用rfcommconnect0連接手機
4.下載安裝GNOME下的GUI藍牙工具
sudoapt-getinstallgnome-bluetoothgnome-phone-manager
5.開啟藍牙文件共享服務
gnome-obex-server用來接收手機端發送過來的文件
gnome-obex-send發送文件到手機端,在gnome里也可以選擇文件點右鍵發送到手機(發送為選擇Bluetooth)
gnome-phone-manmager啟用后選擇手機設置,可以通過PC端給朋友發短信
備注:gnome-obex-send找不到手機的解決辦法
sudohciconfighci0inqmode0
輸入您的搜索字詞 提交搜索表單
總結
以上是生活随笔為你收集整理的linux系统怎样连手机,Linux下手机与蓝牙的连接配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: gps两点距离 php,PHP应用:PH
- 下一篇: linux查看msf安装目录,linux