Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-27-2013, 02:25 AM   #1
Registered: Nov 2012
Location: SF Bay Area
Posts: 47

Rep: Reputation: Disabled
can't open a spi device in /dev

I manually insmod spidev(device driver) and spi_bcm2708(controller driver) successfully.
In "/proc/devices" shows the spi major number is 153, I did"mknod /dev/spidev0.0 c 153 0". Trying to test whether I can open the device,which points to spidev module.

I write a simple test program to try to open the deivice, however it failed, the file descriptor is less than 0

Any people know why I can't open a device ?

#include <stdio.h>

#define device "spidev0.0"

void main(int argc,char **argv)
int fd = open(device,argv);



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to open audio device (/dev/dsp): No such device stevesk Slackware 6 01-01-2009 07:29 AM
cdrecord: No such device. Cannot open '/dev/pg0'. Cannot open SCSI driver. hnshashi Linux - Newbie 3 08-14-2008 02:54 AM
startx --> (EE) xf86OpenSerial: Cannot open device /dev/input/mice No such device. TB2 Linux - Software 2 04-04-2007 06:11 PM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 09:46 PM
loop: can't open device /dev/loop0: No such device or address miaviator278 Linux - Security 3 06-09-2004 10:24 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration