From owner-freebsd-questions@freebsd.org Sun Oct 4 14:18:38 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECAE84299EA for ; Sun, 4 Oct 2020 14:18:38 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C45SF5KFjz3XwX for ; Sun, 4 Oct 2020 14:18:37 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([178.8.34.218]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPA (Nemesis) id 1Mf0Je-1ks4011PTu-00gXO6 for ; Sun, 04 Oct 2020 16:18:35 +0200 Date: Sun, 4 Oct 2020 16:18:35 +0200 From: Polytropon To: FreeBSD Questions Subject: Asus DH IR remote with USB receiver support on FreeBSD with LIRC as additional keyboard Message-Id: <20201004161835.22741259.freebsd@edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:SbeUdCBMzE/Wp295+wu6oCwk9STLRT4rreCgZ61KXyDytN4lAeL jhwnXelcWT2Rm1ZnNZOPXcjRHQBGSep/dNQUuqDPk3bVcM0wG7ze70fyC/pDDXzANuaAq+X oMD/Vff8/4tnD6e08AUwLDQzyqW12Or4aUCW0ArITpr8TaPpwIF5XUdUGIhM2F0Jnm4lLXh iGVbOr//hPz0VxTKEkNow== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FOsqdIHDKQM=:JohaB6Qbw7mwg0zDSm3F8x 5JtuYsySkZ3Te1/RKMDEB9GB5gu4/j9i4j8cGVmAZtnzeKhx+clts6QQsr2QZgy/nj68s76b2 VtQ/0RDSM3HYTkoStY6oYMZglNLxOUSy8TCP/K5Pze+Gcm494bGbrlMCl9CIH9Zv+WbJ2rZTg fEAk4LPMbUUuK6BwUz49Y0EO83+NIdwJhAyMZU+45miq9tJNi/3vSiozbRysKF+PymFRC8hYi 8zeIMJKuLNPzJCN43gTCTX63MvRh6Av3hKbV4J/O+z5/6YHMUAQF1nEoMqRzmJnQKZM1ywHqH +QTQljWifjGLxwnkX9jq+SUr4l4CZM+zvNz/9+Apdk7BvYcrrF1SIDVHF5wMjE9dZxyvyfc82 dg9OST0EUfnZFB7FeXmTDHV+GnSGxPu48ug04MhaXi/lmy7z0x9O+/DMzcMtRJWcc8pyVzAGB 5Gt70N9nRx72TdqGr51auLtNC0W/OCR8CMSq8Wqx7sTUFd6fWO+BPhXx9Nu2o9jaMDvYL4D6/ cXpCM5ktEpIQjsEyEMUxsahBUCzxssJZTWRfe/NNgzqgZI865xFAsqAL5WYpr0NahJIE+rUL/ KB8qvKJ3pqVHqYajrv/whxeKxhlFAItC5PPghWg4FlSxpIwV7On56sKBrCu9T+ua+rkhMSXy5 fdLgl59I0wGCAChcintW6t0LeMGiJYyu7Deje3DhASsIaQAsj+A+XixSA7tH8EA9WU6lRTTEu KSQJfd8z4R8wy+rkXkjcPCeFbzgt/yp6cc4n300N+EMw25tDClYtgOSmuso1dj1AZqInzO+bp O+iCR8RHniCvIDkabf5H+2PNhyyprLoLJHdLfT6vg/BFW6IFEPoQ/9ZYHd3adl80DvDMCP8 X-Rspamd-Queue-Id: 4C45SF5KFjz3XwX X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.133) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.81 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[178.8.34.218:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.67)[0.672]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.98)[0.984]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_LONG(0.75)[0.754]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.133:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.126.133:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2020 14:18:39 -0000 Out of curiosity (and because I'd like to have a working remote control for presentations given by "xpdf -fullscreen "), I'd like to get my Asus DH remove control working with FreeBSD. There is a USB receiver which identifies to the system as follows: ugen2.6: at usbus2 ukbd1 on uhub7 ukbd1: on usbus2 kbd3 at ukbd1 But in my opinion, the identification as a keyboard is a false-positive, and it doesn't work. Using the "xev" tool, when I press any key on the remove, I get a "left shift key down" event, and it keeps stuck in that state, so I have to disconnect the IR receiver so it "snaps back" to normal. I've read that I need LIRC - Linux Infrared Remove Control. Luckily, this is available on FreeBSD and even comes with a configuration file for the Asus remote: /usr/local/share/examples/lirc/remotes/asus/lircd.conf.asusdh I can start the daemon, but don't know which device I am supposed to use (so "default" looks reasonable from the "--device=help" list): # lircd -n --device=/dev/ugen2.6 --driver=default lircd: lircd(default) ready, using /var/run/lirc/lircd ^C lircd: caught signal # _ No error messages or useful log entries are being generated. But no /dev/lirc0 device file either. The documentation on the web is... well... quite "distributed"... and applies to Linux primarily. It mentions files that exist nowhere, it is not clear about what device name to enter where, and so on. I cannot get a /dev/lirc0 file, even though LIRC starts. I have no idea what to put into which configuration file, or how they are supposed to be named and located; /usr/local/etc/lircd.conf is logical, but is hardware.conf supposed to be /usr/local/etc/lirc/hardware.conf? It's not even mentioned in the manual (and the manual is specific to Linux). What I'm basically searching for is a way to have the remote to be an additional keyboard, sending key presses into X's input system as if I would press them on a normal keyboard, e. g., press "+" on the remote, sends KP_Add, outputs "+". It would be nice to define which key symbols are being sent for a specific code, just like any simple programmable keyboard can be used (code - symbol - action, using common tools like xev, xmodmap, and xbindkeys, no further magic is needed). Or for the use with xpdf in presentation mode: press ">>|", sends "space", xpdf shows next page; press "|<<", sends "b", xpdf shows previous page. I _assume_ that something like lirc - config - xmodmap is possible. Or at least _should_ be possible. I have no idea what I'm doing. So my questions include, but are not limited to: 1. How do I prevent FreeBSD from aiming me with a false keyboard that I need to unplug after I pressed a key? 2. How to setup LIRC correctly on FreeBSD, given the information that you know which IR device you have and which USB port the receiver is attached to? 3. How can X be configured to accept codes / symbols received by the IR system as key presses I can define? Did anyone get this potentially useful thing to work with FreeBSD yet? It would be unfortunate if I had to throw the remote and the receiver away just because the documentation is problematic (to a simple-minded user like myself)... -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...