Kernel :: Write A USB Device Driver?
Jul 9, 2010
Quote:
Originally Posted by anishakaul
When you copy paste the Makefile from post 7, make sure you delete the spaces shown in RED below by Backspace key and then press TAB
Code:
obj-m += hello.o
all:
........make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
........make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
how to write a device driver for USB
View 9 Replies
ADVERTISEMENT
Apr 6, 2010
If I were asked to write a linux device driver for a pen, How should I start?
View 4 Replies
View Related
Oct 11, 2010
I know, I know..."How long is a piece of string"?
I have one of these devices:
[URL]
Of course, it's Windows only, and XP only at that. However, the data that needs transferred between the device and the computer should be fairly basic, unless it offloads a lot of processing to the computer. I'm not a programmer, nor do I play one on TV, but I have written some fairly complicated microcontroller programs and some basic Java GUIs. Besides writing the actual code, how hard is it to do whatever needs done to make a Linux device driver, apart from the code to make the device work?
View 2 Replies
View Related
Mar 3, 2010
If I were asked to write a linux device driver for a pen, How should I start???
View 5 Replies
View Related
Nov 25, 2009
i have some basic knowledge about device drivers.can any one tell how to write drivers for virtual modem, Actually my project is to implement communication between the two PCs by using two virtual modems. so for that i need to write the code for the virtual modem which it should understand all the AT commands exactly as physical modem and it should send/receive call and SMS.
View 1 Replies
View Related
Nov 10, 2010
I am writing a device driver on x86 machine,Ubuntu distribution,kernel version 2.6.35.I want to debug my driver in kernel mode.I tried KGDB(Kernel Level Source Debugger).But support is given for kernel version 2.6.13.But I want to make KGDB work on version 2.6.35.Could anyone help me where can I get help to make KGDB work on 2.6.35 version?Or is there any other method to debug my driver using some other tool?
View 1 Replies
View Related
Apr 27, 2011
i am trying learn to program linux kernel modules and smoothly transition in device driver programming. I have a year and a half worth of programming in C and have been using linux for years!! But my question is how do i compile a module? I got as far as coding it but am stuck as of now.
View 2 Replies
View Related
Sep 19, 2009
I am currently using fedora 11 kernel 2.6.29 version, i wanted to write device driver for usb to detect my own device. My project is radio with computer. My fm radio get connected to usb port so i need to write h/w interfacing program.
View 1 Replies
View Related
Nov 10, 2010
The error "USB device 6 (vend/prod 0x603/0xf2) is not claimed by any active driver." is in dmesg every time I connect my Logitech keyboard to my system. I also tried (all with the same error):
- Memory stick
- DVD-burner
- Compaq mouse
View 3 Replies
View Related
Jan 4, 2011
df -h [URL] I did the following command to find everything is in /usr or /var, then tracked it down to /usr/lib and /usr/share as the main offenders, but out of all the directories none are more than 1mb or so.
du -sh /* | sort -gr | head -n 5
I tried to uninstall firefox, which is what got me in this mess in the first place, the log claims it will remove ~240 mb but failes on a "E: Write error - write (28 No space left on device)" [URL] If I could juggle something onto an external hard drive so I can uninstall firefox I would be out of the wood. Failing that I believe a new install is in order.
View 1 Replies
View Related
Jul 28, 2010
I have installed live cd on usb pendrive. Everything works great. How can I find out which device driver it is using? Where are the device driver files stored? How do you specify the device driver when mounting a device?
View 3 Replies
View Related
May 30, 2010
Is there a way to log on which time my system writes data to a specific (mounted) device? I have to know what an how much my system writes.
View 1 Replies
View Related
Apr 13, 2011
I need programmer a timer of 10 ms for read/write a USB device
View 4 Replies
View Related
Jul 4, 2010
my problem is on installing nvidia driver on fc12 32bit but, first of all, as i understood the pae kernel requires more than 4gb of ram,i have a 2.2 ghz cpu with 2 gb ram,but when i run command:uname -r it answers: 2.6.31.5-127.PAE [i have fc12 32 bit] when we try to download linux we have a 32bit edition or 64bit edition,do we have an edition which is only for pae? or when we install for example the 32bit edition on a computer with more than 4gb of ram then the kernel automatically will change to be a pae kernel??
View 10 Replies
View Related
Aug 30, 2010
I'm attempting to install the driver for my atheros AR8131 PCI-E Gigabit Ethernet adapter (in my Lenovo laptop) on my newly installed RHEL5 system (it's not currently being recognized).
I tried using: 'make install' but hit an error "Makefile:61: *** Linux kernel source not found."
After this, I tried: 'sudo yum install kernel-devel kernel-headers'
To rectify this, but hit this error "No package kernel-devel available" (and the same for the headers). What should I do?
View 5 Replies
View Related
Aug 31, 2010
I write the network driver. Transmission of packets in user space I do through netlink socket`s. In user space there is a handling of packets and their transmission on other device (however, it isn't important).
Problem in that any time, packets through the driver in system, and is reverse, are transferred normally. But then there comes the moment when the kernel crash. If to look in syslog it seems to me that comes deadlock. Also I think that it is related with netlink socket`s.
I can't find the information on that anywhere how correctly to use netlink socket`s in kernel space. Can at you will any a reason into the account of synchronization of sockets and the driver in kernel space?
I can give the driver code if it is necessary.
View 2 Replies
View Related
Nov 24, 2010
With the recent upgrade kernel, my ATI driver can no longer work. After upgrading to the new kernel, upon reboot I would get stuck at the "checking battery status" and can't boot into kubuntu.
I'm running Kubuntu 10.10 64 on intel i5 with radeon hd 4870.
So I thought I messed something up since I was fooling around with conky script the day before. I did a clean install of kubuntu 10.10 64 and reset all my settings and my files. At this point, everything works smoothly and I can reboot multiple times without a problem.
I proceeded to install the Radeon catalyst driver following the documentation, which worked perfectly for me on the previous kernel. After rebooting, I can no longer get pass the "checking battery state" black screen. I had to boot into safe book, uninstall all fglrx and also delete xorg.conf to be able to boot back in normally.
View 5 Replies
View Related
Nov 11, 2010
I recently added a SS drive and after 2 hours it went into read only and busy mode. The machine see the drive as does tools like fdisk, fsck, qtparted, kde partition manager but I can't reset the device to make it write-able Do I need to RMA the device (it's 12 hours old) or is there a method to make the device usable again?
View 4 Replies
View Related
Jul 7, 2011
I am trying to write to a Ramdisk because I suffer from terrible IO speeds on my VPS. It uses openVZ and I run a Centos 5 distro.
So i created my ramdisk with '/bin/mount -t tmpfs -o size=1G,nr_inodes=10k,mode=0775,noatime,nodiratime tmpfs /tmp'
but whenever I try and copy files to it, it just spams me with 'no space left on device even though there is!
Here is the output of df:
/dev/simfs 157286400 6511452 150774948 5% /
none 16441412 4 16441408 1% /dev
tmpfs 5242880 1296 5241584 1% /disk/test
tmpfs 5242880 1296 5241584 1% /disk/test
[Code]....
View 1 Replies
View Related
Mar 4, 2011
I need to change a filename but when I boot up I get the message root device is read-only. Is there a way of changing this so that I can change the filename. I have a Mac Pro running Leopard OSX. The graphics card an NVIDIA 7500GT or driver has failed. It was suggested elsewhere that I change the relevant kext files to filename.kext.old, which I did, now when I try to boot start in OSX I get a message in various languages telling me to restart. I have tried booting in safe mode and from original Installation CD. In Safe Mode I get the same multi language splash screen, from CD I still have the graphic card problem, screen freezes and artifacts appear. So I boot up straight into CLI by holding down CMD-S hoping to be able to change filenames back but it says device read-only.
View 2 Replies
View Related
Nov 1, 2010
I have a write call to a ttyACM serial device that blocks after several hundreds bytes are written.I'm writing in ~25 byte chunks, so I have 5-8 successful writes, then the next write blocks forever.I can bypass the blocked call using select, but I can never call write again without closing and re-opening the port.
The serial port is opened correctly because I can read from it just fine. Write permissions are correct, and it's opened RW.The code is likely correct because I tested the same code using the same device on a pure RS-232 serial port, and it worked fine - no block. Is there anything to know about the linux ACM module?It's my understanding that write calls basically shouldn't block.They're supposed to return -1 if there's an error.
View 1 Replies
View Related
Jul 4, 2010
I'm writing a C program that reads the boot sector of a USB disk. (it is mounted as /dev/sda1). I'm able to read the sector, by the calls code...
The problem is when I wish to write. I use the call:
bytesWrite = write(fd, buf, 512)
The 'write' returns the value of 512, which looks as if the write was successful, yet
when I read again the /dev/sda1 device, I see that no writing was actually made.
Can anybody tell me what do I need to do in order to allow an actual write to the
device?
View 2 Replies
View Related
Dec 1, 2010
I am final year MCA student. I like to do my project in Linux. I know a little in C. I am pursuing RHCE certification. I am using rhel5. I am interested to write linux device drivers and willing to do my project in that.
View 9 Replies
View Related
Oct 1, 2010
I installed the latest kernel liquorix (2.6.35) but when i want to install the Nvidia driver downloaded on the Nvidia website (256.53), i have an error message because Nvidia doesn't found the kernel source tree.
I install linux-image-2.6.35-6.dmz.2-liquorix-686_2.6.35-16_i386.deb, linux-headers-2.6.35-6.dmz.2-liquorix-686_2.6.35-16_i386.deb and build-essential. I don't understand why the installation doesn't works.
View 1 Replies
View Related
Jul 30, 2011
My wife is purchasing a netbook with no internal CD/DVD writing device, so we plan to purchase an external CD/DVD USB-2.0 read/write device. Our local PC shop has the following 3 external USB-2.0 DVD read/write devices:
(a) Samsung DVD-Burner SE-S084F/RSBS [not listed on Samsung site - too old ? ]
(b) LG DVD-Burner GE24NU21 USB2.0 [not listed on LG site - too old ? ]
(c) Super-Multi Portable DVD Rewrite (GP10 Lite USB2.0 Slimline) GP10NB20 (mentions Mac OS/X support, which is encouraging)
None of those are listed in the openSUSE HCL. Has anyone successfully used any of these with GNU/Linux (my google surfing on this revealed no GNU/Linux complaint nor any success stories) ? Or is there another such external USB-2.0 read/write DVD burner device that is recommended ?
View 2 Replies
View Related
Jul 15, 2010
I can browse the iso image easily enough with a loopback mount, but when it comes to mounting the actual CD (which I did first), I get:
Code:
$ sudo mount -t udf,iso9660 /dev/dvd /mnt/dvd
mount: block device /dev/dvd is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/dvd,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
/var/log/messages isn't very helpful, either:
Code:
Jul 15 15:15:56 bkorb-dt kernel: attempt to access beyond end of device
Jul 15 15:15:56 bkorb-dt kernel: sr0: rw=0, want=68, limit=4
Jul 15 15:15:56 bkorb-dt kernel: isofs_fill_super: bread failed, dev=sr0, iso_blknum=16, block=16
$ md5sum openSUSE-11.3-DVD-x86_64.iso
adf5d2a0a03c1e3aaf102fd6a4771b87 openSUSE-11.3-DVD-x86_64.iso
I burned it with K3B and it gets the same result trying to mount it. K3B seems to know that the image is an iso9660 and is able to display the various 9660 id fields just fine. It just won't mount.
View 9 Replies
View Related
Feb 17, 2011
I used dual booting with Windows Xp and Ubuntu 10.04. Because errors, I reinstall Windows and then I could not enter GRUB, and Ubuntu partition disappear. I tried to reinstall ubuntu using live CD but I could not detect last ubuntu partitions. After I installed fresh Ubuntu on new partition, I got error message like this:
Unable to mount floppy0 Mount: block device /dev/fd0 is write protected, mounting read-only Mount: could not determine the file system type, and none was specified
View 8 Replies
View Related
Sep 21, 2009
I am keen in understanding the Linux SPI Framework and how to write an SPI Driver.So could anyone kindly show me any good reference for understanding the Linux SPI Framework.
View 2 Replies
View Related
Jul 16, 2010
I want to learn to write an USB driver on linux 2.6.x I tried to find some documents but i could not find documents for it . Most of it gave direct driver code as reference.
View 1 Replies
View Related
Jun 24, 2011
Now i have a problem.I want to used a hid usb device under linux 2.6.11.But i can't know how to used ioctl function to send and receive data to a hid device
View 3 Replies
View Related