Question

I'm new on driver programming. So I 'm faced with some "problems".

I wrote a PCI driver. The question is now How can a app communicate with this driver.

My purpose is to write a test app for the driver. It's a kind of "basic research" to learn the driver programming.

Normally I would say over the device file in /dev. But my file in this directory has no permission for reading or writing except root. So how communicate? Via attribute files?

Was it helpful?

Solution

Using the node in /dev is the correct approach. What you need to do is to fix the permissions.

You can do that using chmod but you'll have to do that every time you reboot. A better solution is to create a udev rule which matches the ID of your PCI device. Then, you can run the chmod in the rule.

Documentation: Writing udev rules

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top