Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: mb on December 19, 2011, 08:09:33 PM

Title: lirc / irda-utils
Post by: mb on December 19, 2011, 08:09:33 PM
I am trying to get a laptop to accept commands from a remote control via its integrated irda port. I believe i will need irattach, which i think is in 'irda-utils'. I found a .tcl which seems to be for v1.x of TCL. Is this likely to work with 4.1? ..if so, how do i install a .tcl ? Or is irattach part of anoter tcz? If not, what alternative am I looking at?
Title: Re: lirc / irda-utils
Post by: gerald_clark on December 19, 2011, 08:45:13 PM
Tcls are not supported. Stick to the 4.x repos.
Title: Re: lirc / irda-utils
Post by: Juanito on December 19, 2011, 10:34:36 PM
I imagine you could loop mount:

http://distro.ibiblio.org/tinycorelinux/tcz/irda-utils.tczl (http://distro.ibiblio.org/tinycorelinux/tcz/irda-utils.tczl)

and make your own private extension to use irattach.

I stopped maintaining irda-utils as I retired the only machine I had with an irda port..
Title: Re: lirc / irda-utils
Post by: curaga on December 20, 2011, 07:01:05 AM
I thought CIR (consumer IR, remote control) did not use IRDA?

I seem to recall that an irda port could not receive CIR signals.
Title: Re: lirc / irda-utils
Post by: mb on December 20, 2011, 04:09:28 PM
It can, although it doesn't have a very good range (<1m).. I've done it on another distro before. Used the sir mode.
Title: Re: lirc / irda-utils
Post by: mb on December 20, 2011, 08:36:54 PM
I imagine you could loop mount:

http://distro.ibiblio.org/tinycorelinux/tcz/irda-utils.tczl (http://distro.ibiblio.org/tinycorelinux/tcz/irda-utils.tczl)

and make your own private extension to use irattach
Could you elaborate, or point me toward a guide or something, please?
Title: Re: lirc / irda-utils
Post by: Juanito on December 20, 2011, 10:28:13 PM
Code: [Select]
$ mkdir /tmp/download
$ mkdir /tmp/image
$ mkdir /tmp/pkg
$ cd /tmp/download
$ wget -c http://distro.ibiblio.org/tinycorelinux/tcz/irda-utils.tczl
$ sudo mount -o loop irda-utils.tczl /tmp/image
$ sudo cp -rp /tmp/image/usr /tmp/pkg
$ cd /tmp
$ sudo mksquashfs pkg/ irda-utils.tcz
$ sudo chown tc:staff irda-utils.tcz
$ sudo umount -d /tmp/image
$ cp irda-utils.tcz /path-to-safe-place

You need the extension squashfs-tools-4.x for this
Title: Re: lirc / irda-utils
Post by: mb on December 24, 2011, 01:47:04 PM
Thanks very much for that Juanito.

I'm having a few problems getting things to work.. [after running irattach ok] there is nothing related to lirc in /dev, which causes mode2 to complain.. 'modprobe lirc_sir' returns 'not found in modules.dep'.. but there is a lirc_sir.ko in /usr/local/lib/modules/2.6.33.3-tinycore/kernel/lirc/ , and another within /tmp. Do i need to re-build the kernel.. or is there a different way of loading modules in tinycore?... or what ??

[fwiw; i tried installing irda-3.0.3-tinycore.tcz, which made no difference]
Title: Re: lirc / irda-utils
Post by: Juanito on December 24, 2011, 03:36:03 PM
Ah - OK, I thought you were just looking for irattach.

The modules will not work in tc-4 because that uses the 3.0.3 kernel and they are for 2.6.33.3
Title: Re: lirc / irda-utils
Post by: mb on December 24, 2011, 04:10:41 PM
OK so what would you suggest as the best course of action?
Title: Re: lirc / irda-utils
Post by: Juanito on December 25, 2011, 12:53:19 AM
I'd say lirc shouldn't be in the 4.x repo with modules from 2.6.33.3-tinycore in it, so maybe the best is to pm the maintainer and request an update.

Failing that, you could try an update yourself?
Title: Re: lirc / irda-utils
Post by: mb on December 26, 2011, 08:06:24 AM
So would i basically have to follow creating extensions guide  (http://wiki.tinycorelinux.net/wiki:creating_extensions)from the wiki? or ??
Title: Re: lirc / irda-utils
Post by: Juanito on December 26, 2011, 08:14:15 AM
That would be a good place to start  :)
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 26, 2011, 09:36:42 AM
OK so what would you suggest as the best course of action?
If it is allowed I can send you my upgraded lirc.tcz... See http://forum.tinycorelinux.net/index.php/topic,12134.0.html (http://forum.tinycorelinux.net/index.php/topic,12134.0.html)

