Hello Greg On Thu, Jun 11, 2015 at 4:31 PM, Greg KH <greg@kroah.com> wrote:
real-time performance does not mean it has to be in the kernel at all.
And almost no one needs "real" real-time performance, that's a horrible check-box that people love to claim is needed and yet, almost no one really needs in the end.
Agree, I do NOT need real time performace, in fact I can tolerate msecs of jitter. This is why I want to have a userland application
By looking at our applications, The userspace sollution is more than enough for our requirements.
The problem appears when we want to use the serial adapter. I want to keep using the serial API, but I cannot achieve this from userspace.
I don't understand what type of API you are talking about here. What exactly does ethercat do? What are you doing that does not work today from userspace with the existing serial apis?
Ehtercat is an industrial protocol that runs over ethernet. In a normal setup, there is one master and multiple slaves. Master is generally a PC, and the slaves are GPIO boards, serial ports, CAN bridges.... Ethercat is quite a complex protocol, it has a shared clock, device discovery.... So before you can read/write a register at a slave you end up with thousands of lines of code. What I want to do, is access a ethercat slave serial port like a "normal" serial port in my computer (/dev/ttyS0, /dev/ttyUSB0, /dev/ttyUL0....) That way any application can use the serial port with no modification. The common approach would be to create a serial port kernel module, but because it is such a complicated protocol I rather handle it in userland (same idea as uinput, but for serial ports) I am now taking a look to Bjørn suggestion about using a pty, and looks very promising. Thanks! -- Ricardo Ribalda