[LINUX] Logitech Harmony Ultimate on Linux Bluetooth + Support for Bluez 5
#16
I get the following error at Step 4

xbmc@Streacom:~/bluez-4.94$ patch -p1 < ../bluez_ps3remote_4.91.diff

Quote:patching file input/device.c
Hunk #1 succeeded at 563 (offset -5 lines).
Hunk #2 succeeded at 609 (offset -5 lines).
Hunk #3 succeeded at 640 (offset -5 lines).
Hunk #4 succeeded at 1262 (offset -5 lines).
patching file input/device.h
patching file input/fakehid.c
Hunk #9 FAILED at 893.
Hunk #10 succeeded at 956 (offset 12 lines).
Hunk #11 succeeded at 968 (offset 12 lines).
Hunk #12 succeeded at 980 (offset 12 lines).
1 out of 12 hunks FAILED -- saving rejects to file input/fakehid.c.rej
patching file input/fakehid.h
patching file input/input.conf
patching file input/manager.c
patching file src/device.c
Hunk #1 succeeded at 880 (offset -6 lines).
Hunk #2 succeeded at 910 (offset -6 lines).
Hunk #3 succeeded at 1142 (offset -4 lines).
xbmc@Streacom:~/bluez-4.94$


As a result configure and build doesn't work obviously.

./configure --prefix=/usr && make

