From patchwork Sun Dec 14 19:21:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 5488071 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 92FCBBEEA8 for ; Sun, 14 Dec 2014 19:25:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9641B20A09 for ; Sun, 14 Dec 2014 19:25:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B8B4F20A03 for ; Sun, 14 Dec 2014 19:25:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y0Ejn-0008DD-2U; Sun, 14 Dec 2014 19:21:51 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y0Ejj-0008BO-Nl for linux-arm-kernel@lists.infradead.org; Sun, 14 Dec 2014 19:21:49 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 4134581B04; Sun, 14 Dec 2014 20:21:25 +0100 (CET) Date: Sun, 14 Dec 2014 20:21:24 +0100 From: Pavel Machek To: Marcel Holtmann Subject: Re: bluetooth: Add hci_h4p driver Message-ID: <20141214192124.GA22392@amd> References: <20141213223727.GA13894@amd> <570BAC61-3137-42E5-B4F8-A61AEED380DE@holtmann.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <570BAC61-3137-42E5-B4F8-A61AEED380DE@holtmann.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141214_112147_957220_9A827E40 X-CRM114-Status: GOOD ( 15.67 ) X-Spam-Score: -2.3 (--) Cc: ivo.g.dimitrov.75@gmail.com, khilman@kernel.org, tony@atomide.com, sre@debian.org, aaro.koskinen@iki.fi, kernel list , sre@ring0.de, linux-bluetooth@vger.kernel.org, pali.rohar@gmail.com, linux-omap@vger.kernel.org, linux-arm-kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi! > > Hacks surrounding bluetooth address were removed; this results in > > working driver with address that is probably not unique. > > Just set HCI_QUIRK_INVALID_BDADDR and let someone deal with that in userspace. You can use the btmgmt public-addr command for testing. > Ok, it took me a while to figure out that --enable-experimental is needed. Then help was playing tricks with me: For more information on the usage of each command use: btmgmt --help root@n900:/my/bluez-5.26/tools# ./btmgmt public-addr --help Set Public Address for hci0 failed with status 0x0b (Rejected) root@n900:/my/bluez-5.26/tools# ./btmgmt public-addr Usage: btmgmt public-addr
root@n900:/my/bluez-5.26/tools# ./btmgmt public-addr 01:02:03:04:05:06 Set Public Address for hci0 failed with status 0x0b (Rejected) Hmm. Since setting public address only works when interface is down, and we lose all the settings during up, this does not work at all, right? Anyway, you might want to apply this to lessen the confusion. Only in bluez-5.26/tools: btmgmt.c~ diff -ur bluez-5.26.ofic/tools/btmgmt.c bluez-5.26/tools/btmgmt.c --- bluez-5.26.ofic/tools/btmgmt.c 2014-12-14 12:32:19.742595000 +0100 +++ bluez-5.26/tools/btmgmt.c 2014-12-14 20:06:40.432497000 +0100 @@ -2603,7 +2603,7 @@ static void static_addr_usage(void) { - printf("Usage: btmgmt static-addr
\n"); + printf("Usage: btmgmt static-addr ??:??:??:??:??:??\n"); } static void cmd_static_addr(struct mgmt *mgmt, uint16_t index, @@ -2660,7 +2660,8 @@ struct mgmt_cp_set_public_address cp; if (argc < 2) { - printf("Usage: btmgmt public-addr
\n"); + printf("Usage: btmgmt public-addr ??:??:??:??:??:??\n" + "Note: interface must be down for this to work\n"); exit(EXIT_FAILURE); } @@ -2934,7 +2935,7 @@ static void add_device_usage(void) { - printf("Usage: btmgmt add-device [-a action] [-t type]
\n"); + printf("Usage: btmgmt add-device [-a action] [-t type] ??:??:??:??:??:??\n"); } static struct option add_device_options[] = { @@ -3007,7 +3008,7 @@ static void del_device_usage(void) { - printf("Usage: btmgmt del-device [-t type]
\n"); + printf("Usage: btmgmt del-device [-t type] ??:??:??:??:??:??\n"); } static struct option del_device_options[] = { @@ -3153,7 +3154,7 @@ printf("\n" "For more information on the usage of each command use:\n" - "\tbtmgmt --help\n" ); + "\tbtmgmt \n" ); } static struct option main_options[] = {