espressif / esp-idf-provisioning-android

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

New source for Android app to support esp-va-sdk 1.0-RC1 #5

Closed alexm-snx closed 5 years ago

alexm-snx commented 5 years ago

Will the source code for Provisioning Android app that supports release esp-va-sdk-v1.0-rc1-193877: https://github.com/espressif/esp-va-sdk/commit/0b8a9fb581835424598ba8b38964e9cf15e834d3

be available this week?

I have a Proof-of-Concept (PoC) demo using an ESP32 board that's blocked from using the newer BLE-enabled esp-va-sdk in a prototype product.

Or maybe info on what I need to patch in sending the credentials via protobufs. I do see the Wi-Fi credentials appear at the board, but get an unpack/format error for what I assume are the Amazon credentials

KhushbuShah25 commented 5 years ago

Hi @alexm-snx , Android app is available for the release esp-va-sdk-v1.0-rc1-193877

This is the link for Android app source code.

alexm-snx commented 5 years ago

I've taken the code, put in our Amazon api_key and product_id (though not sure I put in the right place, just followed what I did in the previous version of esp-idf-provisioning).

It connects to out BLE-enabled esp-va-sdk-based firmware, I see our company's Amazon security profile, but after I click Approve, Chrome browser shows "We're sorry! An error occurred when we tried to process your request....."

The one thing I see is "productID":"esp_avs_open", should this be the "product_id" entry I put in the app build.gradle file?

I'm attaching a redacted/obscured Android logcat for the BLE Provisioning app EspIdfProvAvsBLE_fail_AmazonLogin.txt

kedars commented 5 years ago

@alexm-snx the firmware side configuration, by default, is esp_avs_open, I think that's probably causing the mismatch.

This should help fix it: https://github.com/espressif/esp-va-sdk/issues/45#issuecomment-495438725

anujdeshpande commented 5 years ago

@alexm-snx - @kedars is right. In the new version of the app the productID is fetched from the device. That means that your equivalent of esp_avs_open will have to be in the device firmware.

Once you have done that, you will have to create a new security profile that is associated with the said productID and then create an API key for Android in the same developer.amazon.com console. That API key will then go in the api_key.txt file that is part of the source.