[MonoDevelop] Reading from a USB device.... attempting anyway

leblanc at robusthaven.com leblanc at robusthaven.com
Mon Apr 12 11:53:59 EDT 2010


<1271019441260-1836422.post at n4.nabble.com> <1271075271230-1837047.post at n4.nabble.com>
Message-ID: <70f2d1c1e9cdc7188fb831bf271f8c2f at mail.e-rice.net>
X-Sender: leblanc at robusthaven.com
Received: from airband-66-226-226-90.airband.net [66.226.226.90] with HTTP/1.1
	(POST); Mon, 12 Apr 2010 15:53:59 +0000
User-Agent: RoundCube Webmail/0.1b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit



> to be consistent, same data every time the same key is pressed, but not
> the

It is because your losing the sign bit. (all except 213/184 )  Make sure
your saving to unsigned byte


// 1 - 186 90 
10111010
01011010


// 2 - 133 5 
10000101
00000101


//3 - 213 184 
11010101
10111000


//4 - 128 0 
10000000
00000000


//5 - 130 2 
10000010
00000010

//7 - 145 17 
10010001
00010001




On Mon, 12 Apr 2010 04:27:51 -0800 (PST), Steve Ricketts
<velocedge at hotmail.com> wrote:
> 
> 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.  An example below with the
> results from the program 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 rate gives me any response at all.
> 
> Has anyone had any similar issues or know what else I could try?
> --
> View this message in context:
>
http://n4.nabble.com/Reading-from-a-USB-device-attempting-anyway-tp1835480p1837047.html
> Sent from the Mono - MonoDevelop IDE mailing list archive at Nabble.com.
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list



More information about the Monodevelop-list mailing list