GithubHelp home page GithubHelp logo

Comments (16)

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Log is shared below for the first issue in above comment
Document.docx

from amazon-freertos-ble-ios-sdk.

jasonpcarroll avatar jasonpcarroll commented on July 16, 2024

Hi @Supriya-53679,
I will take a look.
If you could you provide me with some additional information it would be helpful:

  • Library version/commit used.
  • iOS version/Phone used
  • Hardware you are trying to connect with.
    Best,
    Jason Carroll

from amazon-freertos-ble-ios-sdk.

ravibhagavandas avatar ravibhagavandas commented on July 16, 2024

Hi @Supriya-53679

Could you elaborate the issue further ?

When trying ble connection no list is showing

What list are you talking about ? Is it the BLE scan list from the mobile phone before connection or the WiFi network scan list from the IoT device ?

In the logs above could you point out specific area of logs where the issue is ?

Additional please provide the information as jasonpcaroll mentioned

from amazon-freertos-ble-ios-sdk.

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Hi @ravibhagavandas

The ble list that I mentioned was the BLE scan list from the mobile phone. Also in the logs I have highlighted the issue as yellow.

from amazon-freertos-ble-ios-sdk.

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Hi @jasonpcarroll

  • Liibrary version for IOS(v1.4.0) and for android (v1.3.0)
  • IPhone XR and IOS version is 14.6
  • Esp 32 device

from amazon-freertos-ble-ios-sdk.

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Hi @ravibhagavandas Gentle Reminder! Please expedite this issue, and also please let me know if there is anything else required from my side.

from amazon-freertos-ble-ios-sdk.

dachalco avatar dachalco commented on July 16, 2024

Hey @Supriya-53679

Am trying to reproduce the issue, getting my hands on an iOS device. In the meantime, could you clarify for p.1:
The app starts a BLE scan, and does not list any devices? Or does it rather omit certain devices? If so, which?

from amazon-freertos-ble-ios-sdk.

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Hi @dachalco

If the BLE device is brand new( Not associated with mobile till now), there is no issue in BLE list and making the connection.

But if the device is already paired with mobile app and we want to reprovision the device by making the connection again, that time the issue happens. Sometimes, the device list is not coming and sometimes, even if the list comes, not able to connect with that device until i manually unpair from the mobile setting page.

I don't see it omitting any device in the list

from amazon-freertos-ble-ios-sdk.

dachalco avatar dachalco commented on July 16, 2024

@Supriya-53679

Correct me if I'm wrong, then there's 2 issues:

  1. Already paired device not showing up in device list -- some times
  2. Cannot connect to already paired device that's listed from scan.

And network provisioning is desired via the (AmazonFreeRTOSGattService.NetworkConfig UUID:a9d7166a-d72e-40a9-a002-48044cc30100)?

Debugging Questions/Info
Also, to clarify, to my knowledge neither AFR nor the iOS app have LTS releases.
The title is in reference to the FreeRTOS version used by AFR correct?
Which version of amazon-freertos are you running on the MCU device?
Are you running the unmodified demo, or is this in regard to a custom amazon-freertos application?
Can you provide MCU device logs and enable the BLE debug logs by setting IOT_LOG_LEVEL_GLOBAL as LOG_DEBUG. You can define this macro in your iot_ble_config.h if it's not already defined.

In the app, the reload icon at the top-left triggers a scan that will only list devices advertising the AmazonFreeRTOSGattService.DeviceInfo UUID:8a7f1168-48af-4efb-83b5-e679f932ff00. I'd like to understand how frequently the MCU is advertising the service, and verify whether it's sufficient to be reliably seen by the scan.

from amazon-freertos-ble-ios-sdk.

dachalco avatar dachalco commented on July 16, 2024

Hi @Supriya-53679

I think I may have reproduced the second issue. To validate, when it occurs do you get an error bubble with text similar to the following?

Failed to connect to peripheral with error: Peer removed pairing information

I don't see any such error in the provided log, though I think these may be separate.

Also curious, are you aware whether this has worked on other/previous versions of iOS? Specifically are you aware whether this worked as is for iOS 13?

from amazon-freertos-ble-ios-sdk.

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Hi @dachalco

Didn't see such messages and as for the testing, we have tested it on iOS 14 & 15 till now.

from amazon-freertos-ble-ios-sdk.

dachalco avatar dachalco commented on July 16, 2024

Hi @Supriya-53679

I'm having a difficult time reliably reproducing the issue. While I'm able to experience some issues when I mess around with RPA timeout on the MCU, I'm not certain that's what's happening on your end. Could you please provide the device log, with debug level logging, as detailed before.

Additionally, can you add a log of the BLE address types in the GAP event handler, for the the BLE_GAP_EVENT_CONNECT and BLE_GAP_EVENT_PAIRING_REQUEST cases? Something like the following, that outputs address type and address.

                ESP_LOGD( TAG, "\n\nour_id_addr (type=%d): %x-%x-%x-%x-%x-%x\n", 
                            desc.our_id_addr.type,
                            desc.our_id_addr.val[0],
                            desc.our_id_addr.val[1],
                            desc.our_id_addr.val[2],
                            desc.our_id_addr.val[3],
                            desc.our_id_addr.val[4],
                            desc.our_id_addr.val[5]
                            );

                ESP_LOGD( TAG, "\n\npeer_id_addr (type=%d): %x-%x-%x-%x-%x-%x\n", 
                            desc.peer_id_addr.type,
                            desc.peer_id_addr.val[0],
                            desc.peer_id_addr.val[1],
                            desc.peer_id_addr.val[2],
                            desc.peer_id_addr.val[3],
                            desc.peer_id_addr.val[4],
                            desc.peer_id_addr.val[5]
                            );

On the phone app, is it possible that the failed connection attempt is using a stale handle to a compatible BLE device? When attempting to re-connect to the device, how many device listings do you see from the scan?

from amazon-freertos-ble-ios-sdk.

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Hi @dachalco
I have attached the device logs below as mentioned and as of now we are seeing only single device id during re-connect. Also for the device logs, it was tested on:-
Android : Samsung GalaxyA71 , android version : 12,
iPhone XR , iOS 16.1

awsBLEConnection.docx

from amazon-freertos-ble-ios-sdk.

Supriya-53679 avatar Supriya-53679 commented on July 16, 2024

Hi @dachalco

Gentle Reminder! Please expedite this issue, and also please let me know if there is anything else required from my side.

from amazon-freertos-ble-ios-sdk.

dachalco avatar dachalco commented on July 16, 2024

Hi @Supriya-53679

In the log I noticed that at startup, the MCU is reporting

failed to configure restored IRK

IRK is the Identity Resolving Key. A BLE device can randomize its ID address with RPA, but all of its RPA addresses can be resolved to a single ID with the IRK that's shared when devices initially bond. It's my understanding that this version of iOS runs RPA by default, which changes the BLE ID address periodically and possibly when restarting Bluetooth.

Presumably the first BLE connection attempt in the provided MCU log is meant to stay connected, but without IRK to resolve to a recognized address, it would appear to the MCU as a new unfamiliar device that requires pairing. Could you add the similar peer_id_addr logs that print similar values as outlined above? The peer address type should confirm whether iPhone is using RPA address.

I've not been able to reliably reproduce the issue. I'm reviewing some ESP-IDF issues that were present around the time of this AFR release that may be relevant. But if you are not manually erasing the flash, the MCU should be able to restore the IRK without issue. Currently reviewing some ways you can further detail why IRK restore is failing via logs.

from amazon-freertos-ble-ios-sdk.

Related Issues (18)

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.