Anyone have a Emprex 3009URF MCE RC? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: Anyone have a Emprex 3009URF MCE RC? (/showthread.php?tid=60944) |
- KeRbDoG - 2010-10-18 Quote:root@XBMC-Ubuntu:/home/xbmc# lsmod| grep hid Can't seem to get it working - I have F9 onwards assigned and as a test I've the Windows button assigned as F9 and in the keyboards.xml config I have F9 to be 'FullScreen'. - tonyt - 2010-10-18 KeRbDoG Wrote:Can't seem to get it working - I have F9 onwards assigned and as a test I've the Windows button assigned as F9 and in the keyboards.xml config I have F9 to be 'FullScreen'. It's not loading the new module, it should look like this xbmc@XBMCLive:~$ lsmod| grep hid* hid_btc 2010 0 usbhid 36110 0 hid 65807 2 hid_btc,usbhid When I get time I'll retry B3, following the instructions from scratch. I couldn't get this method to work with karmic, and lucid has a bug that prevents flv files with aac audio playing the audio, so am going to be testing W7 over the next couple of days but will try and test the notes on B3 again asap - KeRbDoG - 2010-10-18 Thanks TonyT - tonyt - 2010-10-20 Ok, below are the exact notes I used to get the remote working in Dharma Beta 3 and I copied from them and pasted each command exactly as they are into a putty session to avoid any typos The machine is a revo r3610, I installed the Dharma Beta 3 live cd to the whole internal hard drive from an external bd player I've now switched to W7 version as it's making life so much simpler and just works out of the box for me with very few tweaks to windows, and to my surprise is playing 1080p content fine (and flv's with AAC which was a bug bear with lucid) -------------------------------------------------------------------------------------------- These notes document how I got my Emprex 3009URF Remote fully working with XBMC The mod is designed to get the keys that don't work "as is" (or thru .xsessionrc) working These notes are based on installing the stock dharma beta 3 live cd to a hard drive (or, probably, large usb stick) In my case the PC is an Acer Revo R3610 I know very little about linux, so these are just notes of the actions I took Some of the actions are probably completely unnecessary... You follow/attempt/use/etc these notes etc entirely at your own risk! The base patch file to get the emprex remote to work comes from: https://patchwork.kernel.org/patch/70351/ To build the new USB HID driver with emprex remote support perform the following (assumes you have logged in as the user created when installing xbmc live to hard disk): sudo su - aptitude update apt-get install linux-source mkdir ~/src cd ~/src tar xjvf /usr/src/linux-source-2.6.32.tar.bz2 cd linux-source-2.6.32 (not sure which of any of the 4 lines below are actually necessary, but I did them all anyway) cp -vi /boot/config-2.6.32-25-generic .config apt-get install qt3-dev-tools libqt3-mt-dev apt-get install libncurses5 libncurses5-dev apt-get install kernel-package (at this point I also install the SMB file system so I grab a copy of the emprex patch from my windows server though this should have no relevance on anything else. "apt-get install smbfs") Download the emprex patch file from https://patchwork.kernel.org/patch/70351/ to ~/src/linux-source-2.6.32 and apply the patch: cd ~/src/linux-source-2.6.32 patch -p1 < HID-driver-for-BTC-Emprex-3009URF-III-Vista-MCE-Remote-quirky-remote.patch The output from this should like this: patching file drivers/hid/hid-btc.c patching file drivers/hid/hid-core.c Hunk #1 succeeded at 1294 (offset 4 lines). patching file drivers/hid/hid-ids.h Hunk #1 succeeded at 122 (offset 9 lines). patching file drivers/hid/Kconfig Hunk #1 succeeded at 86 (offset 6 lines). patching file drivers/hid/Makefile Hunk #1 succeeded at 23 (offset 1 line). EDIT THE hid-btc.c file in vi to set the key mappings you wish to apply (SEE SEPERATE NOTES BELOW FOR DETAILS) vi ~/src/linux-source-2.6.32/drivers/hid/hid-btc.c Edit these 3 files: vi /lib/modules/2.6.32-25-generic/build/.config vi /lib/modules/2.6.32-25-generic/build/include/config/tristate.conf vi /lib/modules/2.6.32-25-generic/build/include/config/auto.conf Placing the line CONFIG_HID_BTC=m (M for tristate.conf) Immediately BEFORE the line that says CONFIG_HID_CHERRY=m Also before #define CONFIG_HID_CHERRY_MODULE 1 put #define CONFIG_HID_BTC_MODULE 1 in this file: vi /lib/modules/2.6.32-25-generic/build/include/linux/autoconf.h (NOTE: IF YOU EDIT HID-BTC.C AGAIN LATER JUST START AGAIN FROM THIS POINT) cd ~/src/linux-source-2.6.32/drivers/hid make -C /usr/src/linux-headers-`uname -r` M=`pwd` modules (use ls to check the btc hid has compiled, look for files hid-btc.c hid-btc.ko hid-btc.mod.c hid-btc.mod.o hid-btc.o) make -C /usr/src/linux-headers-`uname -r` M=`pwd` modules_install depmod -a cp /lib/modules/2.6.32-25-generic/extra/hid.ko /lib/modules/2.6.32-25-generic/kernel/drivers/hid/hid.ko The above will have installed a replacement usbhid driver BUT by default when the system reboots a version, I assume from the kernel, gets loaded so it's necessary after a reboot to somehow action the following commands: modprobe -r usbhid (this will disable usb keyboard/mouse etc so use putty or something for testing) modprobe usbhid An "lsmod" at this point should show the following entries hid_btc 2010 0 usbhid 36110 0 hid 65807 2 hid_btc,usbhid I have opted, on my system, to edit the xbmc startup script as follows vi /etc/init/xbmc-live.conf and put the modprobe lines immediately BEFORE the line that says "exec /usr/bin/runXBMC" I then reboot to test the remote in XBMC when I get time I'll be looking to put the modprobe lines elsewhere so they don't get overwritten by an xbmc upgrade And that's it! Notes on the Emprex Remote Keys The remote can be considered to contain 3 types of key with regards to xbmc: a) Those that just work (e.g. Play, volume, mute, 0-9 etc) b) Those that can be remapped to work via an /home/xbmc/.xsessionrc file (e.g. record) c) Those that need the hid-btc file (e.g. dvd, music, text etc) When editing the hid-btc you can either assign the exact keys you want or perhaps use unused keys like F12, F13 etc and then just remap them in .xsessionrc If you just want the extra keys defined in the original BTC file then you just need to edit the functions you want to assign (e.g. if you want the TEXT key to be the context menu then change the KEY_TEXT to KEY_C) If you also want the 3 keys for channel up, channel down and guide then you'll need to replace the section shown below with the new version OLD VERSION: switch (usage->hid & HID_USAGE) { case 0x00d: btc_map_key_clear(KEY_MEDIA); break; case 0x024: btc_map_key_clear(KEY_MENU); break; case 0x048: btc_map_key_clear(KEY_TV2); break; case 0x025: btc_map_key_clear(KEY_TV); break; case 0x047: btc_map_key_clear(KEY_MP3); break; case 0x049: btc_map_key_clear(KEY_CAMERA); break; case 0x04a: btc_map_key_clear(KEY_VIDEO); break; case 0x050: btc_map_key_clear(KEY_RADIO); break; case 0x05b: btc_map_key_clear(KEY_RED); break; case 0x05c: btc_map_key_clear(KEY_GREEN); break; case 0x05d: btc_map_key_clear(KEY_YELLOW); break; case 0x05e: btc_map_key_clear(KEY_BLUE); break; case 0x05a: btc_map_key_clear(KEY_TEXT); break; default: return 0; } NEW VERSION (with remote button names indicated): switch (usage->hid & HID_USAGE_PAGE) { case 0x0ffbc0000: switch (usage->hid & HID_USAGE) { case 0x00d: btc_map_key_clear(KEY_MEDIA); break; /* WINDOWS */ case 0x024: btc_map_key_clear(KEY_MENU); break; /* DVDMENU */ case 0x048: btc_map_key_clear(KEY_TV2); break; /* RECTV */ case 0x025: btc_map_key_clear(KEY_TV); break; /* LIVETV */ case 0x047: btc_map_key_clear(KEY_MP3); break; /* MUSIC */ case 0x049: btc_map_key_clear(KEY_CAMERA); break; /* PICTURES */ case 0x04a: btc_map_key_clear(KEY_VIDEO); break; /* VIDEO */ case 0x050: btc_map_key_clear(KEY_RADIO); break; /* RADIO */ case 0x05b: btc_map_key_clear(KEY_RED); break; /* RED */ case 0x05c: btc_map_key_clear(KEY_GREEN); break; /* GREEN */ case 0x05d: btc_map_key_clear(KEY_YELLOW); break; /* YELLOW */ case 0x05e: btc_map_key_clear(KEY_BLUE); break; /* BLUE */ case 0x05a: btc_map_key_clear(KEY_TEXT); break; /* TEXT */ default: return 0; } break; case 0x0000c0000: switch (usage->hid & HID_USAGE) { case 0x09c: btc_map_key_clear(KEY_PAGEUP); break; /* CH UP */ case 0x09d: btc_map_key_clear(KEY_PAGEDOWN); break; /* CH DOWN */ case 0x08d: btc_map_key_clear(KEY_C); break; /* GUIDE */ default: return 0; } break; default: return 0; } All other keys on the remote will work "as is" or will be mapped thru .xsessionrc For details of mapping keys thru .xsessionrc refer to earlier in this thread of course! - Gujs - 2010-11-09 Hi guys, if you have problem with loading the new kernel modules at boot just run this command and reboot: Code: sudo update-initramfs -u I have updated the library - jimmyok - 2010-11-18 I am working on rewriting this so you only need to compile the modules needed. - thaughbaer - 2010-12-25 If hid-btc.ko isn't being loaded check your USB id.. mine was 046e:5577 and not 046e:5578 as in the patch. Looks like you just need... hid-btc.ko hid.ko usbhid.ko in /lib/modules/`uname -r`/extra Mike - t0rm3nt - 2011-04-06 Hey guys im back. decided to give openELEC a go and was wondering if anyone has had any joy getting the remote to work on that ? - Gujs - 2011-04-06 Yes I have 046e:5577 and it works with openelec. I will also try to fix it for 046e_5578. - rincage - 2011-04-10 Gujs Wrote:Yes I have 046e:5577 and it works with openelec. I will also try to fix it for 046e_5578. Any update on making the 046e_5578 device work with Openelec? Not sure what to do. Thanks. - sraue - 2011-04-10 rincage Wrote:Any update on making the 046e_5578 device work with Openelec? Not sure what to do. Thanks. this patch for both devices (5577 and 5578) is included in kernel 2.6.38 which is used in openelec: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.38.y.git;a=blob;f=drivers/hid/hid-topseed.c so if this remote dont work in openelec there must be anything other wrong, or its simply not added to eventlircd which is used in openelec. please test with evtest if you get signals from the remote and add a feature request thread to the forum on openelec.tv. - sraue - 2011-04-10 Hi, rincage Wrote:Any update on making the 046e_5578 device work with Openelec? Not sure what to do. Thanks. do you need a ION/64bit image, if so i can provide one the next hour to test - rincage - 2011-04-11 sraue Wrote:Hi, I was trying to run Openelec ION (64-bit). Grateful for a patch, but no worries if I need to be using the 32-bit version to make it work. - rincage - 2011-04-11 sraue Wrote:this patch for both devices (5577 and 5578) is included in kernel 2.6.38 which is used in openelec: Well it works, but there is no button mapped to the pop-up/context menu. Any advice on this? Thanks. - Gujs - 2011-04-11 rincage Wrote:Well it works, but there is no button mapped to the pop-up/context menu. Any advice on this? Thanks. Try RECTV button. |