2011-10-19 13:10:07

by Vijaykumar Dadmode

[permalink] [raw]
Subject: Query regarding BLE GetPrimaryServices()

Hi ,
Could you please let me know "How do we retrieve the primary services from Client over DBUS APIs when we are already 'CONNECTED' to the server device " ?

Thanks,
Vijay


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at http://www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at http://www.csr.com/blog


2011-10-21 14:07:44

by Claudio Takahasi

[permalink] [raw]
Subject: Re: Query regarding BLE GetPrimaryServices()

Hi Ajay,

On Fri, Oct 21, 2011 at 10:04 AM, Ajay Pillai <[email protected]> wrote:
>>You cannot do this by hand. It is done right after connection (or
>>pairing, if using CreatePairedDevice). For more information on how to
>>read the services and characteristics over D-Bus, see
>>doc/attribute-api.txt.
>
> Does this mean that it is not possible for an Application to just come up, and list the primary services of a remote LE device that is already connected(due to another application)? (via DBUS)
> Is this something that we can just add as a new API (listPrimaryServices) to the " org.bluez.Device" interface of the device object?
>

Applications can access the primary service using the Generic Attribute API.
After pairing, bluetoothd executes discover all primary services.
Check the "Services" property in the Device to discovery, it contains
an array of paths for the primary services.

Use the test/test-attrib script to understand how it works. Using
d-feet you can also access the primary services and characteristics.

BR,
Claudio

2011-10-21 13:04:42

by Ajay Pillai

[permalink] [raw]
Subject: RE: Query regarding BLE GetPrimaryServices()

>You cannot do this by hand. It is done right after connection (or
>pairing, if using CreatePairedDevice). For more information on how to
>read the services and characteristics over D-Bus, see
>doc/attribute-api.txt.

Does this mean that it is not possible for an Application to just come up, and list the primary services of a remote LE device that is already connected(due to another application)? (via DBUS)
Is this something that we can just add as a new API (listPrimaryServices) to the " org.bluez.Device" interface of the device object?

Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

2011-10-21 12:29:47

by Anderson Lizardo

[permalink] [raw]
Subject: Re: Query regarding BLE GetPrimaryServices()

Hi,

On Fri, Oct 21, 2011 at 9:06 AM, Vijaykumar Dadmode
<[email protected]> wrote:
> Hi Anderson,
>
>> This is already done automatically, when you do either CreateDevice()
>> or CreatePairedDevice(). See the device_browse_primary() calls in
>> src/device.c and src/adapter.c
>
> How do we get the primary services when we have already called a "CreateDevice() or CreatePairedDevice()", "CONNECTED" state over dbus?

You cannot do this by hand. It is done right after connection (or
pairing, if using CreatePairedDevice). For more information on how to
read the services and characteristics over D-Bus, see
doc/attribute-api.txt.

Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

2011-10-21 12:06:01

by Vijaykumar Dadmode

[permalink] [raw]
Subject: RE: Query regarding BLE GetPrimaryServices()

Hi Anderson,

> This is already done automatically, when you do either CreateDevice()
> or CreatePairedDevice(). See the device_browse_primary() calls in
> src/device.c and src/adapter.c

How do we get the primary services when we have already called a "CreateDevice() or CreatePairedDevice()", "CONNECTED" state over dbus?

Thanks,
Vijay


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at http://www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at http://www.csr.com/blog

2011-10-19 13:30:31

by Anderson Lizardo

[permalink] [raw]
Subject: Re: Query regarding BLE GetPrimaryServices()

Hi,

On Wed, Oct 19, 2011 at 10:10 AM, Vijaykumar Dadmode
<[email protected]> wrote:
> Hi ,
> Could you please let me know "How do we retrieve the primary services from Client over DBUS APIs when we are already 'CONNECTED' to the server device " ??

This is already done automatically, when you do either CreateDevice()
or CreatePairedDevice(). See the device_browse_primary() calls in
src/device.c and src/adapter.c

Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil