سؤال

I'm trying to locate the distance from my computer and an iBeacon using bluetooth connection and getting the rssi. It's my first time using bluetooth in my apps and I'm something lost.

I downloaded the "32 feet" library (http://32feet.codeplex.com/) to use bluetooth functions, but I can't do this to work... This is the code I have:

        BluetoothClient b = new BluetoothClient();
        BluetoothDeviceInfo[] devices = b.DiscoverDevices();
        BluetoothDeviceInfo info = devices.ElementAt(0);
        // the first element it's the estimote


        System.Windows.Forms.MessageBox.Show("Device name: " + info.DeviceName+"\n");

        if (info.Connected)
        {
            System.Windows.Forms.MessageBox.Show("Connected\n");
        }
        else
        {
            System.Windows.Forms.MessageBox.Show("Not connected\n");
        }
        if (info.Authenticated)
        {
            System.Windows.Forms.MessageBox.Show("Authenticated\n");
        }
        else
        {
            System.Windows.Forms.MessageBox.Show("Not Authenticated\n");
        }

        System.Windows.Forms.MessageBox.Show("RSSI: " + info.Rssi + "\n");

The output is: Device name: estimote. Not connected. Authenticated. RSSI: -2147483648 (the minimum int?) Thanks for your help.

هل كانت مفيدة؟

المحلول

This is Wojtek Borowicz, I'm a community evangelist at Estimote.

Unfortunately, RSSI is currently still not available for most of the Windows Bluetooth stacks.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top