If not, I can post here my  'step-by-step to compile lirc 0.9.0'.   ;)
Title: Re: lirc / irda-utils
Post by: mb on December 26, 2011, 01:12:40 PM
I can't see how anyone would have a problem with that..
Title: Re: lirc / irda-utils
Post by: Rich on December 26, 2011, 01:21:42 PM
Hi mb
Quote
If it is allowed I can send you my upgraded lirc.tcz..
Quote
I can't see how anyone would have a problem with that..
It's OK for you to PM AmatCoder with your email address so that he can send it to you.
What is not allowed is posting extensions or binaries (executable files) to the forum.
AmatCoder is free to submit it to the repository if he feels it's stable enough for testing.
Title: Re: lirc / irda-utils
Post by: mb on December 26, 2011, 01:37:51 PM
ok well perhaps you could upload it to mediafire or something and PM me a link please AmatCoder. Perhaps also submit it to the repository if you are up for it.

It would be nice to allow attachments that expire (say after a week, or 5 downloads) on the forums.. its a bit of an annoying extra step.
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 26, 2011, 02:01:12 PM
ok well perhaps you could upload it to mediafire or something and PM me a link please AmatCoder.
Done.

AmatCoder is free to submit it to the repository if he feels it's stable enough for testing.
I'm waiting for a response from the extension maintainer as stated here: http://forum.tinycorelinux.net/index.php/topic,5287.0.html (http://forum.tinycorelinux.net/index.php/topic,5287.0.html)
Title: Re: lirc / irda-utils
Post by: Rich on December 26, 2011, 02:14:31 PM
Give it a couple of days. In addition to accepting new additions to the repository, Jason maintains
well over 300 extensions of his own, some of which he may still be in the process of migrating
to the 4.x repository.
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 26, 2011, 02:35:06 PM
Oh, I'm talking about extension maker (Thomas Genty) who made 0.8.7 for 3.x. From link above:

"When updating an extension originally made by someone else, one needs to contact the original extension maker with the intention to update or fix it."

I have not an answer so I have not sent the file to Jason yet.
Title: Re: lirc / irda-utils
Post by: Rich on December 26, 2011, 02:46:28 PM
Hi AmatCoder
Sorry about that, I misunderstood. Had I reread a few posts back I would have realized what you
were referring to.

Title: Re: lirc / irda-utils
Post by: mb on December 26, 2011, 07:39:15 PM
Thanks again AmatCoder, although i am still having problems.

I deleted the lirc* from .../tce/optional, and installed the one provided, however, 'ls /dev/li*' still comes up blank.. and the associated problems mentioned before. modprobe lirc_sir still returns the same, too. i tried running tce-load -i again on lirc.tcz, but it just told me it was already installed. lirc is also in my onboot.lst
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 27, 2011, 09:09:02 AM
Yes, start-up script is not provided, you need do it yourself... Example:
Code: [Select]
sudo mkdir /var/run/lirc
sudo ln -s /var/run/lirc/lircd /dev/lirc
sudo lircd -n -H [yourdriver] -d [yourdevice] [yourlircd.conf]

You don't need modprobing lirc_sir. It's included in kernel since 2.6.38.
Title: Re: lirc / irda-utils
Post by: mb on December 28, 2011, 01:40:43 PM
Still not there yet..
if i include '-H lirc_sir' or '-H sir' in the startup script i'm told 'no such driver'.. if i omit the -H flag it doesn't complain.. until i run mode2 which returns 'WARNING: Failed to initialize hardware' and doesn't react to remote commands.

I would normally have ran the included setup.sh which would configure the irq/address and all the rest.. but i'm not sure how i should be doing that here?? ..
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 28, 2011, 02:54:22 PM
Please paste here output from:
Code: [Select]
modinfo lirc_sir
Code: [Select]
dmesg | tail
Code: [Select]
lsmod | grep ir
Title: Re: lirc / irda-utils
Post by: mb on December 28, 2011, 03:13:00 PM
thanks for the help...
Quote from: modinfo lirc_sir
filename:       lirc_sir
Quote from: dmesg | tail
found SMC SuperIO Chip (devid=0x7a rev=00 base=0x002e): LPC47N227
smsc_superio_flat(): fir: 0x230, sir: 0x3f8, dma: 01, irq: 4, mode: 0x0e
smsc_ircc_present: can't get sir_base of 0x3f8
intel_rng: Firmware space is locked read-only. If you can't or
intel_rng: don't want to disable this in firmware setup, and if
intel_rng: you are certain that your system has a functional
intel_rng: RNG, try using the 'no_fwh_detect' option.
EXT4-fs (sda3): warning: maximal mount count reached, running e2fsck is recommended
EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
lib80211_crypt: registered algorithm 'TKIP'
Quote from: modinfo lirc_sir
irtty_sir              12288  2
sir_dev                16384  1 irtty_sir
firewire_ohci          24576  0
firewire_core          32768  1 firewire_ohci
irda                   65536  1 sir_dev
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 28, 2011, 03:35:17 PM
lirc_sir does not seems loaded...
Do you load irda-3.0.3-tinycore.tcz? Remember that it is incompatible with lirc_sir module...
Title: Re: lirc / irda-utils
Post by: mb on December 28, 2011, 04:11:49 PM
yes, you are correct. now;


