Feature #651

iMon PAD, Veris Basic, and similar

Added by christian over 14 years ago. Updated about 12 years ago.

Status:Closed Start date:03/20/2010
Priority:Normal Due date:
Assignee:brfransen % Done:

0%

Category:Packages: Core Spent time: -
Target version:8.0

Description

The latest iMon devices come in to linux as two devices (usually /dev/lirc0 and /dev/lirc1). This requires that both a lirc0.conf and lirc1.conf be created.

However, Mythtv assumes only one lirc input is used per remote. So lirc0 and lirc1 need to be combined. In R5.5 this is done by updating the init.d/lirc script to do just that and having it reference hardware.conf. You will note in the hardware.conf, I set up the transmitter args to have the 2nd lirc device defined even though it is a receiver. This allows the init.d/lirc script to be generic and combines the two devices into one port. Given R5.5 did not support a transmitter in the script, I don’t think this is an issue. I based this on JY Avenard’s work.

Requirements:
lirc 0.8.5pre1 or higher (I note lirc 0.8.5pre3 is now out)

Config files:
/etc/init.d/lirc is modified per above
/etc/lirc/hardware.conf /etc/lirc/lirc0.conf
/etc/lirc/lirc1.conf /home/mythtv/.mythtv/lircrc

I have attached my config files. However, lircrc I tried to keep very close to the existing one in R5.5 for the iMon. To do this, I ensured consistancy in the tags in lirc0.conf and lirc1.conf to match the existing lircrc.

I also labeled what Harmoney remotes call the same button. This then allows a person with a Harmony remote configured for the RM200 to know which harmony label matches to which lirc label.

based on the following HOW-TO: http://knoppmyth.net/phpBB2/viewtopic.php?t=19744&sid=a2927ee5f887fabb6fb2a1c3baf939ba

UPDATE:
ok. I've now tested this with 6.01.

We are best to move forward to 0.8.6 or later although any cvs version after 0.8.6pre2 should work too. This will make a single lirc socket and make these devices (Veris versions of iMon receivers) look like any other receiver.

The two relevant lircd.conf files in the remotes/imon are: lircd.conf.imon-antec-veris – This is for any real iMon based remote using the antec veris modules
lircd.conf.imon-mceusb – This is for versions of antec veris that use an MCE based remote with RC-6 (the remote looks like and is an MCE remote)

These lircd.conf use the standard key naming conventions so they should work with a standard lircrc.

Also note all of the lirc imon based stuff is now 64 bit so if you see a 32 bit config file my bet is it won't work. Just watch out for 32 bit designation with 32 bit post data as those are 64 bit too.

HISTORY of Discussion:
Comment by Christian Szpilfogel (christian) - Thursday, 14 May 2009, 19:51 GMT-7
I should add this is based on the following HOW-TO: http://knoppmyth.net/phpBB2/viewtopic.php?t=19744&sid=a2927ee5f887fabb6fb2a1c3baf939ba

Comment by Christian Szpilfogel (christian) - Thursday, 25 June 2009, 18:33 GMT-7
I note that Jarod has posted an update to lirc that should consolidate the lirc0/lirc1 ports as well as allow the device to be configured as iMon or RC6. I'll check it out and let you know whether we should just go straight to that for this particular request.
-C
Comment by Cecil Watson (cecil) - Thursday, 09 July 2009, 20:33 GMT-7
Thanks Christian. As soon as I hear, I'll work on this issue.
Comment by Christian Szpilfogel (christian) - Friday, 28 August 2009, 19:37 GMT-7
ok. I just tested Jarod's latest work. His 8.6pre1 doesn't compile on 5.5 but the cvs version works fine. It properly creates one lircd.conf file on lirc0 so that is all good and will greatly simplify future work! However the lircd.conf key values have changed so I will need to remap these. I'll try and determine from Jarod which way we should go with this.

Do you care which version of lirc you want to go with? If you go with 0.8.5pre3 (or pre1) then my recipe here will work. If we go with cvs then only a new lircd.conf and the above lircrc are needed.

