7
2
cusexmp
, the example of CUSE program, works.
Is there real programs that makes use of it?
For example, a thing that just mirrors other character device or thing that allows networked character devices.
7
2
cusexmp
, the example of CUSE program, works.
Is there real programs that makes use of it?
For example, a thing that just mirrors other character device or thing that allows networked character devices.
4
How about this one:
http://userweb.kernel.org/~tj/ossp/
It emulates OSS (Open Sound System) /dev/dsp e.t.c. device nodes and forwards all operations to pulseaudio. I believe this was (one of) the first applications, if not the motivation, for CUSE.
4
I'd be interested to use CUSE to make a virtual serial port that connects to an RFC-2217 serial-over-network server. That would be a really good use of CUSE.
See:
I found mhuxd — Device Router for microHam Keyers and Linux which uses CUSE to create a virtual serial port.
I also found utty on GitHub which has some CUSE code for a TTY (terminal), although it's not clear to me whether the ioctl
s for serial port support are functional.
3
I maintain a Linux kernel-space serial-port-over-network driver, and have been wanting to move it to userspace for 15 years. I've looked into using ptys, but they only provide support for a subset of the operations that need to be implemented for a serial port. On several occasions I've proposed extending the Linux pty driver so that it could be used as a way to implement user-space serial port drivers, but have never gotten any response from the maintainers -- so CUSE looks like it might finally provide a way to do what I want. :)
I have found references to people using CUSE from Python, and cusepy
seems to be the most popular way to do it:
There's a quantumrandom
package on PyPI that appears to use it.
And osspd
is another OSS emulator that uses CUSE.
That might be the same as the one mentioned a a few posts up, but I can't tell because that link doesnt work.
might be just what I was looking for :) Can you please try to answer https://stackoverflow.com/questions/54548963/userspace-driver-for-serial-uart-in-linux ?
– ransh – 2019-02-06T15:28:55.813Is there any example showing serial driver with cuse ? Thx! – ransh – 2019-02-06T15:29:41.940
Did you manage writing your serial driver with cuse ? which best example do you recommend as a start point ? I looked at the links and it seems complex. – ransh – 2019-02-07T18:53:38.293
I haven't, sorry. I don't have a compelling need either at home or at work, and there's not enough time in life to do everything I'd like. I'll most likely do it if I have a work project that would benefit from it. – Craig McQueen – 2019-02-07T23:07:26.930