From: Bastien Nocera <hadess@hadess.net>
To: Marek Czerski <ma.czerski@gmail.com>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] sixaxis: DS4: use 0x12 cmd to get device bdaddr
Date: Thu, 16 Apr 2026 11:57:25 +0200 [thread overview]
Message-ID: <59197f235800db69549ec163391ac1ac1f1ffe65.camel@hadess.net> (raw)
In-Reply-To: <20260404123042.3049158-1-ma.czerski@gmail.com>
Hello Marek,
Some comments below.
On Sat, 2026-04-04 at 14:30 +0200, Marek Czerski wrote:
> This change is required for Esperanza EGG109k ps controller clone.
This should be what's mentioned in the commit subject:
sixaxis: Fix pairing Esperanza EGG109k controller
> EGG109k looks like PS3 controller but presents itself to the system
> as PS4 controller. It does not respond to 0x81 command.
> Command 0x12 contains both the device mac address as well as
> configured host mac address, so it can be used to query
> both. Kernel driver also uses 0x12 command for that.
You should name the kernel driver (it's "hid-playstation").
Note that despite what the hid-sony driver says, it's not a "Bluetooth
MAC address" or mac address, but a "Bluetooth address".
I would also include a link to an online store or product page for the
device, so folks know what it looks like.
> ---
> plugins/sixaxis.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c
> index 27bc09815..8e212ee71 100644
> --- a/plugins/sixaxis.c
> +++ b/plugins/sixaxis.c
> @@ -111,12 +111,12 @@ static int sixaxis_get_device_bdaddr(int fd,
> bdaddr_t *bdaddr)
>
> static int ds4_get_device_bdaddr(int fd, bdaddr_t *bdaddr)
> {
> - uint8_t buf[7];
> + uint8_t buf[16];
This is a good opportunity to copy the constants from hid-playstation:
#define DS4_FEATURE_REPORT_PAIRING_INFO 0x12
#define DS4_FEATURE_REPORT_PAIRING_INFO_SIZE 16
and use those.
> int ret;
>
> memset(buf, 0, sizeof(buf));
>
> - buf[0] = 0x81;
> + buf[0] = 0x12;
>
> ret = ioctl(fd, HIDIOCGFEATURE(sizeof(buf)), buf);
> if (ret < 0) {
next prev parent reply other threads:[~2026-04-16 10:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-04 12:30 [PATCH BlueZ] sixaxis: DS4: use 0x12 cmd to get device bdaddr Marek Czerski
2026-04-04 13:25 ` [BlueZ] " bluez.test.bot
2026-04-16 9:57 ` Bastien Nocera [this message]
2026-04-22 21:20 ` [PATCH BlueZ v2] sixaxis: Fix pairing Esperanza EGG109k controller Marek Czerski
2026-04-22 22:20 ` [BlueZ,v2] " bluez.test.bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59197f235800db69549ec163391ac1ac1f1ffe65.camel@hadess.net \
--to=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=ma.czerski@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox