Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

i am trying to write a device driver for my gps module. somehow the linux os when loaded to my arm board have /dev directory read only. when i try to do a "vi /dev/gps" it says file is read only.

due to this reason my application program can't open the /dev/gps.

Anybody know what is the problem here. May be i am too vague.

share|improve this question

migrated from electronics.stackexchange.com Apr 4 '11 at 12:20

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

2  
You are doing this as root, right? What is the output of mount? –  Faheem Mitha Apr 4 '11 at 15:37
    
Have you mounted devfs yet? Do you run a with a read-only root filesystem? Why on earth are you trying to run an editor on the device file? –  Gilles Apr 4 '11 at 18:42
1  
You can't run a text editor against a character device. You might be able to run it against a block device like /dev/fd0 as I have done in the past, but that will read in the whole block device (floppy in this case) into memory and the text editor may still have issues reading/writing. For a character device, try using cat to monitor it's output. That works with my GPS. –  penguin359 Apr 6 '11 at 4:07
1  
Also, post the output of id, ls -l /dev/gps, and ls -lL /dev/gps if you can. –  penguin359 Apr 6 '11 at 4:09

1 Answer 1

Running ls -l /dev/gps will show you the actual permissions on the device file (probably not read-only).

Seeing as this is in fact a device file, you won't be able to open it in a text editor (for obvious reasons).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.