modinfo lirc_sir hasn't changed..

dmesg | tail;
intel8x0: clocking to 48000
firewire_core: created device fw0: GUID 00023f4453001a99, S400
ACPI: EC: GPE storm detected, transactions will use polling mode
intel_rng: Firmware space is locked read-only. If you can't or
intel_rng: don't want to disable this in firmware setup, and if
intel_rng: you are certain that your system has a functional
intel_rng: RNG, try using the 'no_fwh_detect' option.
EXT4-fs (sda3): warning: maximal mount count reached, running e2fsck is recommended
EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
lib80211_crypt: registered algorithm 'TKIP'


lsmod | grep ir;
firewire_ohci          24576  0
firewire_core          32768  1 firewire_ohci

e: i'm not quite sure if my device in the lirc command is meant to be /dev/ttyS0 or /dev/lirc ..
wth the first - mode2;
mode2: could not get file information for /dev/lirc
mode2: default_init(): No such file or directory

or with /dev/lirc it says accepted new device, but shows nothing when i shoot the remote at the irda port.
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 28, 2011, 04:31:40 PM
I need complete dmesg output. Please attach it here.
Title: Re: lirc / irda-utils
Post by: mb on December 28, 2011, 04:44:38 PM
ok, here we are..
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 28, 2011, 05:58:47 PM
Yes, lirc_sir is missing.
I send you a PM with lirc_modules-3.0.3-tinycore.tcz extension compiled by me. Load it and try:
Code: [Select]
sudo modprobe lirc_dev
sudo modprobe lirc_sir
Title: Re: lirc / irda-utils
Post by: mb on December 28, 2011, 06:28:21 PM
Thanks again..  modprobe returns nothing in both cases.
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 28, 2011, 06:38:04 PM
But is it working?

dmseg should return something like:
Code: [Select]
lirc_dev: IR Remote Control driver registered, major 61
lirc_dev: lirc_register_driver: sample_rate: 0
lirc_sir: I/O port 0x03e8, IRQ 4.
lirc_sir: Installed.
Title: Re: lirc / irda-utils
Post by: mb on December 28, 2011, 06:53:16 PM
yes i think so;
dmesg | grep lirc
lirc_dev: IR Remote Control driver registered, major 250
platform lirc_dev.0: lirc_dev: driver lirc_sir registered at minor = 0
lirc_sir: I/O port 0x03e8, IRQ 4.
lirc_sir: Installed.

i still can't use -H (lirc_)sir with lircd, and 'mode2' still doesn't return anything.. but i'm connecting via ssh so i'll have to see if that is the same with a display connected- which i'll do shortly.
Title: Re: lirc / irda-utils
Post by: mb on December 28, 2011, 08:54:36 PM
no difference with display.
Title: Re: lirc / irda-utils
Post by: AmatCoder on December 29, 2011, 11:49:26 AM
i still can't use -H (lirc_)sir with lircd, and 'mode2' still doesn't return anything..
Your driver should be 'default'. See:
http://www.lirc.org/html/table.html#@hw-irda (http://www.lirc.org/html/table.html#@hw-irda)

Summarizing, it should work with:
Code: [Select]
tce-load -i lirc-modules-3.0.3-tinycore
tce-load -i lirc
modprobe lirc_sir                            <- it may need 'modprobe lirc_dev' before and/or irda-modules after...
install -d /var/run/lirc
ln -s /var/run/lirc/lircd /dev/lirc          <- some distros use /dev/lircd (?)
lircd -H default -d /dev/lirc0
mode2

If not, try reading this:
http://www.thinkwiki.org/wiki/How_to_make_use_of_IrDA#LIRC_and_IrDA (http://www.thinkwiki.org/wiki/How_to_make_use_of_IrDA#LIRC_and_IrDA)

Particularly 'Configuring lirc_sir' chapter...