解决方案 »

  1.   

    估计bluetoothListener.AcceptBluetoothClient();  这个会阻塞当前的线程。
    要写在线程里面,等有蓝牙客户端连接时,就会触发bluetoothListener.AcceptBluetoothClient();     的
      

  2.   

    代码里面有发现其他蓝牙设备的代码,但是好像没有看到蓝牙设备配对的代码,发送接收数据是以连接上两台设备为基础的
    摘自C#实现电脑蓝牙接收手机信息并处理             BluetoothDeviceInfo bd = new BluetoothDeviceInfo(devices[0].DeviceAddress);            
                 bluetoothClient = new BluetoothClient();
                 Guid mGUID = Guid.Parse("fa87c0d0-afac-11de-8a39-0800200c9a66");            
                 bluetoothClient.Connect(devices[0].DeviceAddress, mGUID);//客户端对地址实现连接,这是一个阻塞线程,需要服务器端的回应 
                 Thread ReceiveThread = new Thread(ReceiveData);           
                 ReceiveThread.Start();
      

  3.   

    也可以参考一下开源项目32feet.NET中关于蓝牙连接的介绍General Bluetooth Data Connections