5 Replies Latest reply on Feb 17, 2016 7:20 AM by dunex_1

    Not able to connect to PS4 on Edison Gen 2 using inbuilt bluetooth

    hemantt

      I am using Intel Edison Soc  and "Intel Edison kit for Arduino"

       

      I have been trying to connect to PS4 from  Edison using bluetooth as explained in  http://download.intel.com/support/edison/sb/edisonbluetooth_331704004.pdf

      I am following these steps but still Edison is not connecting to PS4.

      6.1

      6.1.1

      6.2

      6.2.1

       

      I can pair the PS4 controller but can not connect to it

       

       

       

      [bluetooth]# info 1C:96:5A:55:00:7E

      Device 1C:96:5A:55:00:7E

              Name: Wireless Controller

              Alias: Wireless Controller

              Class: 0x002508

              Icon: input-gaming

              Paired: yes

              Trusted: yes

              Blocked: no

              Connected: yes

              LegacyPairing: no

              UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)

              UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

              Modalias: usb:v054Cp05C4d0100

      [bluetooth]#

      [bluetooth]# connect 1C:96:5A:55:00:7E

      Attempting to connect to 1C:96:5A:55:00:7E

      Failed to connect: org.bluez.Error.Failed

       

      Am I missing any step ?

       

      Following are details steps

       

      root@edison:~# rfkill unblock bluetooth

      root@edison:~# rfkill list

       

      root@edison:~# systemctl start connman

      root@edison:~# connmanctl enable bluetooth

      Enabled bluetooth

      root@edison:~# rfkill list

      You should see following

       

        3: hci0: bluetooth

              Soft blocked: no

             Hard blocked: no

      5. entry into this utility

       

      root@edison:~# bluetoothctl

      [NEW] Controller 98:4F:EE:03:83:A7 BlueZ 5.18 [default]

      [bluetooth]#

       

       

      6.

      root@edison:~# agent KeyboardDisplay

      root@edison:~# default-agent

      root@edison:~# scan on    

      You should see  ID  of  the controller displayed.

       

      root@edison:~#  scan off

       

      root@edison:~# pair 1C:96:5A:55:00:7E

       

       

      [bluetooth]# info 1C:96:5A:55:00:7E

      Device 1C:96:5A:55:00:7E

              Name: Wireless Controller

              Alias: Wireless Controller

              Class: 0x002508

              Icon: input-gaming

              Paired: yes

              Trusted: yes

              Blocked: no

              Connected: yes

              LegacyPairing: no

              UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)

              UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

              Modalias: usb:v054Cp05C4d0100

       

      [NEW] Controller 98:4F:EE:03:83:A7 BlueZ 5.18 [default]

      [NEW] Device 1C:96:5A:55:00:7E Wireless Controller

      [bluetooth]# paired-devices

      Device 1C:96:5A:55:00:7E Wireless Controller

      [bluetooth]# info 1C:96:5A:55:00:7E

      Device 1C:96:5A:55:00:7E

              Name: Wireless Controller

              Alias: Wireless Controller

              Class: 0x002508

              Icon: input-gaming

              Paired: yes

              Trusted: yes

              Blocked: no

              Connected: no

              LegacyPairing: no

              UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)

              UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

              Modalias: usb:v054Cp05C4d0100

      [bluetooth]# connect 1C:96:5A:55:00:7E

      Attempting to connect to 1C:96:5A:55:00:7E

      Failed to connect: org.bluez.Error.Failed

       

       

      Thanks,

      Hemant

        • 1. Re: Not able to connect to PS4 on Edison Gen 2 using inbuilt bluetooth
          TXBDan

          Has the version of BlueZ been updated in the past few months? I was also trying to get a PS4 controller to work, but the default BlueZ version was too low for native PS4 support and i gave up after trying to upgrade it. The document you linked also appears to be new to me.

           

          Here is one resource i found: Sony DualShock - Gentoo Wiki

           

          I'm going to give this a shot again now. I'll let you know if i can figure it out.

          • 2. Re: Not able to connect to PS4 on Edison Gen 2 using inbuilt bluetooth
            TXBDan

            I was able to get it to connect. I installed fresh Yocto firmware version "120". The fw zip is called "edison-image-ww05-15.zip". I bolded the commands i input

             

            root@edison:~# rfkill unblock bluetooth

            root@edison:~# bluetoothctl

            [NEW] Controller 98:4F:EE:03:62:87 edison [default]

            [bluetooth]# agent on

            Agent registered

            [bluetooth]# default-agent

            Default agent request successful

            [bluetooth]# power on

            Changing power on succeeded

            [bluetooth]# discoverable on

            Changing discoverable on succeeded

            [CHG] Controller 98:4F:EE:03:62:87 Discoverable: yes

            [bluetooth]# pairable on

            Changing pairable on succeeded

            [bluetooth]# scan on

            Discovery started

            [CHG] Controller 98:4F:EE:03:62:87 Discovering: yes

            [NEW] Device 1C:96:5A:57:86:10 Wireless Controller

            [NEW] Device 60:03:08:D3:60:A4 60-03-08-D3-60-A4

            [CHG] Device 1C:96:5A:57:86:10 RSSI: -63

            [bluetooth]# pair 1C:96:5A:57:86:10

            Attempting to pair with 1C:96:5A:57:86:10

            [CHG] Device 1C:96:5A:57:86:10 Connected: yes

            [CHG] Device 1C:96:5A:57:86:10 UUIDs:

                    00001124-0000-1000-8000-00805f9b34fb

                    00001200-0000-1000-8000-00805f9b34fb

            [CHG] Device 1C:96:5A:57:86:10 Paired: yes

            Pairing successful

            Authorize service 00001124-0000-1000-8000-00805f9b34fb (yes/no): yes

            [bluetooth]# [  383.526655] hid-generic 0005:054C:05C4.0001: unknown main item tag 0x0

            trust 1C:96:5A:57:86:10

            [CHG] Device 1C:96:5A:57:86:10 Trusted: yes

            Changing 1C:96:5A:57:86:10 trust succeeded

            [bluetooth]# connect 1C:96:5A:57:86:10

            Attempting to connect to 1C:96:5A:57:86:10

            Connection successful

            [bluetooth]# info 1C:96:5A:57:86:10

            Device 1C:96:5A:57:86:10

                    Name: Wireless Controller

                    Alias: Wireless Controller

                    Class: 0x002508

                    Icon: input-gaming

                    Paired: yes

                    Trusted: yes

                    Blocked: no

                    Connected: yes

                    LegacyPairing: no

                    UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)

                    UUID: PnP Information          (00001200-0000-1000-8000-00805f9b34fb)

                    Modalias: usb:v054Cp05C4d0100

             

             

            It looks it was mapped to /dev/input/event2.  I can cat the device and see random junk coming out of it as i move the controller joysticks/buttons.

            • 3. Re: Not able to connect to PS4 on Edison Gen 2 using inbuilt bluetooth
              TXBDan

              By George, I've i'm onto it.

               

              I read a little further in that Intel doc and saw the part about using evtest. Using this, i can see the output of the controller and was able to map a few things:

              EV_KEY (value 1 is pressed, 0 is not)

              X: BTN_B

              O: BTN_C

              square: BTN_A

              triangle: BTN_X

               

              EV_ABS (value is -1, 0 (not pressed), or 1)

              Dleft: ABS_HAT0X = -1

              Dright: ABS_HAT0X = 1

              Dup: ABS_HAT0Y = -1

              Ddown: ABS_HAT0Y = 1

               

              Then i was trying to figure out how to talk to the device in C and found this great post on stackexchange:

              c - Accessing Keys from Linux Input Device - Stack Overflow

               

              I modified his example a little and now i have a program that displays the buttons i press on the controller. Well only the Dpad and buttons so far. I'll figure out the joysticks tomorrow.

               

                      if (ev.type == EV_KEY && ev.code == BTN_B && ev.value == 1)

                              printf("X\n");

               

                      if (ev.type == EV_KEY && ev.code == BTN_C && ev.value == 1)

                              printf("Circle\n");

               

                      if (ev.type == EV_KEY && ev.code == BTN_A && ev.value == 1)

                              printf("Square\n");

               

                      if (ev.type == EV_KEY && ev.code == BTN_X && ev.value == 1)

                              printf("Triangle\n");

               

                      if (ev.type == EV_ABS && ev.code == ABS_HAT0X){

                         if(ev.value == -1)

                              printf("LEFT\n");

                         if(ev.value == 1)

                              printf("RIGHT\n");

                      }

               

                      if (ev.type == EV_ABS && ev.code == ABS_HAT0Y){

                         if(ev.value == -1)

                              printf("UP\n");

                         if(ev.value == 1)

                              printf("DOWN\n");

                      }

              • 5. Re: Not able to connect to PS4 on Edison Gen 2 using inbuilt bluetooth
                dunex_1

                Hi TXBDan, Thank you for the direction it really helped me out a lot. I want to know how to put the above commands in a script so that at boot-up, the Intel Edison can connect to my PlayStation 4 controller.

                 

                Thanks in advance and have a wonderful day!