-1

Im working on an embedded system that will provide a custom bluetooth service to be used by other devices. It is running ubuntu 13.04 and thus, bluez 4.101. By default a lot of services are enabled in bluez (seen by running sdptool browse against the device). I have been able to disable all but one by using the follwoing (undocumented) line in /etc/bluetooth/main.conf

DisablePlugins = network,input,audio

However, one service is still there, namely Dial-up Networking. I would like our device to only provide our own, custom service and nothing else, but whatever I tried I can't figure out how to disable Dial-up Networking.

So the question is: How can I disable the Dial-Up Networking service/profile in bluez 4?

2 Answers2

1

Dial-up Networking is provided by a plugin named pnat:

DisablePlugins = network,input,audio,pnat
0

Rather than editing /etc/bluetooth/main.conf have you tried using "sdptool del" instead? That is, use "sdptool browse" to get the record_handle and then "sdptool del record_handle".

kaylum
  • 13,833
  • 2
  • 22
  • 31
  • I didn't think about using sdptool del, but it works and I can remove Dial-up networking service. The only downside is that it must be run on each startup (and each restart of the bluetooth service), but this is manageble i guess. I actually already have some settings that I handle like this (turning off sspmode for example) since I cant figure out how to configure it persistently. So I might just add this to the bunch! Thanks for the help! – Martin Sträng Dec 18 '14 at 08:17
  • Glad that works for you. You may be already doing this - a good way of achieving these settings is via a udev rule. Here is my rule. It just brings up the hci interface whenever a new one is created by the kernel (e.g. if I plug in an usb bluetooth dongle or if I'm tesing and doing rmmod/insmod on the bluetooth drivers). In your case you could run a script that turns off sspmode, removes sdp services, etc: ACTION=="add", KERNEL=="hci*", RUN+="/bin/hciconfig %k up" – kaylum Dec 18 '14 at 21:45