This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请教TI工程师,DLP NIRScan Nano EVM这款光谱仪的蓝牙通讯问题?



现在使用一台DLP NIRscan Nano EVM光谱仪,内置的是CC2564MODN蓝牙模块,Android手机已经与该设备成功连接,目前的问题是,获取不到服务?回调方法onServicesDiscovered(BluetoothGatt gatt, int status)中,返回的status值为129!代码和输出错误如下,请教该如何解决?谢谢

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public void onServicesDiscovered(BluetoothGatt gatt, int status)
    {
        Log.i(TAG, "远端设备中的服务可用时的回调");
        //List<BluetoothGattService> btServices = mBluetoothGatt.getServices();//try anyway
        if(status == BluetoothGatt.GATT_SUCCESS)
        {
            // 搜索成功
            Log.i(TAG, "notify:" + SampleGattAttributes.notify(gatt));
            broadcastUpdate(ACTION_GATT_SERVICES_DISCOVERED);
             printUuid(gatt);
        }
        else
        {
            Log.i(TAG, "远端设备中的服务可用时的回调: " + status);
        }
    }
1
输出的错误为129
1
2
3
4
5
6
7
8
9
12-09 16:51:16.693: I/BluetoothLeService(9903): 试图创建一个新的连接.
12-09 16:51:16.693: I/BluetoothLeService(9903): B0:B4:48:B4:24:C0
12-09 16:51:18.683: I/BluetoothLeService(9903): 尝试使用一个现有mBluetoothGatt连接.
12-09 16:51:18.693: I/BluetoothLeService(9903): 正在连接当中.
12-09 16:51:27.643: I/BluetoothLeService(9903): Connected to GATT server.
12-09 16:51:27.643: I/BluetoothLeService(9903): DiscoverServices:true
12-09 16:52:27.623: I/BluetoothLeService(9903): 远端设备中的服务可用时的回调
12-09 16:52:27.623: I/BluetoothLeService(9903): 远端设备中的服务可用时的回调: 129
12-09 17:00:37.123: I/BluetoothLeService(9903): Disconnected from GATT server.