Hi I would appreciate the opinions of the Linux robot builders in this group. The question is whether you would prefer a real device driver for robot peripherals or a unix socket interface to it. Some background on my question can be found at:
I am building a set of robot peripherals in an FPGA. The FPGA card connects to a Linux host system over a USB-serial link. I would like to offer device drivers for the peripherals on the FPGA card and would like to use a user-space device driver. My question is about how that daemon talks to the higher level robot control applications.
One approach is to offer a set of unix sockets for each device. For example, stepper motor controller might have unix sockets at /tmp/board_0/slot_2/step_count // the step count /tmp/board_0/slot_2/step_rate // steps per second A high level application would have to use socket() and connect() to open communication to the devices. To set the step_rate from the command line would require something like cat "1200" | socat - /tmp/board_0/slot_2/step_rate
The other approach is to install a small kernel module and create a "real" device node for each peripheral. This is what is in the article referenced above. The device nodes might appear as: /dev/board_0/slot_2/step_count /dev/board_0/slot_2/step_rate A high level application would just use open() to establish communication with the peripheral. To set the step rate from the command line would require something like cat "1200" > /dev/board_0/slot_2/step_rate This approach requires compiling and installing two GPL'ed modules. See the article for more info on the two small modules.
-- So, is having the convenience of a real device driver worth the extra effort of compiling and installing a couple of modules?
--Or, is having to use socket(), connect(), and socat worthwhile if it avoids having to deal with the kernel at all.
-- In a marketing sense is there much difference between: "Full Linux support including all source code", and "Complete Linux drivers including all source code"?
thanks Bob Smith