Apr 10, 2012 at 2:02 PM
Edited Apr 11, 2012 at 6:52 AM
I wrote an application in C# for Windows Mobile 5.0 on .NET CF 2.0 and 32feet v. 220.127.116.11, quite a while ago, which connects to a bluetooth device via SPP (Simple Serial Port - RFCOM) and it works perfectly.
I then ported the application to Windows Mobile 6.5 and changed to 32feet v. 3.3.909.0, as the old version did not support Windows Mobile 6.5. Both application uses the 32feetWidcomm.dll, though two different versions I am sure.
The problem is that sometimes when I attempt to connect to a device it prompts me for pairing. The prompt comes from Windows Mobile 6.5 (the OS), not 32feet, as far as I can tell, but the connect is executed from 32feet. The "old" version running on Windows
Mobile 5.0 has no problem connecting to the devices which fails on the newer OS.
I have taken several of the devices I am connecting to apart and as far as I can see there is no difference between the devices or the HW bluetooth chip. The really odd thing is that it is only some of the devices I am unable to connect to, and the "old"
version works perfectly. The prompt on the phone running the code is: "Pairing is required to be able to create a connection to this device", and is a Windows Mobile Bluetooth prompt.
Is there some way of forcing a Bluetooth connect on Windows Mobile 6.5 via 32feet to be created without pairing? There is no requirement for security or encryption.
I have added a part of my code below. The listBoxDevices contains a list of all devices found in the last search. Apart from making sure the Bluetooth Chip is powered on, no other attributes are set/testet.
BluetoothDeviceInfo bdi = (BluetoothDeviceInfo)listBoxDevices.SelectedValue;
IAsyncResult ar = bc.BeginConnect(new BluetoothEndPoint(bdi.DeviceAddress, BluetoothService.SerialPort), null, null);
while (!ar.IsCompleted && progressBarLoookup.Value < 100)
res = CommandResult.COMMUNICATION_FAILURE;
NetworkStream ns = bc.GetStream();
Thank you in advance.