aws / amazon-freertos-ble-android-sdk

Android SDK for FreeRTOS Bluetooth Devices.
Apache License 2.0
49 stars 41 forks source link

Getting issue with release v1.1.0 #17

Closed Aditya-Jadoun closed 2 years ago

Aditya-Jadoun commented 4 years ago

I am trying to build the release v1.1.0 , amazonfreertossdk project code but getting some gradle issue and when i tried to build the app project, code getting build successfully but when i run the application in the android phone, i am getting some issue. After running the mobile application, blank screen appeared and after that app got crashed.

My objective is to test the OTA Demo application with nordic nrf52840 OTA firmware.

Device Info: Xiaomi Redmi Note 7 Pro Android 9.0

Aditya-Jadoun commented 4 years ago

I am able to run the amazonfreertossdk project with some online help. But when i am running this code i am getting some issue.

I am attaching the logs of the amazonfreertossdk project. FreeRTOS_Demo_V1.1.0_log.txt.

ravibhagavandas commented 4 years ago

Error log:

04-20 12:35:25.655 16556-16574/? E/AuthActivity: Initialization error. java.lang.RuntimeException: Failed to initialize Cognito Identity; please check your awsconfiguration.json at com.amazonaws.mobile.client.AWSMobileClient$2.run(AWSMobileClient.java:535) at com.amazonaws.mobile.client.internal.InternalCallback$1.run(InternalCallback.java:101) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.IllegalArgumentException: No region provided

As specified in the error, the region for AWS cognito seems to be not configured in awsConfiguration.json file.

Could you confirm if you did steps 3 and 4 under To configure the Android SDK demo application section in this doc, to configure Cognito for your project ?

Aditya-Jadoun commented 4 years ago

@ravibhagavandas, Is there any precompiled apk available for the release v1.1.0?

ravibhagavandas commented 4 years ago

@Aditya-Jadoun Usually we don't provide a precompiled apk as each of the users APK will be built according to the cognito credentials configured for their AWS account.

Do you have cognito setup in your AWS account ? If so you can use the same credentials to build the demo app of your own.

Aditya-Jadoun commented 4 years ago

@ravibhagavandas , I have setup the aws cognito credential in the app and build the app.

I am able to run the application and see the BLE scanning page. When I tab the scan button the app, I am not able to see any BLE devices near me. I have checked with other mobile BLE application also like nRF connect. In the nRF connect app, I am able to scan ble devices near me. Is there any type of data filter in the demo application?

Please find attached demo application logs. freeRTOS_demo_log.txt

ravibhagavandas commented 4 years ago

Yes, by default the demo filters out all the devices which are not advertising with FreeRTOS service uuid 8a7f1168-48af-4efb-83b5-e679f932ff00. Do you have the nrf52840 device in advertising mode ?

Aditya-Jadoun commented 4 years ago

Hi @ravibhagavandas ,

YES, nrf52840 device is in advertising mode and working fine. Now, I am able to scan nRF52840 DK and make the connection over BLE. But after making BLE connection, I am getting some exceptions regarding MQTT connection.

Attaching logs for reference. android_log_mqtt_error.txt

Check this log and please provide some solution ASAP.

ravibhagavandas commented 4 years ago

From the error log, it seems the broker endpoint to which it is trying to connect is empty. Did you make sure to configure the IOT endpoint and thing name on the FreeRTOS Nordic project as mentioned in this documentation ?

abhidixi11 commented 2 years ago

I'm closing this issue, please feel free to open a new one.