Can't add serial ports beyond /dev/ttyS3 with setserial. Why?
PuppyThis forum is for the discussion of Puppy Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.