I successfully mounted the Bluetooth, via a BT dongle on a Raspberry-Pi-3B+(plus), and connected just fine with the Sony PS4 controller. Everything was fine.
I walked away from the system for several hours, leaving the BT connection to idle.
When I came back, the BT-connection died, and a quick check showed an error in bluetooth.py . Apparently a split() function tried to create too many map's of BT devices. ((((-I work in a very busy development area, FULL of lots of BLE-advertising devices-))))
Below is a chunk of my terminal log.
After I "stop" the ds4drv service, I can "start" it and connect again.
Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: device = self.find_device()
Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: File "/usr/local/lib/python2.7/dist-packages/ds4drv/backends/bluetooth.py", line 118, in find_device
Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: for bdaddr, name in self.scan():
Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: File "/usr/local/lib/python2.7/dist-packages/ds4drv/backends/bluetooth.py", line 111, in scan
Oct 18 16:20:32 lubunturpi ds4drv[592]: for , bdaddr, name in map(lambda l: l.split(b"\t"), res):
Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: ValueError: too many values to unpack
Oct 18 16:20:32 lubuntu_rpi systemd[1]: ds4drv.service: Main process exited, code=exited, status=1/FAILURE
Oct 18 16:20:32 lubuntu_rpi systemd[1]: ds4drv.service: Unit entered failed state.
Oct 18 16:20:32 lubuntu_rpi systemd[1]: ds4drv.service: Failed with result 'exit-code'.
Oct 18 18:11:05 lubuntu_rpi systemd[1]: Stopped Joystick driver for Sony CUH-ZCT2U PS4 controller.
ubuntu@lubuntu_rpi:~/. $ sudo systemctl start ds4drv
ubuntu@lubuntu_rpi:~/. $
ubuntu@lubuntu_rpi:~/. $
ubuntu@lubuntu_rpi:~/. $
ubuntu@lubuntu_rpi:~/. $ sudo systemctl status ds4drv
● ds4drv.service - Joystick driver for Sony CUH-ZCT2U PS4 controller
Loaded: loaded (/etc/systemd/system/ds4drv.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-10-18 18:11:14 UTC; 2s ago
Main PID: 4441 (ds4drv)
CGroup: /system.slice/ds4drv.service
├─4441 /usr/bin/python /usr/local/bin/ds4drv
└─4459 hcitool scan --flush
Oct 18 18:11:14 lubuntu_rpi systemd[1]: Started Joystick driver for Sony CUH-ZCT2U PS4 controller.
Oct 18 18:11:15 lubuntu_rpi ds4drv[4441]: [info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event3 (evdev)
Oct 18 18:11:15 lubuntu_rpi ds4drv[4441]: [info][bluetooth] Scanning for devices
ubuntu@lubuntu_rpi:~/. $
ubuntu@lubuntu_rpi:~/. $
ubuntu@lubuntu_rpi:~/. $
ubuntu@lubuntu_rpi:~/. $
I successfully mounted the Bluetooth, via a BT dongle on a Raspberry-Pi-3B+(plus), and connected just fine with the Sony PS4 controller. Everything was fine.
I walked away from the system for several hours, leaving the BT connection to idle.
When I came back, the BT-connection died, and a quick check showed an error in bluetooth.py . Apparently a split() function tried to create too many map's of BT devices. ((((-I work in a very busy development area, FULL of lots of BLE-advertising devices-))))
Below is a chunk of my terminal log. After I "stop" the ds4drv service, I can "start" it and connect again.
ubuntu@lubuntu_rpi:~/. $ sudo systemctl stop ds4drv ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ sudo systemctl status ds4drv ● ds4drv.service - Joystick driver for Sony CUH-ZCT2U PS4 controller Loaded: loaded (/etc/systemd/system/ds4drv.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2018-10-18 16:20:32 UTC; 1h 50min ago Process: 592 ExecStart=/usr/local/bin/ds4drv (code=exited, status=1/FAILURE) Main PID: 592 (code=exited, status=1/FAILURE)
Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: device = self.find_device() Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: File "/usr/local/lib/python2.7/dist-packages/ds4drv/backends/bluetooth.py", line 118, in find_device Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: for bdaddr, name in self.scan(): Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: File "/usr/local/lib/python2.7/dist-packages/ds4drv/backends/bluetooth.py", line 111, in scan Oct 18 16:20:32 lubunturpi ds4drv[592]: for , bdaddr, name in map(lambda l: l.split(b"\t"), res): Oct 18 16:20:32 lubuntu_rpi ds4drv[592]: ValueError: too many values to unpack Oct 18 16:20:32 lubuntu_rpi systemd[1]: ds4drv.service: Main process exited, code=exited, status=1/FAILURE Oct 18 16:20:32 lubuntu_rpi systemd[1]: ds4drv.service: Unit entered failed state. Oct 18 16:20:32 lubuntu_rpi systemd[1]: ds4drv.service: Failed with result 'exit-code'. Oct 18 18:11:05 lubuntu_rpi systemd[1]: Stopped Joystick driver for Sony CUH-ZCT2U PS4 controller. ubuntu@lubuntu_rpi:~/. $ sudo systemctl start ds4drv ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ sudo systemctl status ds4drv ● ds4drv.service - Joystick driver for Sony CUH-ZCT2U PS4 controller Loaded: loaded (/etc/systemd/system/ds4drv.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2018-10-18 18:11:14 UTC; 2s ago Main PID: 4441 (ds4drv) CGroup: /system.slice/ds4drv.service ├─4441 /usr/bin/python /usr/local/bin/ds4drv └─4459 hcitool scan --flush
Oct 18 18:11:14 lubuntu_rpi systemd[1]: Started Joystick driver for Sony CUH-ZCT2U PS4 controller. Oct 18 18:11:15 lubuntu_rpi ds4drv[4441]: [info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event3 (evdev) Oct 18 18:11:15 lubuntu_rpi ds4drv[4441]: [info][bluetooth] Scanning for devices ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $ ubuntu@lubuntu_rpi:~/. $