Re: dbus of c program for adapter get/set properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>
>> I need to use dbus api to control my bluetooth adapter in my C program.
>> After I had read doc/adapter-api.txt and writed the codes, It can't work
>
> The answer is very simple, you are using fixed/hardcoded object path
> (/org/bluez/hci0) that is causing the problem. We made sure it won't
> work by adding the pid to the path so no one will have a change to
> hardcode an adapter path and the code still work after bluetoothd has
> restarted, the correct way of doing this is via '/' path (the only
> fixed path bluetoothd has) which implements org.bluez.Manager (see
> doc/manager-api.txt).
>

I have changed the code of bluez/src/manger.c,
and delete "getpid()" in func manager_init.
so the fixed object path (/org/bluez/hci0) works well.


> About the G_DBUS_METHOD_FLAG_ASYNC are really not for clients,
> although they hint the behavior of the daemon the client should know
> better whether to block or not.


the siample question is:
1) for dbus_connection_send_with_reply_and_block and
dbus_connection_send_with_reply,
which one I should use  for the sample code in the first email ?

2) for func dbus_message_append_args, the parm I had set is right or not?

thx a lot for you helps.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux