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.
- 05-14-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 9
device driver problem
I try to write a device driver for usb device. However, I use
It cannot print any message in terminal.Code:printk(".....");
Anyone can tell me why? and how can I print the debug message on terminal for device driver?
Thanks!
- 05-14-2008 #2
What language are you using for writing driver for devices?

Cheers!
- 05-14-2008 #3Just Joined!
- Join Date
- May 2008
- Posts
- 9
C language~
- 05-15-2008 #4Linux 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


Reply With Quote
