espressif / esp-idf-provisioning-android

Android Provisioning application for ESP-IDF Unified provisioning
Apache License 2.0
202 stars 133 forks source link

Provision Issue - java.lang.RuntimeException: Characteristic is not available for given path. #83

Open vincalkr opened 1 year ago

vincalkr commented 1 year ago

Hi

I ask those who know more than me about this ESP32 card, for a problem with provisioning.

ERROR: java.lang.RuntimeException: Characteristic is not available for given path. at com.espressif.provisioning.transport.BLETransport.sendConfigData(BLETransport.java:124) at com.espressif.provisioning.Session.init(Session.java:92) at com.espressif.provisioning.ESPDevice.initSession(ESPDevice.java:652) at com.espressif.provisioning.ESPDevice.provision(ESPDevice.java:569) at com.albicchiere.DeviceFinder.connectDevice(DeviceFinder.java:166) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188) at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) at android.os.Looper.loop(Looper.java:154) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228) at java.lang.Thread.run(Thread.java:762)

I call this code:

ESPProvisionManager.getInstance(getReactApplicationContext()).createESPDevice(ESPConstants.TransportType.TRANSPORT_BLE, ESPConstants.SecurityType.SECURITY_1); ESPDevice espDevice = ESPProvisionManager.getInstance(getReactApplicationContext()).getEspDevice();

espDevice.connectBLEDevice(device.getBluetoothDevice(), uuids.get(indexFound)); espDevice.setProofOfPossession("abcd1234"); espDevice.provision(ssid, password, provisionListener);

Thank you

d-rahul commented 11 months ago

@vincalkr I found the same when I tried to write custom data (which means a custom path that is not defined in hardware/firmware). So, to write any data at a custom path needs to define the same at the firmware level also.

@ameyinamdar Please guide me if this is not correct in the case of the above issue...

krystek-dev commented 8 months ago

you have to put characteristic descriptor name to path, not characteristic UUID