I have to do a barcode scanner wedge program but the scanners i need to interface to have a weird way of working.
- Create a bluetooth incoming comm port
- open new port
- scan a pairing barcode
- enter pin
- device creates 2 more com ports, incoming and outgoing
Now the problem is I am trying to get stage 1 working using the code
private string GetBTMacAddress()
return br.LocalAddress.Nap.ToString("X") +br.LocalAddress.Sap.ToString("X");
private void startCommunication()
BluetoothAddress addr = BluetoothAddress.Parse( GetBTMacAddress());
BluetoothDeviceInfo device = new BluetoothDeviceInfo(addr);
bool state = true;
device.SetServiceState(BluetoothService.SerialPort, state, true);
But i get a NULL Exception on the above line.
Any clues and any one know of a good demo which will show the funcions I need.