2.4GHz Airmouse as remote

Raspberry Pi related support

2.4GHz Airmouse as remote

Postby SlF » 16 Jan 2016, 14:35

Hello there!

I just got one of these: http://www.banggood.com/Mini-2_4Ghz-USB ... 05976.html

I tried to get it working with my runeaudio but I don't really know where to start... The keys are acting like mouse buttons I guess. Testkeys gives no results but the "mouse" gets recognized by runeOS.

Code: Select all
# egrep "Name|Handlers" /proc/bus/input/devices | egrep -B1 'Handlers.*mouse'
# N: Name="FREEWAY TECHNOLOGY"
# H: Handlers=mouse0 event1


I checked the Arch Wiki and stumbled across this: https://wiki.archlinux.org/index.php/Al ... ns_Working

However, xvkbd needs to be installed and if I remember correctly, RuneOS is based on Arch but not the same as ArchLinux, so upgrading packages will break it.
Does anyone know how to get to know the mouse button number?
And more important: Does anyone know, how to map keypresses to for example "mpc -play"?

Thanks in advance :-)

SlF

System: Raspberry Pi B+
Rune: release version: 0.3 (build: beta-20141027)

PS: Love RuneAudio <3
SlF
 
Posts: 30
Joined: 29 Sep 2015, 14:09
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby hondagx35 » 16 Jan 2016, 18:01

Hi SIF,

take a look at this.

I did a test install on my RP2 with a MEDION remote.
Once configured it works perfect.

You have to download / clone the git repo:

Code: Select all
git clone https://github.com/massar/empcd.git
cd empcd
make install


I do not have a running RP1, but i think you have to install "base-devel" first.
Code: Select all
pacman -S base-devel


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby SlF » 31 Jan 2016, 12:18

Hi Frank,

thank you very much for your reply. Found no time to proceed, but now I am on it again. Installing base-devel gives me some options.

Code: Select all
:: There are 25 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file
   7) findutils  8) flex  9) gawk  10) gcc  11) gettext  12) grep  13) groff
   14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch
   20) pkg-config  21) sed  22) sudo  23) texinfo  24) util-linux  25) which


I choose 17 since I want to use the make cmd. However, this gives me:

Code: Select all
error: failed retrieving file 'make-4.0-2-armv6h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404 Not Found
warning: failed to retrieve some files
 libatomic_ops-7.4.2...    57.1 KiB   571K/s 00:00 [######################] 100%
error: failed retrieving file 'gc-7.4.2-2.1-armv6h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404 Not Found
warning: failed to retrieve some files
error: failed retrieving file 'guile-2.0.11-2-armv6h.pkg.tar.xz' from mirror.archlinuxarm.org : The requested URL returned error: 404 Not Found
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.



Any hints?

PS: Do you know a way to find out the names of the mouse buttons? Like "Key_13" for example.
PPS: Isn't it possible to use a bash script like
Code: Select all
KEY_13=mpc play


Best regards

Ole

Edit: Is it safe to do a pacman sync? I don't want to break anything, but I think the error is because of the package lists aren't up to date.
SlF
 
Posts: 30
Joined: 29 Sep 2015, 14:09
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby SlF » 31 Jan 2016, 14:16

Update: I updated the package lists with pacman -Sy and installed evtest. I found out, that the remote is recognized as a mouse AND a keyboard. The buttons are recognized as "KEY_VOLUMEDOWN" Damn nice!!! Only problem is, that I can't compile EMPCd, which I do need to map the buttons...
SlF
 
Posts: 30
Joined: 29 Sep 2015, 14:09
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby hondagx35 » 31 Jan 2016, 15:42

Hi SlF,

Update: I updated the package lists with pacman -Sy and installed evtest.

You now should also should be able to install base-dev.

Code: Select all
pacman -Sy base-devel


Or are there other problems?

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby SlF » 31 Jan 2016, 17:44

Hi Frank,

I don't know why, but after updating the package lists installing make still gave me an error. However after some coffee I came back and tried the command given by you and now it worked. I used "pacman -S base-devel" The -Sy did the trick.

Code: Select all
:: libtool and libltdl are in conflict. Remove libltdl? [y/N] y


I hope this doesn't broke anything?
SlF
 
Posts: 30
Joined: 29 Sep 2015, 14:09
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby SlF » 31 Jan 2016, 18:16

Got it up and running thank you very much!!!

How can I make empcd autostart?

Best regards

Ole
SlF
 
Posts: 30
Joined: 29 Sep 2015, 14:09
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby hondagx35 » 31 Jan 2016, 20:06

Hi SlF,

try this:

- store this file in /usr/lib/systemd/system
- name it like empcd.service
Code: Select all
[Unit]
Description=Startup empcd
After=systemd-modules-load.service

[Service]
Type=simple
ExecStart=/usr/sbin/empcd

[Install]
WantedBy=multi-user.target


- invoke "systemctl enable empcd" from console
Code: Select all
systemctl enable empcd


Change "ExecStart=/usr/sbin/empcd" and add options as you need for example:
ExecStart=/usr/sbin/empcd -c /etc/empcd.conf

- reboot

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby SlF » 01 Feb 2016, 15:27

Hi,

I now have a nearly perfect setup. Everthing is working perfect, I applied the service and it worked, but after changing the empcd config, the service doesn't work anymore... I need to manually start empcd in daemon mode now.

Thank you,

Ole
SlF
 
Posts: 30
Joined: 29 Sep 2015, 14:09
Location: Germany

Re: 2.4GHz Airmouse as remote

Postby yeongheon » 04 Aug 2017, 16:12

Hi,
I am trying to setup 2.4GHz Airmouse too. According to your guide, I installed empcd and base-devel. And it seems that the Airmouse remote identified. But only volumeup and down are working.

So, I need to find Key name of mouse button to describe in empcd.conf. But I dont know.

How can I get the Keyname?
yeongheon
 
Posts: 4
Joined: 03 Mar 2017, 08:01

support RuneAudio Donate with PayPal

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: Bing [Bot] and 6 guests