Coder Social home page Coder Social logo

Comments (6)

KhushbuShah25 avatar KhushbuShah25 commented on August 13, 2024

Hi @dariobertini ,

Is your device has Proof of possession ? If yes, need to set proof of possession value in application before sending wifi config or any data to device.

from esp-idf-provisioning-android.

dariobertini avatar dariobertini commented on August 13, 2024

Hi @dariobertini ,

Is your device has Proof of possession ? If yes, need to set proof of possession value in application before sending wifi config or any data to device.

hi @khushbushah2302 , thank you for your reply, unfortunately i'm already doing like this.
below my code:
device.setProofOfPossession(pop);
device.provision(ssid, passphrase, new ProvisionListener() {....

from esp-idf-provisioning-android.

dariobertini avatar dariobertini commented on August 13, 2024

hi @khushbushah2302 ,

I get more information about the issue, the exact point where I get this error is on line 142 of Security1.java, in correspondence of the "parseFrom"
private void processStep0Response(byte[] hexData) throws RuntimeException {
try {
if (hexData == null) {
throw new RuntimeException("No response from device");
}
Session.SessionData responseData = Session.SessionData.parseFrom(hexData);

from esp-idf-provisioning-android.

KhushbuShah25 avatar KhushbuShah25 commented on August 13, 2024

Hi @dariobertini ,
Can you share how device instance is created and then connected with device using BLE ?

from esp-idf-provisioning-android.

dariobertini avatar dariobertini commented on August 13, 2024

Hi @dariobertini ,
Can you share how device instance is created and then connected with device using BLE ?

Hi @khushbushah2302 ,
we create the device with this code:
ESPProvisionManager provisionManager = ESPProvisionManager.getInstance(this.getContext());
provisionManager.createESPDevice(ESPConstants.TransportType.TRANSPORT_BLE, ESPConstants.SecurityType.SECURITY_1);

after we connect to BLE :
provisionManager.getEspDevice().connectBLEDevice(bleDevice,uuid);

ON ESPConstants.EVENT_DEVICE_CONNECTED event:
this.provisionManager.getEspDevice().setProofOfPossession(pop);
this.provisionManager.getEspDevice().provision(ssid, passphrase, new ProvisionListener() {....

from esp-idf-provisioning-android.

dariobertini avatar dariobertini commented on August 13, 2024

Hi @khushbushah2302 ,

after days of investigation we found out the cause of this issue:
we was using Subscribe to event with POSTING instead of MAIN,
WRONG: @Subscribe(threadMode = ThreadMode.POSTING)
RIGHT: @Subscribe(threadMode = ThreadMode.MAIN)

thank you for your support

from esp-idf-provisioning-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.