
连接发起后,10s才能获取到蓝牙服务。
发起数据请求,8s ble设备才能收到数据。
发起数据请求的一段 hilog:
01-08 05:18:04.594 2866 2866 I C00101/Bluetooth: [napi_bluetooth_gatt_client.cpp(WriteCharacteristicValueEx:670)]enter
01-08 05:18:04.595 2866 2866 I C00101/Bluetooth: [napi_bluetooth_utils.cpp(ParseArrayBuffer:131)]arraybuffer size is 20
01-08 05:18:04.595 2866 2866 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetService:629)]enter
01-08 05:18:04.595 399 399 I C00101/Bluetooth: [bluetooth_host_stub.cpp(OnRemoteRequest:244)]BluetoothHostStub::OnRemoteRequest, cmd = 11, flags= 0
01-08 05:18:04.595 2866 2866 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetServices:438)]enter
01-08 05:18:04.595 399 399 I C00101/Bluetooth: [bluetooth_host_stub.cpp(OnRemoteRequest:244)]BluetoothHostStub::OnRemoteRequest, cmd = 11, flags= 0
01-08 05:18:04.596 2866 2866 E C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetServices:453)]isGetServiceYet_ is true
01-08 05:18:04.596 2866 2866 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetService:643)]successful
01-08 05:18:04.596 2866 2866 E C00101/Bluetooth: [napi_bluetooth_utils.cpp(NapiIsFunction:518)]Wrong argument type. Function expected.
01-08 05:18:04.596 2866 2888 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:845)]enter
01-08 05:18:04.597 399 399 I C00101/Bluetooth: [bluetooth_host_stub.cpp(OnRemoteRequest:244)]BluetoothHostStub::OnRemoteRequest, cmd = 11, flags= 0
01-08 05:18:04.597 2866 2888 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:862)]length:20
01-08 05:18:04.597 2866 2888 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:884)]Write without response
01-08 05:18:04.597 399 399 D C00101/Bluetooth: [bluetooth_gatt_client_stub.cpp(OnRemoteRequest:73)]BluetoothGattClientStub::OnRemoteRequest, cmd = 6, flags= 0
01-08 05:18:04.597 399 399 I C00101/Bluetooth: [bluetooth_gatt_client_stub.cpp(WriteCharacteristicInner:184)]BluetoothGattClientStub::WriteCharacteristicInner starts
01-08 05:18:04.597 399 399 I C00101/Bluetooth: [bluetooth_gatt_client_server.cpp(WriteCharacteristic:408)]appId: 1855144960, withoutRespond: 1
01-08 05:18:04.598 2866 2888 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:893)]result: 0
01-08 05:18:05.597 2866 2866 I C00101/Bluetooth: [napi_bluetooth_gatt_client.cpp(WriteCharacteristicValueEx:670)]enter
01-08 05:18:05.597 2866 2866 I C00101/Bluetooth: [napi_bluetooth_utils.cpp(ParseArrayBuffer:131)]arraybuffer size is 242
01-08 05:18:05.597 2866 2866 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetService:629)]enter
01-08 05:18:05.598 399 399 I C00101/Bluetooth: [bluetooth_host_stub.cpp(OnRemoteRequest:244)]BluetoothHostStub::OnRemoteRequest, cmd = 11, flags= 0
01-08 05:18:05.598 2866 2866 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetServices:438)]enter
01-08 05:18:05.598 399 399 I C00101/Bluetooth: [bluetooth_host_stub.cpp(OnRemoteRequest:244)]BluetoothHostStub::OnRemoteRequest, cmd = 11, flags= 0
01-08 05:18:05.598 2866 2866 E C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetServices:453)]isGetServiceYet_ is true
01-08 05:18:05.598 2866 2866 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(GetService:643)]successful
01-08 05:18:05.599 2866 2866 E C00101/Bluetooth: [napi_bluetooth_utils.cpp(NapiIsFunction:518)]Wrong argument type. Function expected.
01-08 05:18:05.599 2866 2887 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:845)]enter
01-08 05:18:05.599 399 399 I C00101/Bluetooth: [bluetooth_host_stub.cpp(OnRemoteRequest:244)]BluetoothHostStub::OnRemoteRequest, cmd = 11, flags= 0
01-08 05:18:05.599 2866 2887 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:862)]length:242
01-08 05:18:05.599 2866 2887 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:884)]Write without response
01-08 05:18:05.600 399 399 D C00101/Bluetooth: [bluetooth_gatt_client_stub.cpp(OnRemoteRequest:73)]BluetoothGattClientStub::OnRemoteRequest, cmd = 6, flags= 0
01-08 05:18:05.600 399 399 I C00101/Bluetooth: [bluetooth_gatt_client_stub.cpp(WriteCharacteristicInner:184)]BluetoothGattClientStub::WriteCharacteristicInner starts
01-08 05:18:05.600 399 399 I C00101/Bluetooth: [bluetooth_gatt_client_server.cpp(WriteCharacteristic:408)]appId: 1855144960, withoutRespond: 1
01-08 05:18:05.601 2866 2887 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(WriteCharacteristic:893)]result: 0
01-08 05:18:12.526 399 602 I C00101/Bluetooth: [bluetooth_gatt_client_server.cpp(OnCharacteristicChanged:106)]enter
01-08 05:18:12.527 399 602 I C00101/Bluetooth: [bluetooth_gatt_client_callback_proxy.cpp(OnCharacteristicChanged:51)]BluetoothGattClientCallbackProxy::OnCharacteristicChanged Triggered!
01-08 05:18:12.527 2866 2870 D C00101/Bluetooth: [bluetooth_gatt_client_callback_stub.cpp(OnRemoteRequest:71)]BluetoothGattClientCallbackStub::OnRemoteRequest, cmd = 1, flags= 1
01-08 05:18:12.527 2866 2870 D C00101/Bluetooth: [bluetooth_gatt_client.cpp(OnCharacteristicChanged:161)]recv notification, length:20
01-08 05:18:12.528 2866 2866 I C00101/Bluetooth: [napi_bluetooth_ble_utils.cpp(ConvertBLECharacteristicToJS:128)]uuid: C2E6FFB2-E966-1000-8000-BEF9C223DF6A
01-08 05:18:12.528 2866 2866 I C00101/Bluetooth: [napi_bluetooth_ble_utils.cpp(ConvertBLEDescriptorVectorToJS:163)]size: 1
01-08 05:18:12.528 2866 2866 I C00101/Bluetooth: [napi_bluetooth_ble_utils.cpp(ConvertBLEDescriptorToJS:181)]uuid: 00002902-0000-1000-8000-00805F9B34FB
01-08 05:18:12.528 2866 2866 E C00101/Bluetooth: [napi_bluetooth_ble_utils.cpp(ConvertBLEDescriptorToJS:207)]memcpy_s error