esp-idf-provisioning-android
esp-idf-provisioning-android copied to clipboard
Write to BLE failed + unknown status 4
I am trying to provision an ESP device, but when I try to provision the device, I get this:
V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 44564841, pluginId: EspBluetooth, methodName: sendInformations
V/Capacitor: callback: 44564841, pluginId: EspBluetooth, methodName: sendInformations, methodData: {}
W/ogga.testplugi: Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
I/Capacitor/Console: File: http://localhost/ - Line 201 - Msg: undefined
D/Espressif::BLETransport: onCharacteristicWrite, status : 4
D/Espressif::BLETransport: UUID : 1775ff51-6b43-439b-877c-060f2d9bed07
W/System.err: java.lang.Exception: Write to BLE failed
W/System.err: at com.espressif.provisioning.transport.BLETransport$1.onCharacteristicWrite(BLETransport.java:376)
W/System.err: at android.bluetooth.BluetoothGatt$1$7.run(BluetoothGatt.java:448)
W/System.err: at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:780)
W/System.err: at android.bluetooth.BluetoothGatt.access$200(BluetoothGatt.java:41)
W/System.err: at android.bluetooth.BluetoothGatt$1.onCharacteristicWrite(BluetoothGatt.java:443)
W/System.err: at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:258)
W/System.err: at android.os.Binder.execTransactInternal(Binder.java:1032)
W/System.err: at android.os.Binder.execTransact(Binder.java:1005)
D/ESP:ESPDevice: disableOnlyWifiNetwork()
E/ESP:ESPDevice: Connectivity Manager is already unregistered
E/ERROR: Session creation failed: Failed to create session.
What is bothering me is that I get "status: 4"...yet this status code does not exists for onCharacteristicWrite...
EDIT:
After further searches, it seems like the plugin can not create my session. It failed writing that information in my device. What are prerequisites for the session creation ?
Hi @baptiste43marques ,
PoP (proof of possession) should be correct for session creation. You can get PoP from device logs.
I am also facing the same issue @baptiste43marques did you get any resolution?