Quote:input/fakehid.o: In function `ps3remote_event':
fakehid.cSad.text+0x4b3): undefined reference to `fake_hid_common_timeout'
/usr/bin/ld: input/fakehid.o: relocation R_X86_64_PC32 against undefined symbol `fake_hid_common_timeout' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [src/bluetoothd] Error 1
make: *** [all] Error 2

Is that diff in the dropbox account the latest one you ended up with when making the guide? Wink
Many thanks
Reply
#17
Ahhhhhhhhhhhhhhhhhhhhhhhhhhhh!

OP your guide is wrong.

The reason for my problem above is that the diff file is made for a particular version of a file and the edits should be applied to the patched fakehid.c - after - not before Wink

Please update your guide Smile
Reply
#18
(2015-09-23, 17:33)robo989 Wrote: Ahhhhhhhhhhhhhhhhhhhhhhhhhhhh!

OP your guide is wrong.

The reason for my problem above is that the diff file is made for a particular version of a file and the edits should be applied to the patched fakehid.c - after - not before Wink

Please update your guide Smile

It works fine for me... Ill check it out, which step should be replaced by which?
Reply
#19
(2015-09-23, 18:00)IIIdefconIII Wrote:
(2015-09-23, 17:33)robo989 Wrote: Ahhhhhhhhhhhhhhhhhhhhhhhhhhhh!

OP your guide is wrong.

The reason for my problem above is that the diff file is made for a particular version of a file and the edits should be applied to the patched fakehid.c - after - not before Wink

Please update your guide Smile

It works fine for me... Ill check it out, which step should be replaced by which?

The diff patching fails because it's expecting an unedited fakehid.c (which has been edited in the previous step).
So basically, you don't edit the fakehid.c until AFTER you have run the patch.
It works for you because you didn't do it in the order the guide is written in.

Personally I'm stuck at

Code:
xbmc@Streacom:~/ps3pair$ sudo python ps3_pair.py
Please HOLD the START and ENTER buttons on the PS3 remote.
Searching for devices, please wait...
Found:
No devices found

I have the same blutooth receiver as you by chance.
Would you mind sharing which post in that PS3/BD Remote thread you got the harmony remote info so I can look into it further I'm pretty sure the guide is missing somethingh else or the edits aren't correct as this should be connecting.

Thanks for drawing attention to it though, had no idea this was possible Smile
Reply
#20
(2015-09-23, 18:13)robo989 Wrote:
(2015-09-23, 18:00)IIIdefconIII Wrote:
(2015-09-23, 17:33)robo989 Wrote: Ahhhhhhhhhhhhhhhhhhhhhhhhhhhh!

OP your guide is wrong.

The reason for my problem above is that the diff file is made for a particular version of a file and the edits should be applied to the patched fakehid.c - after - not before Wink

Please update your guide Smile

It works fine for me... Ill check it out, which step should be replaced by which?

The diff patching fails because it's expecting an unedited fakehid.c (which has been edited in the previous step).
So basically, you don't edit the fakehid.c until AFTER you have run the patch.
It works for you because you didn't do it in the order the guide is written in.

Personally I'm stuck at

Code:
xbmc@Streacom:~/ps3pair$ sudo python ps3_pair.py
Please HOLD the START and ENTER buttons on the PS3 remote.
Searching for devices, please wait...
Found:
No devices found

I have the same blutooth receiver as you by chance.
Would you mind sharing which post in that PS3/BD Remote thread you got the harmony remote info so I can look into it further I'm pretty sure the guide is missing somethingh else or the edits aren't correct as this should be connecting.

Thanks for drawing attention to it though, had no idea this was possible Smile

I tried it again the whole guide on a clean install, and it worked again...
It makes no sense, cause you need to edit the fakehid before compiling, you compile it with the fake ps3 remote device, thats proberylt the same reason it doesnt work and youre stuck now. It didnt inject tje fakehid.c while compiling.

Does youre remote get detected?
Reply
#21
(2015-09-23, 17:00)robo989 Wrote: you may have a wrong syntax in the fakehid.c if you want i can teamview for you and fix it with ssh
Reply
#22
(2015-09-23, 18:41)IIIdefconIII Wrote:
(2015-09-23, 17:00)robo989 Wrote: you may have a wrong syntax in the fakehid.c if you want i can teamview for you and fix it with ssh



Hi mate, that's very kind of you but it's ok. I'll give it another shot tomorrow.
Reply
#23
Finally got this setup, but it won't work following the guide mate.
You need to correct some errors/omissions.

1. This is a fact, you need to patch using the diff before editing in the Harmony Ultimate hardware stuff.
So, you need to "patch -p1 < ../bluez_ps3remote_4.91.diff" - before adding the harmony specific stuff.
If you are not getting an error on that patch part it is likely because you have left over files from previous experiement. Please verify this yourself by following the steps and patching after editing to confirm the error.

2. The following that gets added to the fakehid.c isn't in the correct place, or it is, but the stuff before isn't correct in your guide.The entry above the harmony section isn't
It should look like this once edited. The "/* Blu-Link PS3 remote device */" may not be needed BUT it's crucial it is there as that is what you are left with after the patch has been applied and by omitting it, it confuses the user, the guide gives the impression it was never there as it skips it.

Code:
/* Sony PS3 remote device */
        {
                .vendor         = 0x054c,
                .product        = 0x0306,
                .connect        = ps3remote_connect,
                .disconnect     = ps3remote_disconnect,
                .event          = ps3remote_event,
                .setup_uinput   = ps3remote_setup_uinput,
                .devices        = NULL,
        },

        /* Blu-Link PS3 remote device */
        {
                .vendor         = 0x0609,
                .product        = 0x0306,
                .connect        = ps3remote_connect,
                .disconnect     = ps3remote_disconnect,
                .event          = ps3remote_event,
                .setup_uinput   = ps3remote_setup_uinput,
                .devices        = NULL,
        },

        /* Logitech Harmony PS3 remote device */
        {
                .vendor         = 0x046d,
                .product        = 0xc129,
                .connect        = ps3remote_connect,
                .disconnect     = ps3remote_disconnect,
                .event          = ps3remote_event,
                .setup_uinput   = ps3remote_setup_uinput,
                .devices        = NULL,
        },

        { },
};

3. You need to edit input.conf once downloaded to your local machine and remove the comment marking from the MAC address and input your remote's one...

Code:
# Configuration file for the input service

# This section contains options which are not specific to any
# particular interface
[General]

# Set idle timeout (in seconds) before the connection will
# be disconnect (defaults to 0 for no timeout)
IdleTimeout=300



# This section contains options that are specific to a device
#00:11:22:33:44:55
#
# Set a custom idle timeout (in seconds) for this specific device
#IdleTimeout=30

^"#00:11:22:33:44:55"
Should simply remove the # and have proper remote address.
Reply
#24
I've ran through this setup several times but I must be doing something wrong. I don't get any errors during the setup but when all is said and done when I press buttons on the paired remote I get this in dmesg

Code:
[37192.267854] input: Bluetooth HID Boot Protocol Device as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/bluetooth/hci0/hci0:21/input54
[37210.330998] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331004] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331006] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331008] Bluetooth: Unknown key (scancode 0xff) pressed.
Reply
#25
is it possible to pair multiple bluetooth harmony remotes (configures as ps3) to one linux machine?
can anyone send the evtest output of a logitech bluetooth (ps3) remote?

thanks!
Reply
#26
(2015-09-26, 23:03)robo989 Wrote: Finally got this setup, but it won't work following the guide mate.

^"#00:11:22:33:44:55"
Should simply remove the # and have proper remote address.

Not true, not needit, i did a full clean install and checked the guide again, its working like aspected.

Which os r u using? which version and bluetooth adapt.

Here is my input.conf

Code:
# Configuration file for the input service

# This section contains options which are not specific to any
# particular interface
[General]

# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)
#IdleTimeout=30

and its working, either youre doing something wrong, or youre using another setup thats not compatible. Anyway do whatever works for you, i check this twice now on a clean install and it works great.
Reply
#27
(2015-09-28, 03:11)drivesoslow Wrote: I've ran through this setup several times but I must be doing something wrong. I don't get any errors during the setup but when all is said and done when I press buttons on the paired remote I get this in dmesg

Code:
[37192.267854] input: Bluetooth HID Boot Protocol Device as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/bluetooth/hci0/hci0:21/input54
[37210.330998] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331004] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331006] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331008] Bluetooth: Unknown key (scancode 0xff) pressed.

did you also downloaded the keymaps and input.conf and make a symbolic link?
Reply
#28
(2015-10-02, 00:44)IIIdefconIII Wrote:
(2015-09-28, 03:11)drivesoslow Wrote: I've ran through this setup several times but I must be doing something wrong. I don't get any errors during the setup but when all is said and done when I press buttons on the paired remote I get this in dmesg

Code:
[37192.267854] input: Bluetooth HID Boot Protocol Device as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/bluetooth/hci0/hci0:21/input54
[37210.330998] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331004] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331006] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331008] Bluetooth: Unknown key (scancode 0xff) pressed.

did you also downloaded the keymaps and input.conf and make a symbolic link?

I did. I have verified the files locations and contents.

I have also ran bluetoothd standalone non detached with debugging and verified that it is loading the keymap.
Reply
#29
(2015-10-02, 15:39)drivesoslow Wrote:
(2015-10-02, 00:44)IIIdefconIII Wrote:
(2015-09-28, 03:11)drivesoslow Wrote: I've ran through this setup several times but I must be doing something wrong. I don't get any errors during the setup but when all is said and done when I press buttons on the paired remote I get this in dmesg

Code:
[37192.267854] input: Bluetooth HID Boot Protocol Device as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/bluetooth/hci0/hci0:21/input54
[37210.330998] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331004] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331006] Bluetooth: Unknown key (scancode 0xff) pressed.
[37210.331008] Bluetooth: Unknown key (scancode 0xff) pressed.

did you also downloaded the keymaps and input.conf and make a symbolic link?

I did. I have verified the files locations and contents.

its easier for me te help from teamviewer, otherwise i cannot help im not that great aswell with linux, but i did manage to get it working
Reply
#30
Today I tried to get my Harmony Ultimate work. Before I started i've read a lot on the Logitech and Kodi forums so I knew what I was doing.

Had to choose between an IR receiver or a BT dongle. My choise went to a BT dongle, because I couldnt wait ordering an IR receiver online. so went to a store nearby and bought myself a BT dongle.

Now, mostly before I'm starting a (long) guide, like this one, I try to fix it myself during an easy, simple way. In this case: plug in the BT dongle, open the Harmony Android App en try to connect to a computer. The App asked me if I want to connect via BT, offcourse I want, so clicked yes.

And so the remote works... Believe it or not. Not directly as I want, because not all the buttons worked perfect. So downloaded the keyboard.xml from the first post, changes all the keyboard shortcuts with the actions I want them to perform, put the same shortcuts (mostly f1, f2, etc) in the remote hub to Computer service (the one I connected with BT) and voila.. Done. Cost me one houre and all the buttons (accept the numbers from 0 till 9) are working perfectly! Even the diffferences in global and fullscreen mode are working as they should.

When I added a Computer in the Hub, I selected Windows, because when I first tried Linux the choise of of Keys is really poor. And the Windows keys are also working on Linux in this case.

Dont know what the diffferences are with my setup and de guide from the first post, but I'm glad it also works almost out of the box.

Im running Ubuntu 14, Kodi 15.1, MythTV Backend with the Kodi Addon.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Logitech Harmony Ultimate on Linux Bluetooth + Support for Bluez 50