[tlinux-users:07513] Re: Infrarred and remote control

x <[email protected]>
Newsgroups gmane.linux.hardware.toshiba
Message-ID <[email protected]>
Manuel--
 
 --- Bradley Whittington <[email protected]>
wrote: 
> You should try getting irda going, it is a bit more
> flexible, and gave me
> some clues.

Maybe so, but can you achieve the same goal with it
(rc of apps) ?

 
> unfortunately lirc is completely broken in
> ubuntu:breezy, so i only got as
> far as reading the raw signals from the tty with
> ircapture (or something
> like that)
> 
> a wide range of support
> On Wed 2005-11-23 (14:49), Manuel Lpez-Ibez wrote:
> > Thanks for your mail. Actually I don't need to see
> the signals from the 
> > remote. I can test the remote with the tv and it
> works. Moreover, some 
> > nice people have made a database of almost all
> existing remotes [1] and 
> > the one I have is there with all the info about
> which signal is 
> > generated by each button.

Didn't find mine, unfortunately...
 
> > My problem is that the laptop IR port (the
> receiver) doesn't show any 
> > activity. As I explained in the first mail, I've
> tried several kernel 
> > modules without noticeable success. Perhaps the
> modules are ok but there 
> > is something else to be done. I simply don't know.
> > 
> > Anyway, thanks for your mail. And please tell me
> if you have any other 
> > suggestion or comment.
> > 
> > Cheers,
> > 
> > 	Manuel.
> > 
> > 
> > [1] http://lirc.sourceforge.net/remotes/
> > 
> > 
> > Johnson, Ken (TCMC) wrote:
> > >Although I don't have any experience or advice to
> offer I do believe what
> > >you are asking about is possible.  After all
> people have made their Palm
> > >Pilot into a universal remote and the laptop is
> made to send and receive IR
> > >signals.  I don't think there is any "magic" to
> this, you're just looking
> > >for what needs to be configured for the
> applications to connect to the IR 
> > >or
> > >serial ports.
> > >
> > >I can offer this - some video cameras pick up the
> IR spectrum and when
> > >hooked to a TV it will let you SEE the IR signals
> (flashes) from the 
> > >remote.
> > >This may help you determine the signals you are
> trying to associate with
> > >xmms commands and such.
> > >
> > >Please keep us informed of any progress you make
> with this.  
> > >
> > >
> > >-----Original Message-----
> > >From: Manuel López-Ibáñez
> [mailto:[email protected]] 
> > >Sent: Wednesday, November 23, 2005 4:13 AM
> > >To: [email protected]
> > >Subject: [tlinux-users:07469] Re: Infrarred and
> remote control
> > >
> > >You got it!
> > >
> > >I noticed that some Linux applications (xmms,
> mplayer, amarok)
 
and also vlc
 
> have 
> > >plugins for infrared remote control. And there is
> a infrared port in my 
> > >Toshiba laptop. So, can the signal from a remote
> control of a tv (of 
> > >Toshiba, by the way) be received by the laptop
> and used by those 
> > >applications? I have no idea. It may even be
> impossible (for example, 
> > >signals are incompatible for some reason).
> However, if this is possible 
> > >it will be really cool for presentations, watch
> videos, listen music...

Sure so!


> > >If you buy a tv card with remote control or
> construct a custom serial IR 
> > >port, you can already do those things in Linux
> (or so the LIRC webpage 
> > >says). My question is, can I use the IR port of
> the laptop to receive 
> > >the signal from a remote control?
> > >
> > >if I find more I will tell you.
> > >
> > >
> > >Cesar Santamaria V. wrote:
> > >
> > >>I wasnt even able to get scared, because most of
> the things I didnt
> > >>understood them LOL.  
> > >>So the main point is to make the IR port of the
> laptop been able to
> > >>receive the signal of the remote.  Are you
> willing to switch channels on
> > >>digital tv or something like that?  Or the
> multimedia settings(volume,
> > >>play, stop)?  Im almost sure I can't help you;
> but Im really curious
> > >>about your ideas.
> > >>
> > >>Regards,
> > >>	Cesar.
> > >>
> > >>On Tue, 2005-11-22 at 21:31 +0000, Manuel
> López-Ibáñez wrote:
> > >>
> > >>
> > >>>Did I scare you with my email? Come on, say
> something!
> > >>>
> > >>>Cheers,
> > >>>	Manuel.
> > >>>
> > >>>
> > >>>Manuel López-Ibáñez wrote:
> > >>>
> > >>>
> > >>>>Hi,
> > >>>>
> > >>>>I was just wondering. Is it possible to use
> the infra-red port of a 
> > >>>>Toshiba Satellite Pro (M10) to receive the
> signal of a television 
> > >>>>remote control. Do I need a special remote
> control? Do I need a special 
> > >>>>infra-red receiver?  Wouldn't be cool to
> control music/video with the 
> > >>>>remote control?
> > >>>>
> > >>>>So far, I obtained the info for the IR port of
> the laptop[1]. I also 
> > >>>>have the information for the remote
> control[2]. First I tried
> > >
> > >lirc_sir[4].

