Find the answer to your Linux question:
Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Linux Device Driver Scull pipe testing error

    Hi Guys

    Actually I am in the learning stage of the Linux Device Driver and learning it from the Orielly Linux device driver 3rd edition.

    I am using it's source code samples with the changes so that it can compile at my linux box.

    I am practicing it in the Ubuntu Lucid Lynx 10.04 iinstalled in the VmWare WorkStation..

    The linux kernel installed on the system is as follows:

    $ uname -r

    $ uname -asvr
    Linux piyush-desktop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

    The problem I am getting is very absurd.

    I have compiled the source code successfullly and also loaded it in the kernel successfully with the following command:

    sudo ./scull.init start

    and unloaded it with the command:

    sudo ./scull.init stop

    I also tested the scull driver with the facts mentioned in the book like this:

    I copied the file present at my Desktop to the scull driver like this :

    sudo cp !/Desktop/file.txt /dev/scull0

    and it get copied successfully as I was able to read the file with the command:

    cat /dev/scull0

    and all the contents are shown there.

    Now the problem is arising when I am trying to test the other scull driver like scullpipe,sculluid,scullwid etc.

    On running this command on the scullpipe I get the following sort of error:

    $ cat /dev/scullpipe0
    cat: /dev/scullpipe0: No such device or address

    The major and minor numbers assignment to the scull driver are as follows:

    ls -al /dev/|grep scull
    crw-r--r-- 1 root root 250, 0 2014-01-01 23:13 scull0
    crw-r--r-- 1 root root 250, 1 2014-01-01 23:13 scull1
    crw-r--r-- 1 root root 250, 2 2014-01-01 23:13 scull2
    crw-r--r-- 1 root root 250, 3 2014-01-01 23:13 scull3
    crw-r--r-- 1 root root 250, 32 2014-01-01 23:13 scullpipe0
    crw-r--r-- 1 root root 250, 33 2014-01-01 23:13 scullpipe1
    crw-r--r-- 1 root root 250, 34 2014-01-01 23:13 scullpipe2
    crw-r--r-- 1 root root 250, 35 2014-01-01 23:13 scullpipe3
    crw-r--r-- 1 root root 250, 16 2014-01-01 23:13 scullpriv
    crw-r--r-- 1 root root 250, 48 2014-01-01 23:13 scullsingle
    crw-r--r-- 1 root root 250, 64 2014-01-01 23:13 sculluid
    crw-r--r-- 1 root root 250, 80 2014-01-01 23:13 scullwuid

    Now I am unable to locate why I am getting this error.

    Please guys help me as I have tried all I knew and left with no more of the ideas.

    So I turned to the forum in order to seek help from you expert people.

    I am here attaching the source code of scull to which I am referring.

    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts