Serial port not working in 10.10
Goran Hasse
gorhas at gmail.com
Sat Dec 18 09:32:59 UTC 2010
2010/12/18 Tom H <tomh0665 at gmail.com>
> On Sat, Dec 18, 2010 at 3:56 AM, Goran Hasse <gorhas at gmail.com> wrote:
> > 2010/12/18 Tom H <tomh0665 at gmail.com>
> >> On Sat, Dec 18, 2010 at 1:53 AM, Goran Hasse <gorhas at gmail.com> wrote:
> >>>
> >>> My serial port /dev/ttyS0 is not working in Ubuntu 10.10.
> >>
> >> Have you created an upstart job for it?
> >
> > This is connected hardware and should not need a upstart job!
> >
> > I have tried all kinds of serial-modules (witch should it bee?) and both
> > minicom and cu (connect unix) without success. So I think it is a device
> > driver problem...
>
> Pre-upstart, you had to have a line like "T0:23:respawn:/sbin/getty -L
> ttyS0 9600 vt100" in "/etc/inittab" to use a serial console. You now
> need an upstart job.
I don't understand why. If the device driver is in the kernel or the
correct module is loaded the device node /dev/ttyS0 is a entry
to the device driver. So if I make open("/dev/ttyS0",...) I should be
able to write bytes to the serial port.
I have tried to manipulate the all kinds of flags in the termios struct
like
if ( ( fd = open( port , O_RDWR | O_NONBLOCK | O_NOCTTY | O_SYNC )) < 0 ) {
printf("FEL\n");
exit(1);
}
tcgetattr( fd , &term );
term.c_cflag = CS8;
term.c_cflag |= CREAD ;
term.c_cflag |= CLOCAL ;
term.c_lflag &= ~(ECHO | ICANON );
But no bytes on the pinns... So there must be a secrett with the device
driver...
Note: This works with Knoppix and FreeBSD so there is no problem with the
hardware.
GH
--
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
--
gorhas at gmail.com
Göran Hasse
Boo 229
715 91 ODENSBACKEN
Mob: 070-5530148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20101218/af613a9a/attachment.html>
More information about the ubuntu-users
mailing list