![]() |
[ANNOUNCE] mbluetoothd
1 Attachment(s)
Hi,
as I needed an daemon to launch a mediaplayer when my bt headset connects I started a new project. mbluetoothd is written in python and is able to execute commands when a bluetooth device connects or disconnects. There's also mbluetoothdsettings which can be used to add and delete commands to your database (which is sqlite3 in this case). This is just a ALPHA! Howto: 1. extract the zip archive 2. move mbluetoothd to /home/user/.bluetoothd 3. run 'python mbluetoothd.py &' 4. run 'python mbluetoothdsettings.py' to add/delete commands 5. Enjoy 6. Post your feedback |
Re: [ANNOUNCE] mbluetoothd
2 Attachment(s)
This is what mbluetoothdsettings looks like.
|
Re: [ANNOUNCE] mbluetoothd
The functionality of mbluetoothd is already available in dbus-scripts, since bluetooth connect/disconnect events are reported on dbus. You could implement the GUI part to work with dbus-scripts rather than mbluetoothd, which would give it a better potential, since it could then be easily extended to other events (wifi connects, offline mode, etc.)
|
Re: [ANNOUNCE] mbluetoothd
Yeah, I'm sure there are better ways to do this but in this case the plan was to develop something simple for my two or three bt devices. There's conler for wifi .....
And mbluetoothd uses dbus. The daemon is a very simple peace of code. |
Re: [ANNOUNCE] mbluetoothd
The python program at
http://my.arava.co.il/~matan/770/dbu...ts-settings.py Is based on mbluetoothdsettings, implementing the functionality using dbus-scripts mbluetoothd. On improvement, in the ADD dialog, the bt addresses of paired device are available for selection, instead of needing to write them. There are still issues with permissions: * The configuration directory is not writeable by user - this needs to be corrected in the dbus-scripts package. * The dbus-scripts daemon needs to be restarted when the configuration file is written, which again requires root permissions. This may be fixed in a few ways. After I solve those problems, I will start to add other event types: * network connect/disconnect (either specific network or any). * lock/unlock keys. * slide keyboard open/close. * entering/leaving offline mode. * screen dimmed/blanked. * charger connected/disconnected. * etc. (all those events are supported by dbus-scripts, only GUI is needed). P.S. this is the first time I edit a python program, so there might be better ways to do much of what I do. |
Re: [ANNOUNCE] mbluetoothd
The mbluetooth gui was just a quick hack. I can provide a much better gui and I suggest we start a new project and work together on it.
|
Re: [ANNOUNCE] mbluetoothd
That's what I intended to suggest with my message.
I worked on the program a bit, and now the two problems are solved (or actually, hacked around). I uploaded a working package called dbus-scripts-settings to extras-devel, which provides full functionality of mbluetoothsettings and also allows network connection/disconnection events. I will be happy to cooperate with you on this project. Source package is here: http://repository.maemo.org/extras-d...ngs_1.0.tar.gz |
Re: [ANNOUNCE] mbluetoothd
hmm, tried it, hit save after setting up a couple of bluetooth entries, and it seems to hang...
|
Re: [ANNOUNCE] mbluetoothd
can you do:
while it hangs, run top and ps auxw, to see if some it is running in some loop or waiting for some external program (any process with PID greater than the one of dbus-scripts-settings is interesting). Also, can you run it from a terminal (preferable by ssh to the IT) and see if it prints anything when pressing save? |
Re: [ANNOUNCE] mbluetoothd
OK. I see the problem. You need to run as root after installing the package
update-sudoers I should test every package on a really really clean device, but it's unreasonable unless I have a device dedicated to testing. |
All times are GMT. The time now is 08:17. |
vBulletin® Version 3.8.8