![]() |
change bluetooth device class from QT app using bluez
Hi
I'm writing an app in Qt using NokiaQtSDK to make the n900 become a handsfree device. I need to call the bluez function to change the device class but it required that my application have superuser access (root access). What's the best way to achieve this? |
Re: change bluetooth device class from QT app using bluez
Add a file in /etc/sudoers.d/ (take a look at the files there, there are a lot of examples :))
then execute update-sudoers in your postinst and postrm files. After that you can just use sudo. |
Re: change bluetooth device class from QT app using bluez
Quote:
|
Re: change bluetooth device class from QT app using bluez
Quote:
|
Re: change bluetooth device class from QT app using bluez
update-sudoers :p
Code:
#!/bin/sh Code:
Nokia-N900:~# cat /etc/sudoers.d/psfreedom.sudoers |
Re: change bluetooth device class from QT app using bluez
Quote:
I studied the bluemaemo project source because it uses this sort of mechanism. It uses the debian rules file to copy the .sudoers file into the directory. |
Re: change bluetooth device class from QT app using bluez
Yeah, you need to install it in /etc/sudoers.d as I said above, I use debian/install and dh_install in debian/rules (which is cleaner imo), see the source of psfreedom
|
Re: change bluetooth device class from QT app using bluez
Quote:
|
Re: change bluetooth device class from QT app using bluez
Hmm, I think you need to edit the .pro file, when I'm done with a C++ app I usually just take it out of the SDK.
See facebrick's .pro file (from it's source) |
All times are GMT. The time now is 12:59. |
vBulletin® Version 3.8.8