static void Main(string[] args) { //Change these to load correct driver and connect it to correct bus string driver = "can_usb_win32"; string bus = "COM4"; BUSSPEED bitrate = BUSSPEED.BUS_500Kbit; try { DriverLoader loader = new DriverLoader(); DriverInstance instance = loader.loaddriver(driver); Console.WriteLine("Opening CAN device "); instance.open(bus, bitrate); instance.rxmessage += Instance_rxmessage; Console.WriteLine("listening for any traffic, press any key to exit .."); while (!Console.KeyAvailable) { } instance.close(); } catch (Exception e) { Console.WriteLine("That did not work out, exception message was \n" + e.ToString()); } Console.WriteLine("Press any key to exit"); while (!Console.KeyAvailable) { } }