UsbPacket.Open() not working
Up to .NET C#
I'm having trouble getting UsbPacket to open. I'm using C#. I get a message in the debugger that information about the containing class is not available. The demos seem to run ok, though sometimes they fail. Is it possible that if the program exits during debug before closing the port that the system will need a restart to recover the use of the port? Also, is a call to Open necessary, since it is missing in the example code?
Thanks.
I am having this problem as well but with Vista.
last I checked my program was working just fine with XP but I can not get my program to work with vista. Even mctest does not work under vista. Mchelper however, is working just fine under vista.
Will
have you tried communicating over ethernet? I had serious headaches with C# till i switched over to ethernet. There's something wrong with comm over USB in C#.
Ok I just confirmed it, my code will open the USB port under XP but NOT Vista.
So I figure that that is a bug.
for XP you do have to make sure that you loaded mchelper and that the dll from MCtest is referenced in you project.
Now the question remains for jodeleeuw are you using XP, Vista or linux? if its Vista sorry I can't help but if it is XP well here is a sample of my code that does it...
=============================================================
using System;
using MakingThings;
namespace RoboCon3
{
class RoboCon3
{
static void Main(string[] args)
{
UsbPacket usbPacket;
Osc osc;
OscMessage oscM;
String mcCommand;
usbPacket = new UsbPacket();
usbPacket.Open();
osc = null;
osc = new Osc(usbPacket);
while(usbPacket.IsOpen())
{
// Button A has just been pressed.
mcCommand = "/digitalout/7/value 1";
oscM = Osc.StringToOscMessage(mcCommand);
osc.Send(oscM);
Console.WriteLine("Button A is pressed");
// and insert your other commands here...
}
Well I attempted to communicate with the MC via VISTA and UDP last night to no avail.
Perhaps I have incorrectly installed the device on Vista but then why is the MC helper still working under Vista.
is there a different API for Vista that for XP?
Hmmm.........
There shouldn't be too much to install for the Ethernet side of things. Are you sure you've gotten all your network configuration in your C# code set up properly? Have you done any loopback/localhost tests just to confirm the .NET UDP stuff works as expected?
We don't have a separate API for Vista.
Ran into the same problem with the C# tutorial. I was able to get MC working over ethernet with the examples but was wondering if anyone had found a fix for this as its important the USB works for my project.
I did discover the same issue. XP works and Vista doesn't. Is this an issue with the way .Net works with Vista? Maybe the OSC code?
Powered by
Ploneboard

