All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Jeanson <lionel.jeanson@gmail.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: sixaxis patch proposal
Date: Tue, 8 Dec 2020 13:19:59 +0100	[thread overview]
Message-ID: <CADrX+Xs5z7gg0XZ3HY8rxK4dvg558HfnqyViFEL1oYPJT6OAmQ@mail.gmail.com> (raw)
In-Reply-To: <CADrX+Xtq=cCudHvKZG1=WdwM-vinPegXWTd-JdvpiLk4GykfbQ@mail.gmail.com>

ok, restarting :

1) after connect to USB and pair :

lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
Device 44:D8:32:7E:6B:6A (public)
Name: Sony PLAYSTATION(R)3 Controller
Alias: Sony PLAYSTATION(R)3 Controller
Paired: no
Trusted: yes
Blocked: no
Connected: no
WakeAllowed: no
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
Modalias: usb:v054Cp0268d0000



2) disconnect USB and connect BT

lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
Device 44:D8:32:7E:6B:6A (public)
Name: Sony PLAYSTATION(R)3 Controller
Alias: Sony PLAYSTATION(R)3 Controller
Class: 0x00000508
Icon: input-gaming
Paired: no
Trusted: yes
Blocked: no
Connected: yes
WakeAllowed: no
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
Modalias: usb:v054Cp0268d0000


3) disconnect BT from BT Manager (no more long press on sixaxis, using
only computer BT manager)

lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
Device 44:D8:32:7E:6B:6A (public)
Name: Sony PLAYSTATION(R)3 Controller
Alias: Sony PLAYSTATION(R)3 Controller
Class: 0x00000508
Icon: input-gaming
Paired: no
Trusted: yes
Blocked: no
Connected: no
WakeAllowed: no
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
Modalias: usb:v054Cp0268d0000

4) connect to USB while off :

déc. 08 13:10:38 lionelux bluetoothd[20928]: sixaxis: compatible
device connected: Sony PLAYSTATION(R)3 Controller (054C:0268
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:054C:0268.001A/hidraw/hidraw0)
déc. 08 13:10:38 lionelux bluetoothd[20928]: sixaxis: setting up new device
déc. 08 13:10:38 lionelux bluetoothd[20928]:
src/device.c:btd_device_set_trusted() trusted 0
déc. 08 13:10:38 lionelux bluetoothd[20928]:
src/device.c:btd_device_set_temporary() temporary 1
déc. 08 13:10:38 lionelux bluetoothd[20928]:
src/adapter.c:remove_whitelist_complete() 44:D8:32:7E:6B:6A removed
from kernel whitelist
déc. 08 13:10:38 lionelux bluetoothd[20928]: src/agent.c:agent_ref()
0x56294fe6a950: ref=2
déc. 08 13:10:38 lionelux bluetoothd[20928]:
src/agent.c:agent_call_authorize_service() authorize service request
was sent for /org/bluez/hci0/dev_44_D8_32_7E_6B_6A

lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
Device 44:D8:32:7E:6B:6A (public)
Name: Sony PLAYSTATION(R)3 Controller
Alias: Sony PLAYSTATION(R)3 Controller
Class: 0x00000508
Icon: input-gaming
Paired: no
Trusted: no
Blocked: no
Connected: no
WakeAllowed: no
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
Modalias: usb:v054Cp0268d0000


5) didn't accept new service, disconnect from USB

lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
Device 44:D8:32:7E:6B:6A not available



4') redoing step 4) but with my proposed patch : works as expected

déc. 08 13:14:25 lionelux bluetoothd[22191]: sixaxis: compatible
device connected: Sony PLAYSTATION(R)3 Controller (054C:0268
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:054C:0268.001D/hidraw/hidraw0)
déc. 08 13:14:25 lionelux bluetoothd[22191]:
plugins/sixaxis.c:setup_device() device 44:D8:32:7E:6B:6A already
known, skipping


Le mar. 8 déc. 2020 à 13:16, Lionel Jeanson <lionel.jeanson@gmail.com> a écrit :
>
> ok, restarting :
>
> 1) after connect to USB and pair :
>
> lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
> Device 44:D8:32:7E:6B:6A (public)
> Name: Sony PLAYSTATION(R)3 Controller
> Alias: Sony PLAYSTATION(R)3 Controller
> Paired: no
> Trusted: yes
> Blocked: no
> Connected: no
> WakeAllowed: no
> LegacyPairing: no
> UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
> Modalias: usb:v054Cp0268d0000
>
>
>
> 2) disconnect USB and connect BT
>
> lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
> Device 44:D8:32:7E:6B:6A (public)
> Name: Sony PLAYSTATION(R)3 Controller
> Alias: Sony PLAYSTATION(R)3 Controller
> Class: 0x00000508
> Icon: input-gaming
> Paired: no
> Trusted: yes
> Blocked: no
> Connected: yes
> WakeAllowed: no
> LegacyPairing: no
> UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
> Modalias: usb:v054Cp0268d0000
>
>
> 3) disconnect BT from BT Manager (no more long press on sixaxis, using only computer BT manager)
>
> lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
> Device 44:D8:32:7E:6B:6A (public)
> Name: Sony PLAYSTATION(R)3 Controller
> Alias: Sony PLAYSTATION(R)3 Controller
> Class: 0x00000508
> Icon: input-gaming
> Paired: no
> Trusted: yes
> Blocked: no
> Connected: no
> WakeAllowed: no
> LegacyPairing: no
> UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
> Modalias: usb:v054Cp0268d0000
>
> 4) connect to USB while off :
>
> déc. 08 13:10:38 lionelux bluetoothd[20928]: sixaxis: compatible device connected: Sony PLAYSTATION(R)3 Controller (054C:0268 /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:054C:0268.001A/hidraw/hidraw0)
> déc. 08 13:10:38 lionelux bluetoothd[20928]: sixaxis: setting up new device
> déc. 08 13:10:38 lionelux bluetoothd[20928]: src/device.c:btd_device_set_trusted() trusted 0
> déc. 08 13:10:38 lionelux bluetoothd[20928]: src/device.c:btd_device_set_temporary() temporary 1
> déc. 08 13:10:38 lionelux bluetoothd[20928]: src/adapter.c:remove_whitelist_complete() 44:D8:32:7E:6B:6A removed from kernel whitelist
> déc. 08 13:10:38 lionelux bluetoothd[20928]: src/agent.c:agent_ref() 0x56294fe6a950: ref=2
> déc. 08 13:10:38 lionelux bluetoothd[20928]: src/agent.c:agent_call_authorize_service() authorize service request was sent for /org/bluez/hci0/dev_44_D8_32_7E_6B_6A
>
> lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
> Device 44:D8:32:7E:6B:6A (public)
> Name: Sony PLAYSTATION(R)3 Controller
> Alias: Sony PLAYSTATION(R)3 Controller
> Class: 0x00000508
> Icon: input-gaming
> Paired: no
> Trusted: no
> Blocked: no
> Connected: no
> WakeAllowed: no
> LegacyPairing: no
> UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
> Modalias: usb:v054Cp0268d0000
>
>
> 5) didn't accept new service, disconnect from USB
>
> lionel@lionelux:~$ bluetoothctl info 44:D8:32:7E:6B:6A
> Device 44:D8:32:7E:6B:6A not available
>
>
>
> 4') redoing step 4) but with my proposed patch : works as expected
>
> déc. 08 13:14:25 lionelux bluetoothd[22191]: sixaxis: compatible device connected: Sony PLAYSTATION(R)3 Controller (054C:0268 /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:054C:0268.001D/hidraw/hidraw0)
> déc. 08 13:14:25 lionelux bluetoothd[22191]: plugins/sixaxis.c:setup_device() device 44:D8:32:7E:6B:6A already known, skipping
>
>
>
>
>
> Le mar. 8 déc. 2020 à 12:29, Bastien Nocera <hadess@hadess.net> a écrit :
>>
>> On Tue, 2020-12-08 at 12:21 +0100, Lionel Jeanson wrote:
>> > My bad :
>> >
>> >
>> > 1) connect and pair :
>> >
>> >
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]: sixaxis: compatible
>> > device connected: Sony PLAYSTATION(R)3 Controller (054C:0268
>> > /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-
>> > 1:1.0/0003:054C:0268.0010/hidraw/hidraw0)
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]:
>> > src/device.c:device_create() dst 44:D8:32:7E:6B:6A
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]:
>> > src/device.c:device_new() address 44:D8:32:7E:6B:6A
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]:
>> > src/device.c:device_new() Creating device
>> > /org/bluez/hci0/dev_44_D8_32_7E_6B_6A
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]: sixaxis: setting up new
>> > device
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]:
>> > src/device.c:btd_device_device_set_name()
>> > /org/bluez/hci0/dev_44_D8_32_7E_6B_6A Sony PLAYSTATION(R)3 Controller
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]: src/agent.c:agent_ref()
>> > 0x5579c3bc4e70: ref=2
>> > déc. 08 12:14:44 lionelux bluetoothd[16446]:
>> > src/agent.c:agent_call_authorize_service() authorize service request
>> > was sent for /org/bluez/hci0/dev_44_D8_32_7E_6B_6A
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]: src/agent.c:agent_ref()
>> > 0x5579c3bc4e70: ref=3
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/device.c:btd_device_set_trusted() trusted 1
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/device.c:btd_device_set_temporary() temporary 0
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/device.c:device_probe_profiles() Probing profiles for device
>> > 44:D8:32:7E:6B:6A
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > profiles/input/device.c:input_device_register()
>> > /org/bluez/hci0/dev_44_D8_32_7E_6B_6A
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/service.c:btd_service_ref() 0x5579c3bca4f0: ref=2
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/service.c:change_state() 0x5579c3bca4f0: device 44:D8:32:7E:6B:6A
>> > profile input-hid state changed: unavailable -> disconnected (0)
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/device.c:device_svc_resolved()
>> > /org/bluez/hci0/dev_44_D8_32_7E_6B_6A err 0
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > plugins/sixaxis.c:agent_auth_cb() remote 44:D8:32:7E:6B:6A old_master
>> > A4:34:D9:3F:36:93 new_master A4:34:D9:3F:36:93
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/agent.c:agent_unref() 0x5579c3bc4e70: ref=2
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/agent.c:agent_unref() 0x5579c3bc4e70: ref=1
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]:
>> > src/adapter.c:add_whitelist_complete() 44:D8:32:7E:6B:6A added to
>> > kernel whitelist
>> > déc. 08 12:14:47 lionelux bluetoothd[16446]: Set device flags return
>> > status: Unknown Command
>>
>> What's the output of:
>> bluetoothctl info for the device after this?
>>
>> Also, long-pressing the PS button on PS3 joypads will start a new one-
>> time pairing, making the device visible. I don't think that's what you
>> want to do.
>>
>> The only way to turn off the joypad is to "disconnect" from it via
>> Bluetooth, IIRC.
>>

      parent reply	other threads:[~2020-12-08 12:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 17:04 sixaxis patch proposal Lionel Jeanson
2020-12-08  9:01 ` Bastien Nocera
2020-12-08  9:45   ` Lionel Jeanson
2020-12-08  9:53     ` Bastien Nocera
2020-12-08 10:46       ` Lionel Jeanson
2020-12-08 10:58         ` Bastien Nocera
2020-12-08 11:25           ` Lionel Jeanson
     [not found]           ` <CADrX+XvHL76f8mT29MO8xUGwKzhjeZTXqiSUAQnR5_JrCZ65_Q@mail.gmail.com>
2020-12-08 11:29             ` Bastien Nocera
     [not found]               ` <CADrX+Xtq=cCudHvKZG1=WdwM-vinPegXWTd-JdvpiLk4GykfbQ@mail.gmail.com>
2020-12-08 12:19                 ` Lionel Jeanson [this message]

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=CADrX+Xs5z7gg0XZ3HY8rxK4dvg558HfnqyViFEL1oYPJT6OAmQ@mail.gmail.com \
    --to=lionel.jeanson@gmail.com \
    --cc=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.