Android 关贸总协定请求不支持更多可用信息?

Android 关贸总协定请求不支持更多可用信息?,android,bluetooth-lowenergy,android-bluetooth,android-ble,bluetooth-gatt,Android,Bluetooth Lowenergy,Android Bluetooth,Android Ble,Bluetooth Gatt,我正在编写一个android应用程序,与一个可编程设备进行通信。该应用程序是iOS版本的翻版,但任何写入请求都会在onCharacteristicWrite内引发GATT请求不受支持的响应 工作目标C代码 const uint8_t bytes[] = {0x01,0x02,0x00,0x00}; NSData *data = [NSData dataWithBytes:bytes length:sizeof(bytes)]; [_device writeValue:data forCharac

我正在编写一个android应用程序,与一个可编程设备进行通信。该应用程序是iOS版本的翻版,但任何写入请求都会在onCharacteristicWrite内引发GATT请求不受支持的响应

工作目标C代码

const uint8_t bytes[] = {0x01,0x02,0x00,0x00};
NSData *data = [NSData dataWithBytes:bytes length:sizeof(bytes)];
[_device writeValue:data forCharacteristic:_dataCommsCharacteristic type:CBCharacteristicWriteWithResponse];
接收GATT请求的等效Android/java代码不受支持

byte bytes[] = {0x01,0x02,0x00,0x00};
dataCommsCharacteristic.setValue(bytes);
boolean writeStatus = mGatt.writeCharacteristic(dataCommsCharacteristic);
然后

我是不是错过了一些显而易见的东西?!对我来说,上面的两个代码片段基本上是一样的,但是设备不能识别安卓版本,但可以识别iOS版本


非常感谢您的任何想法

看来这最终是一个设备问题。作为最后的手段,我重新启动了Galaxy S5,当时我正在测试它,一切都很顺利


我想我应该先试试

iOS one可能会自动提高安全级别(我对这两种实现的细节一无所知,但该错误有时与以低于要求的安全级别发出请求有关)Hi Joel Spencer,我在安卓系统中也面临同样的问题,所以你能发布一些与此相关的例子吗?现在这真是太令人惊讶了。。。我以为我用砖块把我的BLE设备或其他什么东西堵住了,那只是我的手机。。。非常感谢,我从没想过那是我的手机
@Override
    public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic
            characteristic, int status) {
if (status == BluetoothGatt.GATT_REQUEST_NOT_SUPPORTED){
              Log.d(TAG,"Request not supported");
        }
}