Return-Path: MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 11 Jan 2016 12:10:16 -0300 Message-ID: Subject: Re: Creating BLE Server application with BlueZ From: Luiz Augusto von Dentz To: "Stanbro, Matthew A." Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Matthew, On Tue, Jan 5, 2016 at 3:36 PM, Stanbro, Matthew A. wrote: > Hello Everyone, > > I am new to working with BlueZ and I am trying to get a handle on how to create a BLE service and add characteristics. Looking around the web I can find quite a bit of information about using BlueZ as a BLE client for connecting to other BLE devices to read/write attributes, but I am struggling to find anything which helps explain creating a BLE service and dealing with advertising. Can anyone point me to a resource for learning to work with the BlueZ C api for creating/starting/stopping services, adding/modifying characteristics, starting/stopping/modifying advertisments? Thanks in advance for any help you can offer. Currently there is no sample in C but the plan is to add some support to bluetoothctl to do that, in the meantime you can check the examples in python under test/example-gatt-server and test/example-advertising. Alternatively you can create a plugin and link it directly with the daemon so that you can use BlueZ C API, but this is only recommended if you need low level access or there is security implication/special access necessary for the services you want to add. -- Luiz Augusto von Dentz