LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-28-2008, 07:08 PM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
Slackware 12.1 -- IRDA doesn't work


*** Problem solved by w1k0: to read about the solution jump immediately to ``SIR vs FIR'' post ***


I try to configure IRDA in Slackware 12.1 with generic SMP kernel but without success.

IRDA is enabled in my ThinkPad's BIOS:

Infrared Device -- Enabled
Infrared -- Enabled
Base I/O address -- 2F8
Interrupt -- IRQ 3
DMA -- DMA 3

1. I compiled irda-utils 0.9.18 (with some errors: see below) and gammu 1.20.0 (without errors).

2. I added two lines to /etc/modprobe.conf:

alias tty-ldisk-11 irtty-sir
alias char-major-161 ircomm-tty

3. I loaded one module using command modprobe ircomm_tty.

4. Now I run lsmod | grep ir command and see the result:

ircomm_tty 23944 0
ircomm 14340 1 ircomm_tty
irtty_sir 8960 0
sir_dev 14596 1 irtty_sir
irda 114360 3 ircomm_tty,ircomm,sir_dev
crc_ccitt 5760 2 ppp_async,irda

5. Now I run ls /dev/ir* command and see the result:

/dev/ircomm0
...

6. I binded IRDA stack to IRDA port: irattach /dev/ttyS1 -s.

I'm not sure but that last command seems to work bad -- if i run it and then run the command ps ax | grep irattach it displays nothing.

When I turn on IRDA in my phone (Nokia 6021) and run any gammu command, for example gammu identify, I see the results like:

Error opening device, it doesn't exist.

or:

No response in specified timeout. Probably phone not connected.

This is additional information about compilation and installation of irda-utils...

When I compile irda-utils 0.9.18 in my new Slackware I see a few claims at the end of compiling:

...
[CC] irdadump
[CC] smcinit.c
[CC] smcinit
/usr/lib/gcc/i486-slackware-linux/4.2.3/../../../libpci.a(names.o): In function `pci_load_name_list':
names.c.text+0x46b): undefined reference to `gzopen'
names.c.text+0x4f3): undefined reference to `gzgets'
names.c.text+0x54a): undefined reference to `gzeof'
names.c.text+0x612): undefined reference to `gzclose'
names.c.text+0x783): undefined reference to `gzclose'
names.c.text+0x975): undefined reference to `gzerror'
names.c.text+0x992): undefined reference to `gzclose'
names.c.text+0xa27): undefined reference to `gzopen'
names.c.text+0xaa0): undefined reference to `zError'
collect2: ld returned 1 exit status
make[1]: *** [smcinit] Error 1
make: [all] Error 2 (ignored)

Despite these errors all programs except for smcinit installs well:

