Re: BlueZ Peripheral & central Application

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

 



Hi Ken,

On Thu, Mar 29, 2018 at 3:43 PM, ken Clark <kenidevices@xxxxxxxxx> wrote:
> We are attempting to create a BlueZ application for an embedded linux
> device that performs the following tasks:
>
> Advertises as a peripheral
> Declared a peripheral GATT database
> Accepts connections as a peripheral.
> Scans and connections to other peripherals as the central devices
>
> I've been working with the BlueZ code for a while now, and see all the
> pieces in various codebases, but I have failed in attempting to
> understand how the combine them.
>
> client/bluetoothclt  allows for setting advertising data
> It see options for declaring services & characteristics, but have no
> idea how and what order to use them in to successfully declare the
> gatt database.

I use something like the following on a daily basis:

> menu gatt
> register-service <uuid>
> register-characteristic <uuid> <permissions>
<repeat if there are more services>
> register-application
> back
> advertise on

If you have a second  controller you can use it as a central:

> select <address ctrl1>
> scan on
<wait until it show up, if it doesn't try setting transport filter
with scan.transport le>
> connect <address ctrl0>

> tools/btgatt-server allows for declaring the GATT Database and
> accepting connections as a peripheral.

btgatt-server is a standalone testing tool that will conflict with
bluetoothd, so better not to use if you do plan to use the D-Bus APIs.

>
> Can someone provide tips, examples or documentation on how to combine
> these functions into a single application.

bluetoothctl should have it all by now, if it doesn't then we need to
fix it so any feedback in this regard is welcome.

> Thanks
> Ken
> --
> 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



-- 
Luiz Augusto von Dentz
--
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