I got following messages while compiling:

You will have to use the lirc_sir kernel module.

******************************************"
lirc_sir.c:53:2: warning: #warning " Your serial port
driver is compiled into "
lirc_sir.c:54:2: warning: #warning " the kernel. You
will have to release the "
lirc_sir.c:55:2: warning: #warning " port you want to
use for LIRC with:      "
lirc_sir.c:56:2: warning: #warning "    setserial
/dev/ttySx uart none        "
lirc_sir.c:57:2: warning: #warning
 
 "******************************************"
 
root@slackware:~# setserial -v /dev/ttyS0 uart none
/dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4

(Doesn't seem to survive a reboot...)

root@slackware:~# modprobe  -v lirc_sir
/sbin/insmod /lib/modules/2.4.20/misc/lirc_dev.o
Using /lib/modules/2.4.20/misc/lirc_dev.o
Symbol version prefix ''
/sbin/insmod /lib/modules/2.4.20/misc/lirc_sir.o
Using /lib/modules/2.4.20/misc/lirc_sir.o

/var/log/messages says:
Dec  1 19:43:06 slackware kernel: lirc_sir: I/O port
0x03f8, IRQ 4.
Dec  1 19:43:06 slackware kernel: lirc_sir: Installed.
/var/log/syslog says:
Dec  1 19:43:06 slackware kernel: lirc_dev: IR Remote
Control driver registered, at major 61 
Dec  1 19:43:06 slackware kernel: lirc_dev:
lirc_register_plugin: sample_rate: 0

kinfocenter-->I/O Ports gets a new entry: 03f8-03ff
lirc_sir

> > >>>>$ modprobe lirc_sir irq=3 io=0x2f8
> > >>>>lirc_dev: IR Remote Control driver registered,
> at major 61
> > >>>>lirc_dev: lirc_register_plugin: sample_rate: 0
> > >>>>lirc_sir: I/O port 0x02f8, IRQ 3.
> > >>>>lirc_sir: Installed.
> > >>>>
> > >>>>
> > >>>>It creates a new device /dev/lirc/0.
 
Strange, I get
root@slackware:~# ls -Fal /dev/lirc*
crw-r--r--    1 root     root      61,   0 Nov 24
15:06 /dev/lirc
srw-r--r--    1 root     root            0 Nov 28
05:55 /dev/lircd=
prw-r--r--    1 root     root            0 Nov 24
09:57 /dev/lircm|

Maybe we did ./configure differently ???
 
> However,
> I don't get anything from 
> > >>>>"mode2 -d /dev/lirc/0" when I press buttons on
> the remote control.
 
I get this:
root@slackware:~# mode2 -d /dev/lirc
space 16777176
pulse 455
space 2670
pulse 520
space 527
pulse 521
etc.etc.....

Seems to work without daemon, but maybe you try first
root@slackware:~# lircd -n -D9
lircd 0.7.2: started server socket
lircd 0.7.2: could not open config file
'/etc/lircd.conf'
lircd 0.7.2: No such file or directory
lircd 0.7.2: lircd(sir) ready
(-n not to fork to background, so if it incidentally
dies,
you'll notice!)

xmode2 instead gives a nice graph (type oscilloscope)

Note: First three times with pressing first button of
rc
system froze completely (this has since disappeared),
so, to reduce damage it might be best not to do this
in wm
and not to have unnecessary apps & files open!!!
 
> So 
> > >>>>maybe I needed to initialise the chip using
> smcinit[1].
> > >>>>
> > >>>>[root@localhost ~]# smcinit -v
> > >>>>smcinit 0.4
> > >>>>
> > >>>>Default-Values for Satellite Pro M10:
> > >>>>SIR ioport: 0x2f8
> > >>>>FIR ioport: 0x130
> > >>>>FIR interupt: 3
> > >>>>FIR DMA: 1
> > >>>>
> > >>>>Detected IO hub vendor id: 0x8086
> > >>>>Detected IO hub device id: 0x24cc
> > >>>>Detected Chip id: 0x5a
> > >>>>
> > >>>>SIR ioport register      write: 0xbe     read:
> 0xbe
> > >>>>FIR interrupt register   write: 0x3      read:
> 0x3
> > >>>>FIR ioport register      write: 0x26     read:
> 0x26
> > >>>>FIR dma register         write: 0x1      read:
> 0x1
> > >>>>
> > >>>>Initialisation of the SMC 47Nxxx succeded
> > >>>>
> > >>>>
> > >>>>
> > >>>>That looks fine.
 
smc-init wouldn't work for me

> However, when I load lirc_sir
> still I can't get 
> > >>>>anything from /dev/lirc/0.
> > >>>>
> > >>>>Then, I tried with:
> > >>>>
> > >>>>$ modprobe smsc-ircc2 ircc_cfg=0x5a ircc_dma=1
> ircc_fir=0x130 
> > >>>>ircc_irq=3 ircc_sir=0x2f8

I didn't find such a module, instead I foud:
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz:
root@slackware:~# modprobe -v smc-ircc
/sbin/insmod
/lib/modules/2.4.20/kernel/net/irda/irda.o.gz
Using /lib/modules/2.4.20/kernel/net/irda/irda.o.gz
Symbol version prefix ''
/sbin/insmod
/lib/modules/2.4.20/kernel/drivers/net/irda/irport.o.gz
Using
/lib/modules/2.4.20/kernel/drivers/net/irda/irport.o.gz
/sbin/insmod
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz
Using
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz:
init_module: No such device
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz:
Hint: insmod errors can be caused by incorrect module
parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the
output from dmesg
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz:
insmod
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz
failed
# delete irport
# delete irda
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz:
insmod smc-ircc failed
:-(
/var/log/messages says:
Dec  1 20:58:18 slackware kernel: found SMC SuperIO
Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
Dec  1 20:58:18 slackware kernel: SMC IrDA Controller
found
/var/log/syslog says:
Dec  1 20:58:18 slackware kernel:  IrCC version 2.0,
firport 0x7f8, sirport 0x3f8 dma=1, irq=4
However, I try again and voilà:
root@slackware:~# modprobe -v smc-ircc
/sbin/insmod
/lib/modules/2.4.20/kernel/net/irda/irda.o.gz
Using /lib/modules/2.4.20/kernel/net/irda/irda.o.gz
Symbol version prefix ''
/sbin/insmod
/lib/modules/2.4.20/kernel/drivers/net/irda/irport.o.gz
Using
/lib/modules/2.4.20/kernel/drivers/net/irda/irport.o.gz
/sbin/insmod
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz
Using
/lib/modules/2.4.20/kernel/drivers/net/irda/smc-ircc.o.gz
/var/log/messages says:
Dec  1 20:59:52 slackware kernel: found SMC SuperIO
Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
Dec  1 20:59:52 slackware kernel: SMC IrDA Controller
found
Dec  1 20:59:52 slackware kernel: IrDA: Registered
device irda0
Dec  1 20:59:52 slackware /etc/hotplug/net.agent:
assuming irda0 is already up
kinfocenter-->I/O Ports gets 2 new entries: 03f8-03ff
irport/07f8-07ff smc-ircc
Seems to me we have a problem here:
root@slackware:~# ls -Fal /dev/ir*
/bin/ls: /dev/ir*: No such file or directory
(though I have installed irda-utils)
Maybe I have to create irda-dev(s)? No idea how.

> > >>>>
> > >>>>in /var/log/messages I get:
> > >>>>
> > >>>>Nov 20 01:53:05 localhost kernel:  Overriding
> FIR address 0x0130
> > >>>>Nov 20 01:53:05 localhost kernel:  Overriding
> SIR address 0x02f8
> > >>>>Nov 20 01:53:05 localhost kernel: SMsC IrDA
> Controller found
> > >>>>Nov 20 01:53:05 localhost kernel:  IrCC
> version 2.0, firport 0x130, 
> > >>>>sirport 0x2f8 dma=1, irq=3
> > >>>>Nov 20 01:53:05 localhost kernel: No
> transceiver found. Defaulting to 
> > >>>>Fast pin select
> > >>>>Nov 20 01:53:05 localhost kernel: IrDA:
> Registered device irda0
> > >>>>Nov 20 01:53:06 localhost hal.dev[10944]:
> DEVNAME is not set
> > >>>>
> > >>>>
> > >>>>
> > >>>>(The hal.dev error is strange).
> > >>>>
> > >>>>I was not able to find any additional device
> to look. Also, I cannot 
> > >>>>load both lirc_sir and smsc-ircc2:
> > >>>>
> > >>>>FATAL: Error inserting lirc_sir 
> >
>
>>>>(/lib/modules/2.6.12-12mdk-i686-up-4GB/kernel/3rdparty/lirc/drivers/lirc_
> > >
> > >sir/lirc_sir.ko.gz): 
> > >
> > >>>>Device or resource busy
> > >>>>FATAL: Error running install command for
> lirc_sir
> > >>>>[root@localhost]# dmesg | tail
> > >>>>IrCC version 2.0, firport 0x130, sirport 0x2f8
> dma=1, irq=3
> > >>>>No transceiver found. Defaulting to Fast pin
> select
> > >>>>IrDA: Registered device irda0
> > >>>>lirc_dev: lirc_register_plugin: sample_rate: 0
> > >>>>lirc_sir: i/o port 0x02f8 already in use.

Most probably they try to use same I/O port!!!

> > >>>>
> > >>>>
> > >>>>So this is all I have been able to get so far.
> This subject seems to be 
> > >>>>quite complex in Linux, what is a shame
> because it seems to have a lot 
> > >>>>of potential benefits. In general, I am
> confused between IrDA and LIRC

As far as I understood when you want to use lirc, you
only
modprobe lirc_sir (which has been configured when
compiling), but no other module plus you run lircd.

For irda you modprobe your irda-specific module (where
smc-init might be called to help).
Still though, I haven't understood about devs in irda.
 
> > >>>>and the Linux-InfraRed-HOWTO[3] just adds more
> confusion to the subject.
> > >>>>
> > >>>>There are some people that seem to have more
> luck than me [3][5][6]. 
> > >>>>Although they don't talk about using a normal
> television remote 
> > >>>>control. I don't even know if this is possible
> at all. Maybe I am just 
> > >>>>trying something that doesn't make sense.
> > >>>>
> > >>>>Any comments/suggestions/feedback?
> > >>>>
> > >>>>The Toshiba people are also allowed to provide
> help and information; 
> > >>>>after all I will have to buy a new laptop soon
> and I have heard that
> > >>>>Dell[7] and HP[8] laptops are very compatible
> with Linux...
> > >>>>
> > >>>>Thanks in advance,
> > >>>>
> > >>>>  Manuel.
> > >>>>
> > >>>>
> > >>>>[1] http://irda.sourceforge.net/smcinit/
> > >>>>[2] http://lirc.sourceforge.net/remotes/
> > >>>>[3]
> http://tuxmobil.org/howto_linux_infrared.html
> > >>>>[4]
>
http://gauss.dartmouth.edu/~genovese/satellite_1410-801.html#LIRC
> > >>>>[5]
>
http://valis.rpg.pl/~young/projekciki/toshiba-2450.shtml#irda
> > >>>>[6]
> http://www.mandrake.tips.4.free.fr/lirc.html
> > >>>>
> > >>>>[7]
> > >
> >
>
>http://linux.slashdot.org/linux/05/09/17/1539212.shtml?tid=147&tid=184
> > >
> > >>>>[8]
> http://www.heise.de/english/newsticker/news/58780

Yet another interesting related link:
http://www.develia.org/documents.php?l=2&f=1&p=lirclivedrive

That's about what I got so far, next step to do would
be 
config-stuff (as I didn't find config-file for my rc)
;-(

BTW, tosh is a Sat 1900-101

Wish you best,

ursus

P.S: On lirc-site I found I found also those apps:
     xirw,xrc,lircrc_config(!), which in opposite
     to lirc just didn't want to compile (for reasons
unknown
     to me) in slackware 9.0 (2.4.20-kernel).
     If anybody happens to know about binaries, pls
let me know!!!
     


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.