Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
the project I'm doing needs a lot of serial ports. I have 2 on the motherboard, but they were used up very fast. I got a 6 serial port pci card to use, totaling at 8 serial ports. all I knew about the card was that it supports linux. I go into the readme files on the drivers cd and it says "Since Linux only support 4 serial ports (ttyS0, ttyS1, ttyS2, ttyS3) under the default condition." okay.. how do I change that in linux? I need all 8 ports available, not just the first 4. I'm currently running fedora 7 on my development machine, but I might be using centos for the final server setup. any help would be great. I've been searching, but not finding what I'm looking for. I may be searching with the wrong keywords.
I disabled the on board serial ports to simplify things a bit more. I'm not sure if linux enables them again on it's own, but either way, I have ttyS0 ttyS1 ttyS2 ttyS3 . tty isn't a directory so I can't go in it. I'm not sure what it is on this system. if all of the serial ports were working, there should be 6 of them, plus the 2 on board that are disabled. is there a setting in the kernel for this or something? to allow more then 4 ports?
I have a simple program I wrote in c to send commands to a serial port. it was working well with the onboard ports, but now that I disabled those and only have the card installed, it's failing to open ports. I have tried the setserial command, but I'm still learning a lot with linux. not sure what I could be doing wrong, but something's not right.
looks like it sees only 4 ports. there has to be a setting someplace or a patch or kernel module to allow the other 4 ports to work.
[root@localhost ~]# cat /var/log/dmesg | grep ttyS
0000:02:0c.0: ttyS0 at I/O 0xdff0 (irq = 9) is a 16550A
0000:02:0c.0: ttyS1 at I/O 0xdfe0 (irq = 9) is a 16550A
0000:02:0c.0: ttyS2 at I/O 0xdfa8 (irq = 9) is a 16550A
0000:02:0c.0: ttyS3 at I/O 0xdfa0 (irq = 9) is a 16550A
this is the command I tried:
mknod /dev/ttyS4 -m 666 c 4 64
it looks like it created it under /dev and my c program can open the port and write to it without errors, but I'm still not getting any output out of the physical port. I don't understand what the major and minor numbers are for. 4 and 64? is that what they should be to point to the right hardware?
ttyS[0-3] are character devices for the serial terminal lines.
They are typically created by:
mknod -m 660 /dev/ttyS0 c 4 64 # base address 0x3f8
mknod -m 660 /dev/ttyS1 c 4 65 # base address 0x2f8
mknod -m 660 /dev/ttyS2 c 4 66 # base address 0x3e8
mknod -m 660 /dev/ttyS3 c 4 67 # base address 0x2e8
chown root:tty /dev/ttyS[0-3]
The "major" number is always 4 for ttyS devices.
For ttyS serial ports the minor number is: 64 + port number.
so you need to use 68, 69, 70 & 71 when adding the additional ports
MAKEDEV may be easier to use than mknod
centos found the serial card and installed all 8 ports, including the 2 on the motherboard I'm guessing. I haven't tried the motherboard 2 lately, but the ports on the card aren't giving any errors when I open them or send data to them, but the device I'm using has a led on it that turns on or off when it gets a command, and it's not working yet. the device has to run at 9600 baud rate. I think that might be where the problem is. maybe this card gets it's settings differently or something. I still don't understand c completely yet, but I'll keep working at it. tomorrow I'll try connecting the ports on the card to my windows computer and see if I can get any signals with the hyperterminal.