espressif / esp-rainmaker-android

ESP RainMaker Android app sources
https://rainmaker.espressif.com/
Apache License 2.0
95 stars 55 forks source link

error while provisioning using SoftAP #18

Closed ansuman87 closed 2 years ago

ansuman87 commented 2 years ago

I have run the provisioning example provided by the esp-idf on my ESP32 dev board -- wifi_prov_mgr. On my android device I have run the rainmaker app. I just want to test the provisioning using security_1 feature. However, I am getting an error at the Provisioning stage (fragment) -- "Sending WiFi credentials. Failed to associate device." This is my error log:

W/essif.rainmake: Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed) D/ProvisionActivity: payload: # rainmaker.EspRmakerUserMapping$RMakerConfigPayload@9235ac24 cmd_set_user_mapping { secret_key: "275ad324-58c8-48d1-82cb-b84fd68df4c4" user_i_d: "ab72a806-f3d4-4761-95be-a474910cf65f" } payload msg: TypeCmdSetUserMapping D/Espressif::SoftAPTransport: Cookie - Name : session Cookie - Value : 591782268 V/FA: Activity resumed, time: 61630698 V/FA: Connection attempt already in progress W/System.err: java.lang.IllegalArgumentException: Null input buffer at javax.crypto.Cipher.update(Cipher.java:1675) at com.espressif.provisioning.security.Security1.decrypt(Security1.java:208) at com.espressif.provisioning.Session$2.onSuccess(Session.java:131) at com.espressif.provisioning.transport.SoftAPTransport$1.run(SoftAPTransport.java:144) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) V/FA: Connection attempt already in progress W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) W/System.err: at java.lang.Thread.run(Thread.java:919) E/ProvisionActivity: Send config data : Error : Null input buffer W/System.err: java.lang.IllegalArgumentException: Null input buffer at javax.crypto.Cipher.update(Cipher.java:1675) at com.espressif.provisioning.security.Security1.decrypt(Security1.java:208) at com.espressif.provisioning.Session$2.onSuccess(Session.java:131) at com.espressif.provisioning.transport.SoftAPTransport$1.run(SoftAPTransport.java:144) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) D/FA: Connected to remote service V/FA: Processing queued up service tasks: 4 V/FA: Inactivity, disconnecting from the service

Can someone point me in the right direction. Am I doing something wrong on the server side?

KhushbuShah25 commented 2 years ago

Hi @ansuman87 , For wifi_prov_mgr example, please use ESP BLE Provisioning app or ESP SoftAP Provisioning app.

ESP RainMaker app needs a user login and provisioning process will also do user-device association. This app is compatible with ESP RainMaker firmware. You can use examples of ESP RainMaker project with ESP RainMaker app. For more detail of ESP RainMaker project, please check this link

shahpiyushv commented 2 years ago

Closing this issue as it has been addressed.