Comments (16)
Log is shared below for the first issue in above comment
Document.docx
from amazon-freertos-ble-ios-sdk.
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.
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.
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.
- 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.
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.
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.
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.
Correct me if I'm wrong, then there's 2 issues:
- Already paired device not showing up in device list -- some times
- 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.
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.
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.
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.
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
from amazon-freertos-ble-ios-sdk.
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.
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)
- Wi-Fi provisioning fails on ESP32 board with "Failed to allocate taskpool" error HOT 3
- Unable to access secure values after disconnecting from device HOT 7
- Return error when incorrect password is provided HOT 8
- CBOR encoding crashes when saving a network SSID with UTF characters HOT 5
- Get afrVersion spelled gatAfrVersionOfPeripheral HOT 2
- Trying to compile demo throws errors on unknown symbols for arm64 HOT 1
- XCode 13 / Swift 5.5 Support, Cut new release? HOT 2
- Replace JSON with CBOR for efficiency HOT 1
- Bluetooth is not getting connected in one go HOT 2
- Published (demo) app in appstore HOT 1
- Undefined symbols for architecture arm64 HOT 10
- Make Large Object Transfer as its own service and expose in SDK HOT 1
- Terminating app due to uncaught exception 'NSInvalidArgumentException' HOT 9
- https://github.com/aws/amazon-freertos-ble-ios-sdk.git: No such file or directory HOT 4
- Add auto reconnect on disconnect HOT 1
- pod is throwing the error: The SWIFT_VERSION is missing for "AWSMobileClient" & "CBORSWift". HOT 5
- Can't get WiFi provisioning demo to work with ESP32 board and Release 1.5 branch of amazon-freertos HOT 24
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-freertos-ble-ios-sdk.