LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 11-17-2008, 10:13 PM   #1
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Rep: Reputation: 15
Can't add serial ports beyond /dev/ttyS3 with setserial. Why?


I have a need to add additional serial ports. The PC I'm using has four ports on the cpu and Puppy finds them all and initializes them correctly.

I have added an 8 port card to the PC and created /dev/ttyS4-ttyS11 using mknod.
I programmed the serial card to use the addresses in I/O locations 0x0208 through 0x0240 without a problem. I can prove the serial ports work by using a simple C program I wrote that tests the ports loopback function and they all work.

I then tried to use setserial to set the I/O addresses and IRQ settings to my defined values but all I get is a "no such device or address" error. I know the hardware is good; I know the devices are in the /dev directory and are correct; I know the correct I/O addresses are being provided to setserial. It just doesn't happen to work.

Is there a limit to how many ports can be installed in Puppy? I read another website based on a different distro that stated the kernel needs to know how many ports are installed but there wasn't any detail on how to do that. Is there a setting somewhere that needs to be revised?

Any ideas?

I appreciate any input on this.
 
Old 11-18-2008, 03:33 PM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
The source is coded to default to ttyS0 .. ttyS3. Try booting with the parameter 8250.nr_uarts=6.

Oh damn - just looked at the source - 'nr_uarts' may not exceed SERIAL_8250_NR_UARTS which is fixed at compile time. Setting 'nr_uarts' to a higher number at runtime may result in out of bounds conditions (I can't find the code which checks the runtime nr_uarts value - maybe there is some, but I don't have time to look more).

SO:
1. Set your kernel configuration for SERIAL_8250_NR_UARTS to the maximum # of 8250 compatible UARTS you will install.
2. Edit the asm/serial.h file (whatever that may point to) - go right to the end and you will see the structure which sets the default port parameters for your serial ports.

Yes, yes, it's all very primitive and horrible, but no one seems to have time to make thing better.
 
Old 11-20-2008, 08:35 AM   #3
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pinniped View Post
The source is coded to default to ttyS0 .. ttyS3. Try booting with the parameter 8250.nr_uarts=6.

Oh damn - just looked at the source - 'nr_uarts' may not exceed SERIAL_8250_NR_UARTS which is fixed at compile time. Setting 'nr_uarts' to a higher number at runtime may result in out of bounds conditions (I can't find the code which checks the runtime nr_uarts value - maybe there is some, but I don't have time to look more).

SO:
1. Set your kernel configuration for SERIAL_8250_NR_UARTS to the maximum # of 8250 compatible UARTS you will install.
2. Edit the asm/serial.h file (whatever that may point to) - go right to the end and you will see the structure which sets the default port parameters for your serial ports.

Yes, yes, it's all very primitive and horrible, but no one seems to have time to make thing better.
Thanks for the heads up. I guess it's time to delve deep into the innards of the kernel. Once again, I'm a little disappointed...in myself for not figuring this out for myself sooner.
 
Old 11-25-2008, 03:37 PM   #4
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
Serial works but X now locks up. What do I do now?

OK, I have recompiled the kernel and sure enough the serial ports work. I then tried to get a live cd with this new kernel. That was hard to do.

I now have a live cd that works on two machines just fine. The problem is that the third machine is the one where I really need puppy 4.1 to work! On that machine, once X starts all I get is a gray screen (no wallpaper) and the menu bar at the bottom. No icons, nothing. I can try the menu button and it will expand but I cannot run anything.

After about a minute the machine locks up. I don't have any clue as to how to troubleshoot this.

Ironically, I copied vmlinuz, initrd.gz and the /lib/modules directories to a thumbdrive that had puppy 4.1 standard on it. It not only boots but runs perfectly. How can I get this version onto a live cd? I thought I could use isomaster to read in puppy 4.1 seamonkey iso file and then substitute the new kernel files listed above and create it that way but isomaster gives me a 'Size of no emulation boot record visible on image must be divisible by 4 so i can do a checksum (invalid boot file?)' error.

I then tried to make a copy of the puppy 4.1 seamonkey iso just to see what I did wrong. It gives the same error. That can't be right because I created a live cd from it. That's how I got this far.

I really need some help from the gurus.
Thanks for reading this,
Tex
 
Old 11-25-2008, 05:46 PM   #5
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Could you copy your last post and post to a new thread? Although we could try to answer you in this thread, that would just be rude and would defeat the purpose of having threads.
 
  


Reply



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
Multi serial card, setserial cannot set serial hua Linux - Hardware 1 06-11-2008 04:59 AM
more then 4 serial ports mattsoftnet Linux - Hardware 15 09-23-2007 08:44 AM
Can only use one of my serial ports steaktc Linux - Hardware 1 11-23-2005 06:07 AM
Setserial cannot get serial information Kara Programming 0 05-27-2004 05:53 PM
setserial /dev/ttyS4 (settings) bmike1 Linux - Software 1 08-07-2003 04:07 PM

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

All times are GMT -5. The time now is 09:11 PM.

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