Sockets comes to mind but i am not that familiar with it so i can't give you much detail.
i just know that it is how the blueZ layers communicate with each other.
Socket communication is not for hardware device drivers. They are only for communication between network layers (I guess I am right).
My problem is how do I pass ioctl to other driver from being a driver,
My driver works this way, (works for 2.4 kernel)
1. a. It will get loaded with a entry of 'insmod <driverpath>' in /etc/rc.d/locals'
b. Will have a major number of 254 and being a character driver.
c. It has no dependencies. (Incase it loads this way, later on may subject to change if driver load has to be done for my device in particular, I don’t know how to do this).
2. In init_module, (device detection will happen)
a. Creates handle to hda, hdb, hdc, hdd one by one
b. Check the device is my device by issuing inquiry command (an ioctl)
c. If the device is found create a thread (using pthread) that will pass series of other commands to the driver. else continue with hdb or hdc or hdd.
3. The thread will not stop, It will look in for media change periodically, if media change has happened it will print a log.
The device can be accessed through ports but may get hang-up, when the device driver(had, hdb, hdc, or hdd) tries to perform something on the device.
I need to implement things using taskfile please do suggest me a way
Please do suggest how things in the flow can be modified, any flaws too are welcomed. (Getting rid of the issue too is a must)