I have a Windows Mobile/CE 6 device that needs to read RFID data from a bluetooth RFID wand in a custom .NET 3.5 CF application. Tried many different solutions and trying to make 32Feet's InTheHand bluetooth library work. I can get the device to pair and connect just fine, but when I send commands to the unit and try to read from the stream, it always results in an exception of "Operation time-out". Any tips or help is much appreciated.
var endpoint = new BluetoothEndPoint(device.DeviceAddress, BluetoothService.SerialPort);
var client = new BluetoothClient();
client.Connect(endpoint); // Connects just fine!
var stream = client.GetStream();
using (var sw = new StreamWriter(stream))
{
sw.Write("l");
}
if (stream.CanRead) // Always False
{
using (var sr = new StreamReader(stream))
{
var exi = sr.Peek();
var p = sr.ReadToEnd();
var pp = sr.ReadLine();
}
}