About Device Driver Programming And Socket Programming

This is a discussion on About Device Driver Programming And Socket Programming within the Linux Programming forums, part of the Platform Specific Boards category; Hi !!, I have heard a lot about device driver programming. All I know is that to run a device ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    29

    About Device Driver Programming And Socket Programming

    Hi !!,
    I have heard a lot about device driver programming. All I know is that to run a device like say, a printer or a webcam, there is a software that enables the operating system to communicate with the device. I would like to know how should i go about it.

    Another thing i wanted to know about is Socket Programming. Where could i get more information on it in such a manner as to it could be understood by a newbie ?

    Is there a future in programming for a non-computer science graduate ?

    I would be extremely thankful if someone could answer my doubts .

  2. #2
    Registered User mfc2themax's Avatar
    Join Date
    Aug 2001
    Posts
    346
    >Is there a future in programming for a non-computer science graduate ? <

    Well it really depends on how much you know. A lot of companies require a computer science degree, but if your absolutly fantastic at programming and really know your stuff, then of course there is.
    mfc2themax-Creator of all that is.

  3. #3
    Registered User mfc2themax's Avatar
    Join Date
    Aug 2001
    Posts
    346
    Try a search on google for your other two questions....
    mfc2themax-Creator of all that is.

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    375
    How can device driver programming be made easier than on Linux!!! Here's a driver that will write to your video and say "Hello World!"

    The Source:

    #define MODULE
    #include <linux/module.h>

    int init_module(void)
    {
    printk("<1>Hello World!\n");
    return 0;
    }

    void cleanup_module(void)
    {
    prink("<1>Goodbye Cuel World!\n");
    }


    Save as hello.c
    At Your Root Prompt:

    gcc -c hello.c
    insmod hello.o

    This Compiles and Loads It, Running init_module().
    To Unload Your Module:

    rmmod hello


    Ta Da! The book: Linux Device Drivers by Alessandro Rubini, O'Reilly Press. Wonderful book. You'll be making USB programmable robots in no time.
    Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/

  5. #5
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Wow, that's one hell of a bump, mr. spambot.

    Edit: Spambot bumped the topic, not me.
    Last edited by Dae; 09-01-2009 at 07:01 AM.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  6. #6
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Justin..W View Post
    How can device driver programming be made easier than on Linux!!!
    Sure, but that is not device driver programming. That's just the "hello world" kernel module, used to introduce you to the kernel API, which you need in order to do device driver programming. I've done it a bit (a memory module and a thing for gleaning info from USB devices) and I will warn you now it is not at all easy or simple IMO. Also, there is not enough information to learn it on the web; you will need a book.

    Finally, dealing with the actual hardware itself is a nightmare of guesswork. I set out to write a webcam driver and finally decided it was not worth the effort (especially after one turned up for the camera written by the kernel development team, and it still doesn't work). The "USB Device Class Definition for Video" is 140 pages of language independent specs (mostly data structures), and that is only the beginning. Almost torture.

    However, if you want to see something simpler this is good:
    Writing a Simple USB Driver

    But for a beginner, I would strongly recommend investigating socket programming FIRST.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #7
    Registered User
    Join Date
    Jan 2010
    Posts
    1

    display msg on screen

    Hi

    I am working on device driver programming and i am new to this.
    When i am writing a module i am able to register the device but if i want to print any thing on the screen it is not doing that.
    So can any one suggest what modification i need to make to display msg on screen


    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. socket programming question, closing sockets...
    By ursula in forum Networking/Device Communication
    Replies: 2
    Last Post: 05-31-2009, 05:17 PM
  2. looking for non-MFC based socket programming sample
    By George2 in forum Networking/Device Communication
    Replies: 1
    Last Post: 06-19-2006, 05:57 AM
  3. socket programming in linux
    By crazeinc in forum C Programming
    Replies: 1
    Last Post: 05-27-2005, 07:40 PM
  4. which programming language should be used for socket programming?
    By albert_wong_bmw in forum Networking/Device Communication
    Replies: 8
    Last Post: 06-04-2004, 08:12 PM
  5. socket programming - BEGINNER
    By z3ro in forum Windows Programming
    Replies: 4
    Last Post: 05-02-2003, 03:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21