ds4drv
ds4drv copied to clipboard
No connection in hidraw mode
Hi, I use ubuntu 14.04 with bluez 5.18 and bluetooth 2.0 and bluetooth 2.1 adapters to test your program. I work really well in normal mode, but nothing happens in hidraw mode, any ideas ? PS: Note that when I pair the remote in Ubuntu using the bluetooth manager, the remote gets disconnected shortly after the pairing, I don't know if this is normal.
Here is the normal output:
[info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event16 (evdev)
[info][bluetooth] Scanning for devices
[info][bluetooth] Found device A4:15:66:88:5E:9A
[info][controller 1] Connected to Bluetooth Controller (A4:15:66:88:5E:9A)
[info][bluetooth] Scanning for devices
[info][controller 1] Battery: Fully charged
Hidraw mode:
[info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event16 (evdev)
[info][hidraw] Scanning for devices
Hi athanase,
That doesn't sound normal. You should be able to pair and use your controller with Bluez 5.18. It should remain paired, and create a joystick device. If you're having trouble with the bluetooth manager, maybe you can try using "bluetoothctl" on the CLI. First delete the device from bluetooth manager, and then run "bluetoothctl". Start with the "scan on" command, and put your DualShock into pairing mode. You should see the bluetooth ID show up. You can then manually trust it with "trust xx:xx:xx:xx:xx" or similar, followed by "pair xx:xx:xx:xx:xx" and "connect xx:xx:xx:xx:xx".
Basically if you play around with it enough you should be able to pair it this way. It SHOULD pair automatically with Bluez 5.18, but with the earlier Bluez versions it was a bit finicky.
Ok, I came across another problem when running scan on
I have the error No default controller available
.
I don't understand this error since hcitool dev
gives me this output:
Devices:
hci0 00:1A:7D:DA:71:13
in bluetoothctl issue 'power on'
Same issue
[bluetooth]# power on
No default controller available
If I run sudo ./bluetoothd -d -n
from the folder /usr/libexec/bluetooth
I get the following output:
bluetoothd[6465]: src/adapter.c:dev_class_changed_callback() Class: 0x000104
bluetoothd[6465]: src/attrib-server.c:attrib_db_update() handle=0x0008
bluetoothd[6465]: src/adapter.c:new_settings_callback() Settings: 0x000002d3
bluetoothd[6465]: src/adapter.c:settings_changed() Changed settings: 0x00000001
bluetoothd[6465]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has been enabled
bluetoothd[6465]: src/adapter.c:trigger_passive_scanning()
bluetoothd[6465]: src/adapter.c:connected_callback() hci0 device A4:15:66:88:5E:9A connected eir_len 5
bluetoothd[6465]: profiles/input/server.c:connect_event_cb() Incoming connection from A4:15:66:88:5E:9A on PSM 17
bluetoothd[6465]: profiles/input/device.c:input_device_set_channel() idev (nil) psm 17
bluetoothd[6465]: Refusing input device connect: No such file or directory (2)
bluetoothd[6465]: profiles/input/server.c:confirm_event_cb()
bluetoothd[6465]: Refusing connection from A4:15:66:88:5E:9A: unknown device
bluetoothd[6465]: src/adapter.c:dev_disconnected() Device A4:15:66:88:5E:9A disconnected, reason 3
bluetoothd[6465]: src/adapter.c:adapter_remove_connection()
bluetoothd[6465]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[6465]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr A4:15:66:88:5E:9A type 0 status 0xe
bluetoothd[6465]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[6465]: src/device.c:device_bonding_failed() status 14
bluetoothd[6465]: src/adapter.c:resume_discovery()
This issue sometimes happens to me. First make sure that bluetooth.service
is running. You can also try these command on bluetoothctl
:
scan on
remove xx:xx:xx:xx:xx:xx (try to remove the misbehaving old pairing)
trust xx:xx:xx:xx:xx:xx
pair xx:xx:xx:xx:xx:xx
scan off (turning off scanning may help, or it might just be for the worse)
connect xx:xx:xx:xx:xx:xx (you can try to manually connect the controller after pairing)
where xx:xx:xx:xx:xx:xx
is the MAC address of your controller. For each step you can try to put your controller to the pairing mode (hold PS+SHARE) or the normal mode (tap PS).