[Mono-list] blocking ioctls

ghell ghelyar at gmail.com
Thu Feb 21 20:31:48 EST 2008


I am using ioctl (hiddev macros) in mono to talk to a human interface device.
I can read a hiddev_usage_ref fine but then if I call the same read again,
it prints out the same data. The device is not actually sending the data (as
that requires a separate request to be written to it) but it seems to be
just printing out the last set of bytes that have been sent.

Another problem with this is that if I read too quickly after the request,
the data I get back is the data that was there before the request was made
because it is reading from a buffer somewhere rather than from the device as
that data has not been received yet.

Is there any way that I can make it block so that the ioctl read operation
blocks until some data is sent from the device (from there I can just fire
an event easily enough) rather than just pulling out whatever was last sent?
If this is possible, would the fact that there are 3 separate HID report IDs
cause problems?

Thanks
-- 
View this message in context: http://www.nabble.com/blocking-ioctls-tp15625491p15625491.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list