Find the answer to your Linux question:
Results 1 to 4 of 4
I try to write a device driver for usb device. However, I use Code: printk("....."); It cannot print any message in terminal. Anyone can tell me why? and how can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2008
    Posts
    9

    device driver problem


    I try to write a device driver for usb device. However, I use
    Code:
    printk(".....");
    It cannot print any message in terminal.

    Anyone can tell me why? and how can I print the debug message on terminal for device driver?

    Thanks!

  2. #2
    Linux Newbie bobescalin2005's Avatar
    Join Date
    Oct 2005
    Posts
    167
    What language are you using for writing driver for devices?
    Cheers!
    Registered Linux user #471256
    http://counter.li.org
    Don`t give up so easy...
    calin

  3. #3
    Just Joined!
    Join Date
    May 2008
    Posts
    9
    C language~

  4. #4
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109
    printk doesn't print messages on X Windows. Press Ctrl + Alt + F1 and login to your account. Here you can see printk work.
    If priority of message is less than default console log level then also it is not displayed. You can increase priority by using KERN_ALERT tags in front. eg
    printk(KERN_ALERT "This will be displayed\n");
    All your printk are stored in /var/log/messages even if they are not printed.
    Visit here to know more:-
    https://lwn.net/images/pdf/LDD3/ch04.pdf
    Page 4

Posting Permissions

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