I'm a KDE developer working in the new bluetooth stack. We are going
to use obex-data-server for that. Our idea is to have a as-small-as-
possible daemon (a kded) listening to events, and then launch a helper
process that deals with events like "incoming file tranfer".
So far so good, but it seems that obex-data-server doesn't like
dealing with multiple processes in this case: one is the kded, which
connects first to org.openobex.Manager for creating a bluetooth
server, and then when the server is created it connects with the
sessionCreated/sessionRemoved/errorOccured signals. Then there is the
bluetooth-helper, which connects to the org.openobex.ServerSession
when the kded tells it to do so. If I connect with the
org.openobex.ServerSession inside the kded without a helper,
everything works. Thing is, that's not the kded job and not what we
want.
In dbus monitor I don't get any org.freedesktop.X "do not have
permissions" signal so this doesn't seem to be a dbus-policy problem.
Instead, I get Cancelled+Disconnected signals in my
org.openobex.ServerSession, but then the transfer gets started, and I
get an org.openobex.Error.NotAuthorized answer to the Accept dbus
method call in the org.openobex.ServerSession. It's quite chaotic.
Here it is the dbus-monitor output: http://pastebin.com/Z71eVbrS
Maybe any of you know what could be happening?
Regards,
Eduardo Robles Elvira.
obex-data-server treats access rights (who can access particular dbus
paths) according to process id (basically, your dbus connection name).
For example if the process which created/started a particular ods server
(org.openobex.Server) dissapears from bus, this ods server is
automatically stopped and killed. The same applies to ods sessions.
However you can, for instance, listen to all signals coming from ods
from any process: you could create server with one process and listen
for ServerSessionStarted and all ServerSession signals from another
process. So I guess your problem is related to what I explained here. If
not, or you don't understand how you should deal with this problem, feel
free to contact me again and send obex-data-server debug output instead
of dbus monitor. This is how you get ods debugging output:
killall obex-data-server
obex-data-server -n
or
obex-data-server -nd
(for more debugging output)
Cheers,
Tadas Dailyda
Hello Tadas:
I have to test what you say, but what you tell me is most probably the
root of the problem I was experiencing. Thanks for the fast answer =)
Regards,
Eduardo Robles Elvira.