public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] sixaxis: DS4: use 0x12 cmd to get device bdaddr
@ 2026-04-04 12:30 Marek Czerski
  2026-04-04 13:25 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Czerski @ 2026-04-04 12:30 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marek Czerski

This change is required for Esperanza EGG109k ps controller clone.
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.
---
 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];
 	int ret;
 
 	memset(buf, 0, sizeof(buf));
 
-	buf[0] = 0x81;
+	buf[0] = 0x12;
 
 	ret = ioctl(fd, HIDIOCGFEATURE(sizeof(buf)), buf);
 	if (ret < 0) {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-04 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox