I tried to use the DataReceived event to read from a CP2102 USB device. I found this article http://www.mono-project.com/HowToSystemIOPorts that says "There is no event notification for received serial data"... which would explain why the event wasn't firing. However, it also says that at the time of writing it's mono 1.2.2.
So, I used BackgroundWorker to set up a thread to continually look at BytesToRead and grab the data. It does that ok, but the data is not correct. It seems to be consistent, same data every time the same key is pressed, but not the correct values. The USB device is an RF receiver that listens to wireless remote controls. When I press a button on the wireless remote, I get the proper packet size (8) but the values are off. I'll include an example below with the results from the same device in Windows: Linux Windows (correct values) 0 - 255 255 1 - 186 90 2 - 133 5 3 - 213 184 4 - 128 0 5 - 130 2 6 - 128 0 7 - 145 17 Using the same baud rate on Linux that I do with Windows (128000) I get nothing from the receiver. Switching to 115200 I get the data but as I said, it's incorrect. No other baud rates (I've tried many) give me any response at all. So I have the following questions: 1. Has anyone had any similar issues or know what else I could try? 2. Does anyone know if that limitation has been fixed and is able to trigger an event when data is received by the device? sr -- View this message in context: http://n4.nabble.com/Invalid-data-from-CP2102-USB-device-tp1837224p1837224.html Sent from the Mono - General mailing list archive at Nabble.com. _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