[INSTALL] irattach
[INSTALL] irdaping
[INSTALL] etc
[INSTALL] man-pages
[INSTALL] irnetd
[INSTALL] irpsion5
[INSTALL] irkbd
[INSTALL] findchip
[INSTALL] irdadump
[CC] smcinit
/usr/lib/gcc/i486-slackware-linux/4.2.3/../../../libpci.a(names.o): In function `pci_load_name_list':
...

The main difference between Slackware 11.0 (IRDA works) and Slackware 12.1 (IRDA doesn't work) is the lack of irtty module in the latter and empty result of the command ps ax | grep irattach.

My question is: what should I do to compile irda-utils in Slackware 12.1 without errors and how can I run IRDA in it?

Have a nice day...

w1k0

Last edited by w1k0; 06-03-2008 at 03:34 PM. Reason: Problem solved by w1k0
 
Old 05-28-2008, 10:24 PM   #2
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by w1k0
I added two lines to /etc/modprobe.conf:
If you read /etc/modprobe.conf, it'll tell you that it's deprecated. Make a file in /etc/modprobe.d/ that contains these lines (eg. create a file called 'irda' that contains ONLY these two lines) instead.

It is no wonder it's not working if you're receiving errors upon compiling. There is a SlackBuild for irda-utils at slackbuilds.org which should build properly -- use it instead (there are instructions on how to use SlackBuilds at the site). There is even a SlackBuild for gammu there too (and I would suggest using it, since it is known to work).
 
Old 05-29-2008, 05:41 AM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
You're right T3slider I didn't read /etc/modprobe.conf and I didn't know about SlackBuilds at all.

Now -- according to above suggestions -- I moved those two aliases from /etc/modprobe.conf to /etc/modprobe.d/irda and I built and installed gammu and irda-utils using SlackBuilds.

IRDA still doesn't work -- I don't know why.

This is my first experience with 2.6.x kernel. In Slackware 11.0 with kernel 2.4.34 I used successfully modules irda, irtty, and ircomm; commands mknod /dev/ircomm0 c 161 0 and irattach /dev/ttyS1 -s 1; and port = /dev/sda1 and connection = irdaphonet in .gammurc. Because I can't figure out what should I do to configure IRDA with 2.6.24.5-smp kernel in Slackware 12.1, I tried a few commands and configuration settings blindly.

In new Slackware I use six modules:

ircomm_tty 23944 0
ircomm 14340 1 ircomm_tty
irtty_sir 8960 0
sir_dev 14596 1 irtty_sir
irda 114360 3 ircomm_tty,ircomm,sir_dev
crc_ccitt 5760 2 ppp_async,irda

While loading ircomm_tty and ircomm the kernel creates devices /dev/ircomm*.

I tried blindly three commands:

irattach /dev/ttyS1 -s
irattach /dev/tts/1 -s
irattach /dev/ircomm0 -s

For the first and the second the command ps ax | grep irattach gives an empty output. For the third it reports:

8868 ? S 0:00 irattach /dev/ircomm0 -s

The last command puts in /var/log/messages three lines:

irattach: executing: 'echo host > /proc/sys/net/irda/devname'
irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
irattach: Starting device irda0

After the last command I tried blindly .gammurc with five ports:

/dev/sda1
/dev/ttyS1
/dev/tts/1
/dev/ircomm0
/dev/irda0

In all cases the command gammu identify shows the result:

No response in specified timeout. Probably phone not connected.

Could you help me to resolve this problem?
 
Old 05-31-2008, 12:29 PM   #4
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
I suppose the problem concerns /dev/ttyS1 device.

At the beginning I run two commands: modprobe ircomm_tty and irattach /dev/ttyS1 -s.

The command tail /var/log/messages shows:

irattach: Stopping device /dev/ttyS1
irattach: exiting ...

The command dmesg | grep tty shows:

serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a NS16550A
ttyS1: LSR safety check engaged!

I googled the information that the last message ``flagging a buggy UART''.

The command dmesg | grep ircc shows:

nsc-ircc, chip->init
nsc-ircc, Found chip at base=0x02e
nsc-ircc, driver loaded (Dag Brattli)
nsc_ircc_open(), can't get iobase of 0x2f8
nsc-ircc, Found chip at base=0x02e
nsc-ircc, driver loaded (Dag Brattli)
nsc_ircc_open(), can't get iobase of 0x2f8
nsc-ircc 00:0b: disabled

I googled the information that ``it looks like PNP is disabling the IR device''.

The command ps ax | grep irattach gives an empty output.

The command idradump gives an empty output too.

The command setserial -ag /dev/ttyS1 shows:

/dev/ttyS1, Line 1, UART: undefined, Port: 0x02f8, IRQ: 3
Baud_base: 921600, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test auto_irq

I have no idea what to do...

Last edited by w1k0; 05-31-2008 at 01:10 PM. Reason: removed remark
 
Old 06-03-2008, 03:33 PM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
Problem solved by w1k0 -- SIR vs FIR

Finally I resolved the problem. Slackware 12.1. doesn't work with IRDA in SIR mode and you need to use it in FIR mode. That problem is apparently limited to some particular hardware -- I use ThinkPad T41 laptop.

Below is a shortened description of the way I found the solution. If you don't want to read the full story about my researches and would like just to know how to configure IRDA in new Slackware, omit *** Preface *** and *** SIR *** sections and jump immediately to *** FIR *** section.

*** Preface ***

IRDA is enabled in my ThinkPad's BIOS:

Infrared Device -- Enabled
Infrared -- Enabled
Base I/O address -- 2F8
Interrupt -- IRQ 3
DMA -- DMA 3

As I said above I had working implementation of IRDA in Slackware 11.0 running kernel 2.4.34...

# irdadump
xid:cmd 47b864f2 > ffffffff S=6 s=0 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=1 (14)
xid:rsp 47b864f2 < 000066ef S=6 s=0 Nokia 6021 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27)
xid:cmd 47b864f2 > ffffffff S=6 s=2 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=3 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=4 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=5 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=* machine hint=0400 [ Computer ] (21)

...irdadump recognized my mobile phone...

# head ~/.gammurc
[gammu]
port = /dev/sda1
connection = irdaphonet

# gammu identify
Manufacturer : Nokia
Model : 6021 (RM-94)
Firmware : 04.10 B (07-09-05)
Hardware : 4055
IMEI : <cut>
Original IMEI : <cut>
Manufactured : 02/2006
Product code : 0524874
UEM : 400

...and gammu could to identify it.

Now I try to configure IRDA in Slackware 12.1 running kernel 2.6.24.5-smp (generic) on my ThinkPad T41: first in the SIR mode and then in the FIR one.

At the beginning I compiled irda-utils 0.9.18 and gammu 1.20.0 (both from SlackBuilds -- http://slackbuilds.org/).

*** SIR ***

First I tried SIR...

# cat /etc/modprobe.d/irda
alias tty-ldisc-11 irtty-sir
alias char-major-161 ircomm-tty

# modprobe ircomm_tty

# lsmod | grep ir
ircomm_tty 23944 0
ircomm 14340 1 ircomm_tty
irtty_sir 8960 0
sir_dev 14596 1 irtty_sir
irda 114360 3 ircomm_tty,ircomm,sir_dev
crc_ccitt 5760 2 ppp_async,irda

# tail /var/log/messages
kernel: IrCOMM protocol (Dag Brattli)

# irattach /dev/ttyS1 -s

# ps ax | grep irattach
<null output>

...but irattach didn't load the device...

# tail /var/log/syslog
kernel: ttyS1: LSR safety check engaged!
irattach: tcgetattr: Input/output error
irattach: ioctl(SIOCGIFFLAGS): No such device

...because there was some problem with /dev/ttyS1 device...

# tail /var/log/messages
irattach: Stopping device /dev/ttyS1
irattach: exiting ...

...so it was stopped...

# setserial -g /dev/ttyS[0123]
/dev/ttyS0, UART: undefined, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: undefined, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

# setserial -a /dev/ttyS1
/dev/ttyS1, Line 1, UART: undefined, Port: 0x02f8, IRQ: 3
Baud_base: 921600, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test auto_irq

# lspci | grep LPC
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)

...then I turned on IRDA in my mobile phone...

# irdadump
xid:cmd 851e239f > ffffffff S=6 s=0 (14)
xid:cmd 851e239f > ffffffff S=6 s=1 (14)
xid:cmd 851e239f > ffffffff S=6 s=2 (14)
xid:cmd 851e239f > ffffffff S=6 s=3 (14)
xid:cmd 851e239f > ffffffff S=6 s=4 (14)
xid:cmd 851e239f > ffffffff S=6 s=5 (14)
xid:cmd 851e239f > ffffffff S=6 s=* machine hint=0400 [ Computer ] (21)

...but irdadump didn't recognize my mobile -- no wonder, assuming /dev/ttyS1 was stopped.

*** FIR ***

Then I tried FIR...

# cat /etc/modprobe.d/irda
alias tty-ldisc-11 irtty-sir
alias char-major-161 ircomm-tty
options nsc-ircc dongle_id=0x09
alias irda0 nsc-ircc

# setserial /dev/ttyS1 uart none

# tail /var/log/syslog
kernel: ttyS1: LSR safety check engaged!

# modprobe ircomm_tty

# modprobe nsc-ircc io=0x2f8 irq=3 dma=3

# lsmod | grep ir
nsc_ircc 19344 0
ircomm_tty 23944 0
ircomm 14340 1 ircomm_tty
irtty_sir 8960 0
sir_dev 14596 1 irtty_sir
irda 114360 4 nsc_ircc,ircomm_tty,ircomm,sir_dev
crc_ccitt 5760 2 ppp_async,irda

# tail /var/log/messages
kernel: nsc-ircc 00:0b: activated
kernel: nsc-ircc, chip->init
kernel: nsc-ircc, Found chip at base=0x02e
kernel: nsc-ircc, driver loaded (Dag Brattli)
kernel: IrDA: Registered device irda0
kernel: nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500

# irattach irda0 -s

# ps ax | grep irattach
3375 ? S 0:00 irattach irda0 -s

...irattach was loaded for irda0 device...

# tail /var/log/messages
irattach: executing: '/sbin/modprobe irda0'
irattach: executing: 'echo machine > /proc/sys/net/irda/devname'
irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
irattach: Starting device irda0

...then I turned on IRDA in my mobile phone...

# irdadump
xid:cmd 13e228f8 > ffffffff S=6 s=0 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=1 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=2 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=3 (14)
xid:rsp 13e228f8 < 000076bb S=6 s=3 Nokia 6021 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27)
xid:cmd 13e228f8 > ffffffff S=6 s=4 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=5 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=* machine hint=0400 [ Computer ]

...and irdadump recognized my mobile phone..

# head ~/.gammurc
[gammu]
port = /dev/ircomm0
connection = irda

# gammu identify
Function not supported by phone.

...but gammu couldn't to communicate with it...

# cat /proc/sys/net/irda/max_baud_rate
16000000

# echo 115200 > /proc/sys/net/irda/max_baud_rate

...so I lowered the transfer speed...

# gammu identify
Manufacturer : Nokia
Model : 6021 (RM-94)
Firmware : 04.10 B (07-09-05)
Hardware : 4055
IMEI : <cut>
Original IMEI : <cut>
Manufactured : 02/2006
Product code : 0524874
UEM : 400

...and finally everything works good.

I hope my experience with Slackware 12.1 and IRDA will be useful for the other users.

Last edited by w1k0; 11-01-2008 at 04:05 PM. Reason: update
 
Old 09-10-2008, 10:07 AM   #6
carlitoco
Member
 
Registered: Jan 2008
Location: Berlin
Distribution: Slackware / Arch / Unix
Posts: 144

Rep: Reputation: 16
Thanks @ all

It works! On slackware 12.1 IBM T30
 
  


Reply

Tags
fir, irda, slackware



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I have my universal remote control to work with my irda receiver HGeneAnthony Linux - General 3 02-03-2008 09:10 PM
Make IrDA work... ptosiani Debian 0 06-19-2007 10:10 AM
USB IRDA will not work oneandoneis2 Linux - Hardware 9 06-15-2006 06:06 PM
Is IRDA supported in Slackware 10.2? Swift&Smart Slackware 5 03-05-2006 11:29 PM
IRDA modem does work, but pppd can't use it (it hangs when sending AT commands) motyl Linux - Hardware 1 04-30-2004 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration