/etc/init.d/lirc requires TRANSMITTER_DEVICE to be set in hardware.conf

Bug #204769 reported by Andrew Barbaccia
4
Affects Status Importance Assigned to Milestone
lirc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Currently /etc/init.d/lirc requires TRANSMITTER_DEVICE to be set by hand (or during debconf) to load the transmitter's daemon. Additionally, if a remote is being used in conjunction with a transmitter, REMOTE_DEVICE needs to be set as well to have both daemons load properly.

There are two approaches to fix this problem:

1. Modify debconf for lirc.
TRANSMITTER_DEVICE and REMOTE_DEVICE will vary depending on the order in which the modules are loaded. Currently the modules are loaded Remote, Transmitter (from /etc/init.d/lirc). If this remains the case, REMOTE_DEVICE should be /dev/lirc0 (if being used) while TRANSMITTER_DEVICE should be /dev/lirc0 (if no remote is being used) or /dev/lirc1 (if a remote is being used).

2. Modify /etc/init.d/lirc
The same logic described above can be used to "guess" the values of REMOTE_DEVICE and TRANSMITTER_DEVICE if they are not set. This may be the easier fix to apply because it only would require some additional bash scripting.

Anybody with a recommendation on "best practices" here? I will gladly modify the init script and post a diff if I know it is going to be used.

Revision history for this message
Andrew Barbaccia (andrew-barbaccia) wrote :

Another note:

If TRANSMITTER_DEVICE is set, REMOTE_DEVICE also needs to be set since the init script will not attempt to guess REMOTE_DEVICE if more than one device is being loaded.

Revision history for this message
Nick Fox (nickj-fox) wrote :

Are you suggesting this done by default on install? What about user not using transmitters?

Revision history for this message
Andrew Barbaccia (andrew-barbaccia) wrote : Re: [Bug 204769] Re: /etc/init.d/lirc requires TRANSMITTER_DEVICE to be set in hardware.conf

This should probably be done in debconf in postinst after transmitter and
receiver options are choose.

On 3/21/08, Nick Fox <email address hidden> wrote:
>
> Are you suggesting this done by default on install? What about user not
> using transmitters?
>
>
> --
> /etc/init.d/lirc requires TRANSMITTER_DEVICE to be set in hardware.conf
> https://bugs.launchpad.net/bugs/204769
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Andrew Barbaccia
MonolithMC Sales & Support
(631) 865 - 1025

Revision history for this message
Mario Limonciello (superm1) wrote :

I prefer the solution here to be debconf. There is some logic already in place for how this happens, but it clearly isn't complete. Would you mind posting an example that you are running into difficulties with this in it's current state? Or is this more of a hypothetical just looking to fix problems before they arise sort of thing?

Changed in lirc:
status: New → Incomplete
Revision history for this message
Andrew Barbaccia (andrew-barbaccia) wrote :

Here are two scenarios:

1. Remote: Streamzap
2. Transmitter: Serial IR Blaster
3. debconf defaults

TRANSMITTER_DEVICE and REMOTE_DEVICE are not set. Because TRANSMITTER_DEVICE
is not set, the lircd does not load for the transmitter.

1. Remote: Streamzap
2. Transmitter: Serial IR Blaster
3. debconf defaults + manually set TRANSMITTER_DEVICE to /dev/lirc1 (since
it is loaded 2nd)

Since TRANSMITTER_DEVICE is now set, lirc init script refuses to "guess" the
REMOTE_DEVICE. First instance of lircd is not loaded. Since REMOTE_DEVICE is
not set, lircd for transmitter device refuses to load.

Needed changes to debconf logic:

1. Always set TRANSMITTER_DEVICE since we never try to guess.
2a. Always set REMOTE_DEVICE and remove "guess" logic from lirc init script.
2b. Only set REMOTE_DEVICE when TRANSMITTER_DEVICE is set.

This should allow both instances of lircd to start.

On Mon, Mar 24, 2008 at 2:18 AM, Mario Limonciello <email address hidden>
wrote:

> I prefer the solution here to be debconf. There is some logic already
> in place for how this happens, but it clearly isn't complete. Would you
> mind posting an example that you are running into difficulties with this
> in it's current state? Or is this more of a hypothetical just looking
> to fix problems before they arise sort of thing?
>
> ** Changed in: lirc (Ubuntu)
> Status: New => Incomplete
>
> --
> /etc/init.d/lirc requires TRANSMITTER_DEVICE to be set in hardware.conf
> https://bugs.launchpad.net/bugs/204769
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Andrew Barbaccia
MonolithMC Sales & Support
(631) 865 - 1025

Revision history for this message
Mario Limonciello (superm1) wrote :

Andrew would you take a stab at updating this logic?

Changed in lirc:
status: Incomplete → Triaged
Revision history for this message
Alec Leamas (leamas-alec) wrote :

Closing as fixed, since release 0.9.4c does not use sysV scripts or hardware.conf.

Changed in lirc (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.