HansW121 wrote on September 23, 2019:
HI
I am trying to run the BLE FreeRTOS demo with the Nordic nRF52840-DK reference HW and the Android phone.
https://docs.aws.amazon.com/freertos/latest/userguide/ble-demo.html#ble-demo-mqtt
Running the Nordic code I get the following output:
0 0 [iot_thread] [INFO ][DEMO][0] ---------STARTING DEMO---------
The RAM must start at 200046f8, it’s size must be 3b908
1 0 [iot_thread] [INFO ][INIT][0] SDK successfully initialized.
2 2 [iot_thread] [INFO ][DEMO][20] No networks connected for the demo. Waiting for a network connection.
3 10957 [BLE] [ERROR][BLE_HAL][109570] sd_ble_gattc_exchange_mtu_request() on connection 0x0 returned busy, will retry.
4 10957 [BLE] [INFO ][DEMO][109570] BLE Connected to remote device, connId = 0
5 10957 [iot_thread] [INFO ][DEMO][109570] Successfully initialized the demo. Network type for the demo: 2
6 10957 [iot_thread] [INFO ][MQTT][109570] MQTT library successfully initialized.
7 10957 [iot_thread] [INFO ][DEMO][109570] MQTT demo client identifier is ADI_BLE_Demo_Thing (length 18).
8 10998 [InputTask] Numeric comparison:328071
9 10998 [InputTask] Press ‘y’ to confirm
y
10 13957 [iot_thread] [ERROR][NET_BLE][139570] Failed to create BLE network connection after 30000 milliseconds.
11 13957 [iot_thread] [ERROR][MQTT][139570] Failed to establish new MQTT connection, error NETWORK ERROR.
12 13957 [iot_thread] [ERROR][DEMO][139570] MQTT CONNECT returned error NETWORK ERROR.
13 13957 [iot_thread] [INFO ][MQTT][139570] MQTT library cleanup done.
14 13957 [iot_thread] [ERROR][DEMO][139570] Error running demo.
15 13957 [iot_thread] [INFO ][INIT][139570] SDK cleanup done.
16 13957 [iot_thread] [INFO ][DEMO][139570] -------DEMO FINISHED-------
17 13995 [BLE] [ERROR][BLE_HAL][139950] Failed to secure connection. Disconnecting.
18 13997 [BLE] [INFO ][DEMO][139970] BLE disconnected with remote device, connId = 0
19 13997 [BLE] [ERROR][DEMO][139970] Failed to create subscription task for network: 2, state: 1, error:
20 31967 [BLE] [ERROR][BLE_HAL][319670] UNKNOWN BLE EVENT 38.
Running the app on android I get the following output:
C:\Users\hans_\backup\AWS\Nordic\amazon-freertos-ble-android-sdk-master\amazon-freertos-ble-android-sdk-master\app>gradlew installDebug
02:20:22 V/ddms: execute: running am get-config
02:20:24 V/ddms: execute ‘am get-config’ on ‘42001d8dc23283b3’ : EOF hit. Read: -1
02:20:24 V/ddms: execute: returning
Installing APK ‘app-debug.apk’ on ‘SAMSUNG-SM-J320A - 6.0.1’ for app:debug
02:20:24 D/app-debug.apk: Uploading app-debug.apk onto device ‘42001d8dc23283b3’
02:20:24 D/Device: Uploading file onto device ‘42001d8dc23283b3’
02:20:24 D/ddms: Reading file permision of C:\Users\hans_\backup\AWS\Nordic\amazon-freertos-ble-android-sdk-master\amazon-freertos-ble-android-sdk-master\app\build\outputs\apk\debug\app-debug.apk as: rwx------
02:20:25 V/ddms: execute: running pm install -r -t “/data/local/tmp/app-debug.apk”
02:20:40 V/ddms: execute ‘pm install -r -t “/data/local/tmp/app-debug.apk”’ on ‘42001d8dc23283b3’ : EOF hit. Read: -1
02:20:40 V/ddms: execute: returning
02:20:40 V/ddms: execute: running rm “/data/local/tmp/app-debug.apk”
02:20:40 V/ddms: execute ‘rm “/data/local/tmp/app-debug.apk”’ on ‘42001d8dc23283b3’ : EOF hit. Read: -1
02:20:40 V/ddms: execute: returning
Installed on 1 device.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 22s
27 actionable tasks: 1 executed, 26 up-to-date
C:\Users\hans_\backup\AWS\Nordic\amazon-freertos-ble-android-sdk-master\amazon-freertos-ble-android-sdk-master\app>
I try to pair the nRF5 bluetooth device on my android but it does not seem like that succeeds. When the Segger Studio serial terminal emulator asks for the bluetooth connection
8 2904 [InputTask] Numeric comparison:614809
9 2904 [InputTask] Press ‘y’ to confirm"Press ‘y’ to confirm
I try to type in the ‘y’ character, but it does not seem to have any effect.
I am not really sure what is going wrong? Does anyone have an idea on this?
Thanks.