public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* Simple-agent in C
@ 2008-11-20 13:16 Alan Carvalho de Assis
  2008-11-20 13:34 ` Johan Hedberg
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Carvalho de Assis @ 2008-11-20 13:16 UTC (permalink / raw)
  To: linux-bluetooth

Hi All,

I am looking for a C version of simple-agent application.

I am developing an embedded system project and don't want to make
Python a dependence (and Pygobject as well).

There is some way to use bluez-4.xx without DBUS? I already compiled
it to board, but if bluez can works without it will be "better".

Please, can you point me to some simple-agent implemented in C?

Best Regards,

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple-agent in C
  2008-11-20 13:16 Simple-agent in C Alan Carvalho de Assis
@ 2008-11-20 13:34 ` Johan Hedberg
  2008-11-20 15:22   ` Alan Carvalho de Assis
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Hedberg @ 2008-11-20 13:34 UTC (permalink / raw)
  To: linux-bluetooth

Hi Alan,

On Thu, Nov 20, 2008, Alan Carvalho de Assis wrote:
> Please, can you point me to some simple-agent implemented in C?

There's test/agent.c in the source tree. However, now that I took a
quick look at it it's not up-to-date with the latest 4.x API (it e.g.
hardcodes "/org/bluez/hci0" and doesn't use the correct Agent method
names). You'll still be able to use it as a good starting point though.

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple-agent in C
  2008-11-20 13:34 ` Johan Hedberg
@ 2008-11-20 15:22   ` Alan Carvalho de Assis
  2008-11-20 15:32     ` Johan Hedberg
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Carvalho de Assis @ 2008-11-20 15:22 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

Hi Johan,

On Thu, Nov 20, 2008 at 1:34 PM, Johan Hedberg <johan.hedberg@nokia.com> wrote:
>
> There's test/agent.c in the source tree. However, now that I took a
> quick look at it it's not up-to-date with the latest 4.x API (it e.g.
> hardcodes "/org/bluez/hci0" and doesn't use the correct Agent method
> names). You'll still be able to use it as a good starting point though.
>

I noticed this agent.c doesn't use any Glib function, is it right?

I am comparing agent.c against simple-agent and verified it is very different.

> Johan

Best Regards,

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple-agent in C
  2008-11-20 15:22   ` Alan Carvalho de Assis
@ 2008-11-20 15:32     ` Johan Hedberg
  2008-11-20 23:45       ` Alan Carvalho de Assis
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Hedberg @ 2008-11-20 15:32 UTC (permalink / raw)
  To: linux-bluetooth

On Thu, Nov 20, 2008, Alan Carvalho de Assis wrote:
> I noticed this agent.c doesn't use any Glib function, is it right?

Yes.

> I am comparing agent.c against simple-agent and verified it is very different.

Yes, as I said you'll need to fill in the proper agent callbacks (right
now there's something called "Request" which does not exist in the API)
as well as make it get the adapter path using e.g. DefaultAdapter().

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple-agent in C
  2008-11-20 15:32     ` Johan Hedberg
@ 2008-11-20 23:45       ` Alan Carvalho de Assis
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Carvalho de Assis @ 2008-11-20 23:45 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

Sorry my mistake, I replied onf to Johan...

On Thu, Nov 20, 2008 at 3:32 PM, Johan Hedberg <johan.hedberg@nokia.com> wrote:
>
> Yes, as I said you'll need to fill in the proper agent callbacks (right
> now there's something called "Request" which does not exist in the API)
> as well as make it get the adapter path using e.g. DefaultAdapter().

All right. Thank you again!

When I run this agent it is reporting here is not org.bluez DBUS
service, then I verified bluetoothd is is starting correctly:

# bluetoothd -nd
bluetoothd[1888]: Bluetooth daemon
bluetoothd[1888]: Enabling debug information
bluetoothd[1888]: parsing main.conf
bluetoothd[1888]: offmode=NoScan
bluetoothd[1888]: discovto=0
bluetoothd[1888]: pageto=8192
bluetoothd[1888]: name=%h-%d
bluetoothd[1888]: class=0x000100
bluetoothd[1888]: inqmode=0
bluetoothd[1888]: Unable to get on D-Bus

This is the very same error reported here:
https://lists.ubuntu.com/archives/ubuntu-bluetooth/2008-November/002629.html

I am starting dbus this way:
# dbus-daemon --system

I tried to strace bluetoothd but it doesn't helped much, none suspect
problem. Is this some specific problem of this version (4.18)?

Some idea about how to solve this problem?
I think "Unable to get on D-Bus" means bluetoothd are not listening to
same d-bus socket started by dbus-daemon. Isn't it?

> Johan

Best Regards,

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-20 23:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-20 13:16 Simple-agent in C Alan Carvalho de Assis
2008-11-20 13:34 ` Johan Hedberg
2008-11-20 15:22   ` Alan Carvalho de Assis
2008-11-20 15:32     ` Johan Hedberg
2008-11-20 23:45       ` Alan Carvalho de Assis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox