[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [microblaze-uclinux] Why does open("/dev/ttyS0",...) fail in my user app?



Hi,
I think your hint leads me on the right track although I don't look through
what you mean.
This is what proc/tty/drivers says:
/proc/tty> cat drivers
pty_slave            /dev/ttyp       3   0-255 pty:slave
pty_master           /dev/pty        2   0-255 pty:master
/dev/console         /dev/console    5       1 system:console
/dev/tty             /dev/tty        5       0 system:/dev/tty
serial               /dev/cua        5   64-65 serial:callout
serial               /dev/ttyS       4   64-65 serial

But it says nothing to me. :)
(Note, that this list above was only possible as I didn't deactivate the
console. In my desired kernel I have deactivated it.)
It seems to me I must use another string as first parameter in my call the
function open() but which one?

Cheers
F@lk

> -----Original Message-----
> From: owner-microblaze-uclinux@itee.uq.edu.au
> [mailto:owner-microblaze-uclinux@itee.uq.edu.au]On Behalf Of Wouter
> Wiggers
> Sent: Wednesday, July 13, 2005 2:36 PM
> To: microblaze-uclinux@itee.uq.edu.au
> Subject: Re: [microblaze-uclinux] Why does open("/dev/ttyS0",...) fail
> in my user app?
> 
> 
> Hi,
> 
> i think you have to make sure there is a driver associated 
> with the tty's major
> number. You can look whether there is such a driver loaded 
> somewhere in
> /proc/drivers (if i am correct) .
> 
> If there is not you should add a driver during kernel compile 
> time by selecting
> it from the options in menuconfig or make your own driver.
> 
> Someone correct me if i'm wrong, Wouter
> 
> Quoting Brettschneider Falk <fbrettschneider@baumeroptronic.de>:
> 
> > Hi,
> >
> > Following the hint of John Williams I think now I prevent 
> > the blocking of
> > the serial port by the ucLinux console as I commented out 
> > the code lines in
> > function "void xmbrs_console_init(void)" of file
> > uclinux_dist/linux_2.4.x/arch/microblaze/kernel/xmbserial.c 
> > and recompiled
> > the kernel.
> >
> > But anyway, this posix code in my user app still fails with 
> > return value 0.
> > 	int fd = open("/dev/ttyS0", O_RDWR | O_ASYNC, 0666);
> >
> > Any idea?
> >
> > Mit freundlichen Grüßen / Best regards
> >
> > Falk Brettschneider
> > ___________________________________
> >
> >   Dipl.-Inform. Falk Brettschneider
> >   Softwareentwickler / Software Developer
> >   Baumer Optronic GmbH
> >   http://www.baumeroptronic.de

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/