C # Establishing stream from internal bluetooth bluetooth 4.0 to low power bluetooth (BLE)

I'm trying to write a program that connects to a Bluetooth Low Energy (BLE) device, and then read the feature either on updates or at a given interval.

My Peripheral is a Texas Instruments CC2540 BLE device.

My starting point was looking at a sample program from TI that has a heart rate monitor: http://processors.wiki.ti.com/index.php/Category:HealthDemo

However, this uses the key, and I am instructed to use the internal bluetooth 4.0 modem (I am going to do it on android later, but for now I just use windows).

Now my problem is that the key creates a COM port, but there is no internal modem. I still managed to use the 32-bit API to scan and successfully search for CC2540. However, from here I do not know what to do. I tried to call the connect () method, but it cannot always connect, either with a timeout or with an expression that there is a dead network.

Any ideas why this is happening? Can I do something else besides calling my device.connect ()?

Code snippet:

BluetoothClient cli; BluetoothDeviceInfo[] peers; BluetoothDeviceInfo device; BluetoothAddress adr; //... skipping code that finds the device and assigns the address to it. if (device.InstalledServices.Length != 0) { try { //MessageBox.Show("attempting to connect"); cli.Connect(device.DeviceAddress, device.InstalledServices[2]); //tbDeviceInfo.AppendText("\n\nConnected " + device.Connected); } catch (Exception ex) { MessageBox.Show(ex.Message); // i always get this exception. } } 
+7
c # bluetooth-lowenergy 32feet
source share
2 answers

I don’t want to make you mistakes, but 32feet does not currently support low energy Bluetooth. (As of November 2012).

+3
source share

It seems that Bluetooth Low Energy support is not supported using the 32Feet library. See here . Alternatively, you can look at this Bluetooth library, which provides support, but I have not tried it and I can not say how good the support is. Look here

+1
source share

All Articles