Comment by Christian Szpilfogel (christian) - Sunday, 30 August 2009, 07:39 GMT-7
Jarod just did a snapshot of cvs as 0.8.6pre2.

I expect Mark will do a pvr-150 patched version before long so once he does that we can roll it in for testing on the next LinHES release after 6.01.00

I've interacted with Jarod to ensure all the lircd.conf codes are consistent for the imon so in the end, the only thing we should need is a single lircrc file for everything imon and Harmony related. The lircd.conf we can pull straight from the lirc package in lirc/remote/imon/lircd.conf.imon-antec-veris.

Comment by Christian Szpilfogel (christian) - Saturday, 09 January 2010, 08:34 GMT-7
ok. I've now tested this with 6.01.

We are best to move forward to 0.8.6 or later although any cvs version after 0.8.6pre2 should work too. This will make a single lirc socket and make these devices (Veris versions of iMon receivers) look like any other receiver.

The two relevant lircd.conf files in the remotes/imon are: lircd.conf.imon-antec-veris – This is for any real iMon based remote using the antec veris modules
lircd.conf.imon-mceusb – This is for versions of antec veris that use an MCE based remote with RC-6 (the remote looks like and is an MCE remote)

These lircd.conf use the standard key naming conventions so they should work with a standard lircrc.

Also note all of the lirc imon based stuff is now 64 bit so if you see a 32 bit config file my bet is it won't work. Just watch out for 32 bit designation with 32 bit post data as those are 64 bit too.

lircd.conf.imon-cjs - imon modified devinput version of lircd.conf (33.2 kB) christian, 02/29/2012 06:27 pm

lircrc - lircrc based on standard labels as derived from standard lircd.conf.devinput (15.5 kB) christian, 02/29/2012 06:27 pm

lcd_15c2_ffdc (3.2 kB) christian, 03/03/2012 09:40 am

mouse_15c2_0043 (3.5 kB) christian, 03/03/2012 09:40 am

mouse_15c2_ffdc (3.5 kB) christian, 03/03/2012 09:40 am

mouseevent_15c2_0043 (3.5 kB) christian, 03/03/2012 09:40 am

mouseevent_15c2_ffdc (3.5 kB) christian, 03/03/2012 09:40 am

remote_15c2_0043 (3.6 kB) christian, 03/03/2012 09:40 am

remote_15c2_ffdc (3.6 kB) christian, 03/03/2012 09:40 am


Related issues

related to LinHES - Feature #599: Upgrade lirc to 0.8.6 for better imon-pad support Closed 01/10/2011
related to LinHES - Feature #652: MCE RC6 iMon IR/LCD support (per Antec Fusion Black 430 (... Closed 03/20/2010

Associated revisions

Revision d0042cc9
Added by brfransen over 12 years ago

runit-scripts: lircd run: add imon cmd; move dvico locations; refs #651

Revision dd232c3e
Added by brfransen over 12 years ago

system-templates: update imon remote; refs #651

Revision de5c9f58
Added by brfransen over 12 years ago

system-templates: remotes: add remote.run; add imon-mce; remove imon-pad; refs #651 refs #821

History

Updated by christian over 14 years ago

Please follow the "UPDATE" area for what we should do in 6.xx

Sorry for the mess. I was just trying to port all the relevant info over.

Updated by jams over 14 years ago

  • Assignee set to cecil

Updated by brfransen about 13 years ago

  • Status changed from New to Feedback

Please try R7.00.03 iso or newer and report back.

Updated by christian over 12 years ago

As of LinHES 7.2 there have been significant changes to the imon based drivers and how they link in. The drivers no longer use /dev/lirc? but instead use "devinput". This also implies that it needs to use the devinput version of lircd.conf which necessitates a change to lircrc to match the new standardized naming conventions.

To link the imon driver to lirc "/etc/sv/lircd/run" should have the following inserted for all imon variants:

/usr/sbin/lircd -r -n --driver devinput -d /dev/input/by-id/usb-15c2_ffdc-event-if00 --output /var/run/lirc/lircd

