View Full Version : Edison PS2 Controller Bluetooth Issues

10-06-2015, 11:05 PM

I set up the PS2 bluetooth controller by installing libusb-0.1-4 / libusb-0.1-dev and running gcc -o sixpair sixpair.c -lusb. I then ran sixair with the controller connected and it showed the following response

~/HROS1-Framework/Linux/project/ps3_demo/sixpair# ./sixpair_edison Current Bluetooth master: d8:96:95:f3:8d:d6

After doing so, I went into the ps3_demo project and the following commands

rfkill unblock bluetooth
killall bluetoothd
./start edison

The robot starts with one error message and goes into sitting position. However the PS3 which has the 4 flashing lights never pairs via bluetooth. It is fully charged. As anyone had any luck with pairing the PS3 with the edison.

Here is the output from starting the demo

./start_edison killall: demo: no process killed
./start_edison: line 5: bluetoothd: command not found
Bluetooth HID daemon
joymixer started.
Starting PS3 l2cap server.
Sitting = 9005, Squating = 6, Standing = 65

Robot is Ready

10-07-2015, 10:36 AM
I assume you mean PS3 and not PS2...

As I mentioned in a different thread yesterday, I had issues with PS3 on the Edison... Are you using the Image for the Edison that was setup by Trossen? I know R3n33 has had luck with the PS3 and Edison.

I see you did the pairing and the like.

I think maybe I will update one of my Edisons to run with Andrews image and see if I have some luck. Something that you might do that might help verify a few things include, when you have the robot in the state you show, where it says Robot is Ready...

In a different window (Putty?), get some more diagnostic information:

Example: Try typing the command: ls /dev/input
Does the device name: /dev/input/js0 show up? My guess is not.

Also see if there is any diagnostic information that might help, like type something like: dmesg | tail -30

And see what messages are there about the joystick.

Sorry I don't have any better clues.


10-07-2015, 10:56 AM
In your output it says:

./start_edison: line 5: bluetoothd: command not found

Which makes me believe you don't have BlueZ4 installed. In fact when I downloaded and flashed the latest Edison image for the HR-OS1 I believe it came with BlueZ5 installed.

Which means... You need a different start script for the ps3_demo. What I did was create a file called start_edison_bluez5 (https://github.com/r3n33/HROS1-Framework/blob/experimentation/Linux/project/ps3_demo/start_edison_bluez5) with the contents:

#!/bin/sh -e
rfkill block bluetooth &
killall demo &
sleep 2
./demo &
sleep 2
rfkill unblock bluetooth &

Execute this instead of start_edison and your controller will hopefully work.

10-07-2015, 11:47 PM
That worked and yes it is using BlueZ5. Thanks for the help. Also I noticed the current repository does not have a script for stopping the robot. Is there a reason for that, was it taken out in replacement of something else.

10-09-2015, 03:47 PM
Great! I'm glad that worked.

I noticed the same thing about the missing stop script.. for now I use the command

killall demo

but I don't know exactly why the old script is missing. I think mainly things are "in progress" and have a big update coming soon.