Search code examples
clinuxlinux-kerneluart

device file open failed in linux system


I am working in omap4 based system. It has 4 UART port so kernel makes:

/dev/ttyO0
/dev/ttyO1
/dev/ttyO2
/dev/ttyO3

When I open from user space:

fd = open("/dev/ttyO1",O_RDONLY)

it succesfully open and i can peform read and write with that.

But when I open:

fd = open("/dev/ttyO3",O_RDONLY)

Its failed.

I am able to see /dev/ttyO3 node in my system still why i am not able to open it? Any idea?


Solution

  • i have given permission to that node and now i can open that node

    chmod 0606 /dev/ttyO3