[Mono-list] UnixStream + hiddev

ghell ghelyar at gmail.com
Fri Jan 11 07:56:37 EST 2008

Is it possible to use a Mono.Unix.UnixStream to write to human interface
devices (eg /dev/usb/hiddev0)? Even if I have permissions (or su) and obtain
the file descriptor from Syscall.open(path, OpenFlags.O_RDWR), CanWrite
still returns false and hence Write throws an exception. I have also tried
UnixFileInfo.OpenWrite but that fails instantly by using OpenFlags.O_CREAT
and other UnixFileInfo Open calls still give me no CanWrite.

I have been using ioctl in the past fine (even if I open the file read only,
I can still use ioctl to write to the device for some reason) but it is
quite complicated and I was hoping for a simpler, stream based approach for
the actual device writing as I use a FileStream on windows to write to HID
without any problems.
View this message in context: http://www.nabble.com/UnixStream-%2B-hiddev-tp14753923p14753923.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list