I'm new to this SDK and I have a big problem.
by the way, I had problems with registration - who do I have to contact?
I got an Application on a mobile Device (C# netcf 2.0 sp1, Microsoft Stack) where I have to make a connection to another mobile device. This connection should be enabled the whole time. So my Bluetooth application is trying to connect to the device every X seconds. I've build a solution with the Franson BlueTools, but there are some problems:
After the app has connected to the device (direct connection via network.ConnectDevice and Mac address), everything works fine. But when I turn off the remote device, the app detects the disconnection (try to write into the stream gives an exception, everything will be disconnected). After turn on the remote device again, the app will say "Remote device cannot be found." and will never connect again. Restarting the application solves the problem.
btDevice = network.ConnectDevice(btAdr, "");
Service services = btDevice.DiscoverServices(ServiceType.SerialPort);
Second line throws the exception. When disconnecting, the stream will be closed with networkStream.Close().
What do I need to do, to solve the problem? Did I missed anything?
For now, it works with synchron code. I would like to use asynchrone detection of Services. But there was, I guess, the same problem. Everytime when I startet the detection I get an device.Error (cannot be found.). Looks like the same problem?
I guess the bluetooth device shuts down. We had this problem with the other lib, too. Sometime the bluetooth turn off, withou any reason. On the Windows CE 5.0 there is no bthutil.dll, whitch the lib needs to turn the bluetooth back on - right? Is there anything else I can do to turn the bluetooth on?
Thank you in advance!