Note all imon devices have the format of "usb-xxxx-yyyy-event-if00" where xxxx-yyyy is the device id either found in /dev/input/by-id/ or with lsusb.

For example the Antec Fusion Black has "usb-15c2_ffdc-event-if00" and the Veris Basic has "usb-15c2_0043-event-if00".

lsusb example:

Bus 003 Device 002: ID 15c2:0043 SoundGraph Inc.

  • NOTE all of the receivers are actually made by Soundgraph but the remotes are usually labeled iMon.

The imon driver for whatever reason does not map perfectly to the generic devinput variant of lircd.conf. The numbers are off and start at 200. I have attached a modified lircd.conf and lircrc which should work on all imon/Soundgraph based devices. We might want to use these in place of the existing files in MythVantage.

Mythvantage should also have a generic entry to use "devinput" for the remote. The standard lirc.org directory of lircd.conf files has an entry for devinput. An older version is also found in the path "/usr/share/lirc/remotes/devinput/lircd.conf.devinput".

Updated by christian over 12 years ago

After looking at the various udevinfo files I think a udev rule like the following will work:

KERNEL=="event*", SUBSYSTEMS=="rc", ATTRS{idVendor}=="15c2", SYMLINK+="usb/SoundGraph"

Files attached to show the various permutations beween two diffrent imon receiver devices; one with an LCD. Each iMon driver creates 4 nodes: 1 remote, 2 mouse, 1 lcd (if it has an lcd).

If you see a better set of indicators to key on then feel free to create a udev rule that you feel is better.

Updated by christian over 12 years ago

After testing this and understanding how to create a rule that requires attributes from two parents the required udev rulle looks more like:

KERNEL=="event[0-9]*" , SUBSYSTEMS=="rc" , ENV(rc_in_path)="true" 
KERNEL=="event[0-9]*" , ATTRS{idVendor}=="15c2" , ENV(rc_in_path)=="true" , SYMLINK+="SoundGraph"

Updated by christian over 12 years ago

Just looking closer at ENV variables and the variable should have a leading "." to ensure it is not persistent. Probably doesn't matter but will be cleaner.

KERNEL=="event[0-9]*" , SUBSYSTEMS=="rc" , ENV(.rc_in_path)="true" 
KERNEL=="event[0-9]*" , ATTRS{idVendor}=="15c2" , ENV(.rc_in_path)=="true" , SYMLINK+="SoundGraph"

Updated by christian over 12 years ago

The latest changes in the testing repo correctly implement the udev rules and set up lircd.

However the keytables are cleared and not set essentially disabling the receiver. The modern imon devices support both their own imon protocol as well as RC6. The older imon devices were usually hard wired to either imon or RC6. By default the driver will pick the protocol supported by the device and will work correctly through devinput without modification.

It is recommended that we avoid clearing the keytable and active protocols for the imon driver. However it would also be good to add an option to allow the user to switch protocols where desired. So perhaps an alternative implementation would be to have the user choose a receiver type such as "imon" or "imon mce" which correctly configures the keytables and protocols.

for imon, the following ir-keytable command appears to work to set an imon device to its default state (usually imon protocol):

/usr/bin/ir-keytable -c -p lirc -w /etc/rc_keymaps/imon_pad

although it should be selecting "other" instead of lirc making me wonder what the "lirc" option actually does. Adding "other" to /sys/class/rc/rc0/protocols does actually work as expected.

To set the mce variant:

/usr/bin/ir-keytable -c -p RC6 -w /etc/rc_keymaps/imon_mce

There may be a better way using /etc/rc_maps but I have not yet investigated this.

For both protocol variants, the driver issues the same keymaps up to lirc through devinput so a common lircd.conf should be possible.

Updated by brfransen about 12 years ago

  • Assignee changed from cecil to brfransen
  • Category set to Packages: Core
  • Status changed from Feedback to Closed
  • Target version set to 8.0

Also available in: Atom PDF