I got a FEZ Domino with the Bluetooth Interface from the catalog and I’m trying to run the sample code as listed on http://www.fezzer.com/project/249/bluetooth-interface/. However, on my initialization line of the SerialPort
var bluetooth = new SerialPort("COM12", 9600, Parity.None, 8, StopBits.One);
I’m getting an ArgumentException error:
#### Exception System.ArgumentException - 0xfd000000 (1) ####
#### Message:
#### Microsoft.SPOT.Hardware.NativeEventDispatcher::.ctor [IP: 0000] ####
#### System.IO.Ports.SerialPort::.ctor [IP: 0030] ####
#### ServoBluetoothClient.Program::Main [IP: 0017] ####
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll
I successfully paired the Spp device with my laptop (I in fact tried two different laptops), but it always seems to throw that error. I can see the device under ‘Devices and Printers’ and in the properties of the Spp device, I can see the ‘Serial port (SPP) ‘Spp’ COM12’ item.
I figured I should use COM12, as that’s the virtual COM port created on my computer, but I’m guessing your aiming at the fact that the bluetooth interface module is connected to my COM1 pins (Di0/Di1) on my Domino?
When I change COM12 to COM1 in my code, I get the exact same error, unfortunately.