[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lirc under linux emulation



Lirc is a frightening beast that breaks many rules of good
programming by writing directly to hardware.  I'm frankly
amazed that it runs under linux directly and would have strong
doubts about it running on another box via emulation.

Read question #4 of the FAQ - it's all about counting time
between the rises of a IR controller.  remote controls use
a 36khz as a carrier.  36,000 blinks per second.  With
data put onto that carrier.  An interrupt for every blink.


There are a number of serial -> IR devices (and IR->serial),
but they are often black boxes that sit between the IR and
your computer.  THEY handle the hits of reading the carrier,
decoding the stream of data, and passing it to the computer.
The good ones can even interpret the data "TV Volume up"
or "DVD skip+" and pass THAT to your computer.

Many people shudder when the look at LIRC.  It's a hack embedded
in the kernel.  It's deeply dependant on the Linux kernel.

Quoting PASTOR Michel (pastor.michel@free.fr):
> Hi,
> 
> 	do you think it's possible to run lircd, the ir daemon
> 		http://www.lirc.org
> 	under linux emulation ?
> 
> 	I tested using current and the lirc rpm (lirc-0.6.5-fr3.i386.rpm)
> 	from freshrpms for RH8 but when i run it i get the folowing msgs:
> 	
> 	[root@fxtest 0 /emul/linux]# sbin/lircd -d /dev/ttyS0
> 	lircd 0.6.6: daemon() failed
> 	lircd 0.6.6: Success
> 	lircd 0.6.6: caught signal
> 
> 	[root@fxtest 0 ~]# uname -a
> 	OpenBSD fxtest.fxnet.fx 3.4 GENERIC#0 i386
> 
> 	checked dmesg reporting no error msgs (attached)
> 
> 	thx for help
> 
> 	ps: thx for that amazing OS and keep up good work
> OpenBSD 3.4-beta (GENERIC) #0: Fri Aug 29 03:52:15 CEST 2003
>     root@fxtest.fxnet.fx:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel Celeron (Mendocino) ("GenuineIntel" 686-class, 128KB L2 cache) 468 MHz
> cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR
> real mem  = 268005376 (261724K)
> avail mem = 242401280 (236720K)
> using 3297 buffers containing 13504512 bytes (13188K) of memory
> mainbus0 (root)
> bios0 at mainbus0: AT/286+(9d) BIOS, date 05/19/00, BIOS32 rev. 0 @ 0xf06c0
> apm0 at bios0: Power Management spec V1.2
> apm0: AC on, battery charge unknown
> pcibios0 at bios0: rev. 2.1 @ 0xf0000/0xf22
> pcibios0: PCI IRQ Routing Table rev. 1.0 @ 0xf0e80/160 (8 entries)
> pcibios0: PCI Interrupt Router at 000:04:0 ("Intel 82371FB PCI-ISA" rev 0x00)
> pcibios0: PCI bus #1 is the last bus
> bios0: ROM list: 0xc0000/0xc000
> pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
> pchb0 at pci0 dev 0 function 0 "Intel 82443BX PCI-AGP" rev 0x03
> ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03
> pci1 at ppb0 bus 1
> vga1 at pci1 dev 0 function 0 "Nvidia GeForce2 GTS" rev 0xa4
> wsdisplay0 at vga1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> pcib0 at pci0 dev 4 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
> pciide0 at pci0 dev 4 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: <IC35L080AVVA07-0>
> wd0: 16-sector PIO, LBA, 78533MB, 16383 cyl, 16 head, 63 sec, 160836480 sectors
> wd1 at pciide0 channel 0 drive 1: <ST3660A>
> wd1: 16-sector PIO, LBA, 520MB, 1057 cyl, 16 head, 63 sec, 1065456 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
> wd1(pciide0:0:1): using PIO mode 0, DMA mode 1
> atapiscsi0 at pciide0 channel 1 drive 1
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, CD-ROM GCR-8520B, 1.00> SCSI0 5/cdrom removable
> cd0(pciide0:1:1): using PIO mode 4, DMA mode 2
> uhci0 at pci0 dev 4 function 2 "Intel 82371AB USB" rev 0x01: irq 5
> usb0 at uhci0: USB revision 1.0
> uhub0 at usb0
> uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> "Intel 82371AB Power Mgmt" rev 0x02 at pci0 dev 4 function 3 not configured
> eap0 at pci0 dev 9 function 0 "Ensoniq AudioPCI97" rev 0x08: irq 5
> ac97: codec id 0x43525913 (Cirrus Logic CS4297A rev 3)
> ac97: codec features headphone, 20 bit DAC, 18 bit ADC, Crystal Semi 3D
> audio0 at eap0
> rl0 at pci0 dev 13 function 0 "Realtek 8139" rev 0x10: irq 5 address 00:50:22:e0:20:4b
> rlphy0 at rl0 phy 0: RTL internal phy
> rl1 at pci0 dev 14 function 0 "Realtek 8139" rev 0x10: irq 10 address 00:50:22:b0:90:98
> rlphy1 at rl1 phy 0: RTL internal phy
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pms0 at pckbc0 (aux slot)
> pckbc0: using irq 12 for aux slot
> wsmouse0 at pms0 mux 0
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: <PC speaker>
> sysbeep0 at pcppi0
> lpt0 at isa0 port 0x378/4 irq 7
> npx0 at isa0 port 0xf0/16: using exception 16
> pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> biomask c060 netmask c460 ttymask d4e2
> pctr: 686-class user-level performance counters enabled
> mtrr: Pentium Pro MTRR support
> dkcsum: wd0 matched BIOS disk 80
> wd1: no disk label
> dkcsum: wd1 matched BIOS disk 81
> root on wd0a
> rootdev=0x0 rrootdev=0x300 rawdev=0x302