From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: Device class not writeable via dbus From: Marcus Redeker In-Reply-To: Date: Thu, 16 Apr 2015 12:08:56 +0200 Cc: Szymon Janc , "linux-bluetooth@vger.kernel.org" Message-Id: <20F8C232-B06F-4723-8B1A-6E60A14E3B68@openremote.org> References: <16972ECC-114B-4CA0-A2B1-1BE0FB115199@openremote.org> <1815811.8ZlaWYb6CG@leonov> <5181722.aJ0IxrIXHx@uw000953> To: Luiz Augusto von Dentz Sender: linux-bluetooth-owner@vger.kernel.org List-ID: > On 16.04.2015, at 11:36, Luiz Augusto von Dentz wrote: > > Hi Marcus, > > On Thu, Apr 16, 2015 at 11:53 AM, Marcus Redeker wrote: >> >>> On 16.04.2015, at 10:15, Luiz Augusto von Dentz wrote: >>> >>> Hi Szymon, Marcus, >>> >>> On Thu, Apr 16, 2015 at 11:01 AM, Szymon Janc wrote: >>>> Hi Marcus, >>>> >>>> On Thursday 16 of April 2015 09:09:28 Marcus Redeker wrote: >>>>> True, but I would like todo that through dbus and not manually and have to restart bluetoothd afterwards. >>>>> Any chance this can be done in the near future? >>>>> -Marcus >>>>> >>>> >>>> Class of Device is rather static configuration as those describe form factor >>>> and that usually doesn't change. >>>> >>>> Why do you need to change CoD on the fly? >>> >>> It is possible to change at runtime by using systemd hostname plugin >>> then change the org.freedesktop.hostname1.Chassis property, but Im not >>> sure how easy is to change that. Anyway the point is that this should >>> not changed by applications at will as it could break discovery >>> filtering, even thought filtering by class is probably broken by >>> design. >>> >>> -- >>> Luiz Augusto von Dentz >> >> This would allow to change the name of the bluetooth adapter but not the device class. >> The name can already be changed using the read/write alias property which is no problem. > > Looks like you know more than us how BlueZ works, perhaps you want to > tell me what is this code for: > > http://fpaste.org/211586/76181142/ > > Btw, BLE don't really have a class it has appearance which is not > quite the same, we may actually have a different property for > appearance along with a main.conf entry to set it and also a > conversion from chassis to appearance. > > > > -- > Luiz Augusto von Dentz Sorry, if I stated something wrong. I did not check the BlueZ code. I don’t know BlueZ at all and I am just trying to look at it from a user prospective who is trying to use dbus and BlueZ to create an application. Looking at the complete file hostname.c, I can see that changing the Chassis property would indeed change the device class but only to predefinded values desktop, server, laptop, handset and tablet. I will not be able to use it to change to HID device class 0x000540 -Marcus