LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2009, 08:42 AM   #1
makphy
LQ Newbie
 
Registered: Aug 2009
Posts: 8

Rep: Reputation: 0
Not able to make node for SPI


Hello,

I am working on phyCORE-iMX31 (ARM11) board. I loaded the driver for SPI (Serial Peripheral Interface)on to the board. I am not able to make node for SPI using
mknod -m777 /dev/spi_0 c 153 0
After the execution of the above statement, the node is being listed in the device list. But using this node in my application code it gives error
spi_0:No such file or directory
Please guide me how to make a node for SPI.

Thanks.
 
Old 10-30-2009, 12:24 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by makphy View Post
After the execution of the above statement, the node is being listed in the device list. But using this node in my application code it gives error
spi_0:No such file or directory
In your application, did you specify /dev/spi_0 or just spi_0?
 
Old 11-01-2009, 09:47 PM   #3
makphy
LQ Newbie
 
Registered: Aug 2009
Posts: 8

Original Poster
Rep: Reputation: 0
I specified it as /dev/spi_0 in my application. After loading the driver for SPI on the board and making node, it is being listed. But while using it's showing "No such device or address". Another problem is that after rebooting the board, the node get removed from the /dev directory.
 
Old 11-02-2009, 12:24 PM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by makphy View Post
"No such device or address".
That's not quite the same message you listed earlier. Do you know if the wording for that message is coming from the OS or your application?

Quote:
Another problem is that after rebooting the board, the node get removed from the /dev directory.
My guess is that is being done by the udev system. But I still haven't gotten familiar with udev. You might try do a search on something like "udev" and "persistent nodes".
 
Old 11-03-2009, 12:59 AM   #5
makphy
LQ Newbie
 
Registered: Aug 2009
Posts: 8

Original Poster
Rep: Reputation: 0
The message "No such device or address" is generated by OS. As per your suggestion I'll look for 'udev' and 'persistent nodes'. But still the main problem is how to made that node working. Later on I'll try to make it permanent.
 
Old 11-04-2009, 04:38 PM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Sorry, I don't know what your problem might be. If the ls -l command shows the node as being a character node with the correct major and minor numbers, then I think the mknod command worked correctly.

This page contains a description of the meaning of the error message (and also explains why I was getting picky about exactly what it said):

Quote:
"No such device or address", ENXIO, means that your attempt got down to the driver, which said no hardware was present. If the device node was missing you would have gotten ENODEV, "No such file or directory".
Which sounds to me like you wouldn't even get that message if the node had not been created properly since you then wouldn't even be able to talk to the driver. That's probably the most help I can give you.
 
  


Reply



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
mysqld node of mysql cluster system not connecting to management node coal-fire-ice Linux - Server 1 07-27-2015 08:33 AM
Linux SPI Framework ananth86coolguy Linux - Newbie 2 09-22-2009 03:07 AM
SPI interface with AT91SAM9261 sunr2007 Linux - Embedded & Single-board computer 0 08-03-2009 03:43 AM
JavaScript:: alert(node) shows null, but node != null taylor_venable Programming 1 05-01-2006 09:51 PM
make proc node in kernel 2.6 hiker04 Linux - Software 4 10-06-2004 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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