I'm not sure if Im in the correct place at these forum to ask this question, but I want to run this command at start up:
Code:
$ sdptool browse 00:16:B8:1A:C0:80
Then i will get a respons like this (it's just a abridgement of the complete "answer"), IF my Cellphone has the Bluetooth turn on:
Code:
Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
Then i wanna check what "Channel" is set to, then run this command (gedit og nano?):
Code:
$ sudo gedit /etc/bluetooth/rfcomm.conf
The file rfcomm.conf will contain something like this:
Code:
#
# RFCOMM configuration file.
#
rfcomm0 {
device 00:16:B8:1A:C0:80;
channel 2;
comment "BT DUN";
}
And then check if "channel" is set to (see line 7 in code-snippet above) the same as "Service Name: Dial-up Networking"-respons from my Cellphone. If not, the script should write to the file "rfcomm.conf", and change channel to the correct channel number.
At the end of the script this command should be runned:
Code:
$ sudo rfcomm bind rfcomm0
If the Cellphone does not respond, i will get this message in terminal "Failed to connect to SDP server on 00:16:B8:1A:C0:80: Host is down", but the code above should be runned anyway.
Does anyone know how i could do this? I'm new to linux..
Bookmarks