蓝牙设备读取不成功,谁知道是怎么回事啊!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using InTheHand.Net;
using InTheHand.Net.Bluetooth;
using InTheHand.Net.Sockets;
namespace testBLE_Cshap
{
//已引用了 InTheHand.Net.Personal
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
BluetoothRadio radio = BluetoothRadio.PrimaryRadio;
//if (radio == null)
//{
// MessageBox.Show("no");
// return;
//}
radio.Mode = RadioMode.Discoverable;
//运行到这里提示: {"未将对象引用设置到对象的实例。"}
}
}
}