[ltp] IR (SIR) success!

Tom Grydeland linux-thinkpad@www.bm-soft.com
Mon, 26 Feb 2001 22:35:27 +0100 (MET)


On Mon, 26 Feb 2001, Thomas Hood wrote:

> --- Tom Grydeland <Tom.Grydeland@phys.uit.no> wrote: 
> > Thanks a bundle to Thomas Hood, Till Straumann and Tom Allison for
> > patient explanations!
> 
> I've been learning alot from these discussions too.
> Thanks, guys.
> 
> > What remains:
> >  * Switching the devices around -- having IR on /dev/ttyS0 (4,64) and
> >    the DB9 on /dev/ttyS2 (4,66) or have them use different IRQs.  Not
> >    because it makes a difference, I just want to convince myself that it
> >    can be done.
> 
> Okay, we have a Linux addict on our hands here.

Heh. :-)

I've actually been using Linux since the summer of 1997 -- never really
on the leading edge of anything, but keeping track of many different
things.  Yes, I'm an addict, but that's nothing new.  The reason for all
of this traffic right now is that I'm starting to play with serial ports
for the first time.  It's all quite new, and the Serial-HOWTO seems to
talk more about modems than serial ports, so I really appreciate your
patient feedback, all of you.

My first Linux box was a Digital Multia (alpha/166, 28 MB RAM), salvaged
from the scrap heap when it couldn't run NT quickly enough for one of
our assistant professors, running 2.0.33 from the NT bootloader.  It had
a 300 MB hard drive on which I could just fit RH 4.2 with X (using a
Digital-supplied binary-only X server with hardware acceleration) and
TeX, and I used that to finish writing my MSc thesis.  

I then rescued an old Noname brand laptop (486/100, 16(?)/500 MB,
640x480 @ 8bpp) from dusting down on the shelves of some office -- I
still have the Xircom CE2 ethernet card from that laptop, even though
the laptop itself is long gone.

My next machine was an Apple PowerBook (WallStreet G3/250, 192 MB/6.4 GB,
1024x768@16bpp), brand new (first time a machine was bought for me), and
Linux support for these was just evolving, so I was on the 2.1.12x
series kernels (only time I've been on the devel kernel branch for
extended periods of time.)  For various reasons, I had to get rid of
that (beautiful, beautiful) laptop after a short while, and then
acquired a

HP OmniBook 3000 CTX (P/233 mmx, 32(later 96) MB/4 GB, 1024x768 @ 16 bpp)
<URL:http://xenu.phys.uit.no/~tom/OmniBook3000CTX.html>

And finally, the spring of 1999, I got this *excellent* laptop, the IBM
ThinkPad 600E (PII/300, 128 MB/6.4 GB, 1024x768 @ 8 bpp).  And, I have
to add, this is the best machine of them all.  I really love the stick
mouse (and 3 buttons!), the great keyboard and the handy form factor.

The multia was also great fun, although it was always very limited.

The Noname laptop was crap, though better than no laptop at all.
The keyboard was crappy, the screen was cramped and not too clear, and
it had a trackball mouse that left a lot to be desired.

The PowerBook had some good things going for it -- big, bright screen,
excellent keyboard and it was *really* fast.  The trackpad was also much
better than anythings else I've tried, but having only one mousebutton
was a nuisance.  What I *really* hated was the fact that the caps lock
key was hardwired to generate a keypress event the first time it was
pressed, and then to not generate a keyrelease event until the *next*
time it was released, thus making it absolutely useless for a control
key. Bah. It was also kinda heavy, but I was willing to live with that.

Since then, I've also gotten an ordinary PC desktop.  It was kinda
strange for once to have the very hardware that all this was intended
for originally -- no fussing about with mysterious hardware, everything
just worked.  I used this machine to develop a driver for an ADC board
we've been using in our radar applications.¹

> Somebody help him!

I think I understand what I need to do, I just haven't gotten it to work
yet.  I'll let you know if and how I can do it.

> > I don't understand where 0x2e or 0x2f8 comes from [...]

> 0x2e is the io address of the National Semiconductor
> PC97338 chip's control registers.  (This is where the
> PnP BIOS puts the PC97338 chip.)  By twiddling these
> registers, the addresses of the serial port UARTs 
> (which are on the PC97338 but which are talked to at
> different io addresses) can be changed.  tpctl --rs2
> looks at these registers to find out where serial port
> #2 has been put, viz., 0x3e8.
> 
> The PC97338 chip has two modes, called 'legacy' and
> 'PnP' and there are different configuration registers
> for each mode.  Usually the chip is in PnP mode because
> the BIOS has done PnP configuration to it by the time
> Linux boots.  Consequently the PnP configuration regs
> are the ones to look at; and those are the ones that
> lspnp and tpctl do look at.  The findchip program may
> be looking at the "legacy" configuration registers.

Very well, but can I determine whether the chip is in 'legacy' or 'PnP'
mode?  I usually don't compile my kernels with PnP support, but maybe
that doesn't make any difference?

> >     kernel: nsc-ircc, Wrong chip version ff 
> 
> Hmm.  We need to look into this.

Yeah, I'll be playing around some more as well.

> Thomas

____________________________________________________________
¹ The board is an Ultraview ADDA 1280 DX, which can sample two channels,
12 bits per channel, at up to 40 MHz or one channel at up to 80 MHz, and 
up to 7 TTL lines.  The board also has 2 DA converters.  Ultraview paid
for the development of the driver, and agreed to have it released under
the GPL.  If you're interested in the driver, let me know.

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html