aws / amazon-freertos-ble-ios-sdk Goto Github PK
View Code? Open in Web Editor NEWiOS SDK for FreeRTOS Bluetooth Devices
License: Apache License 2.0
iOS SDK for FreeRTOS Bluetooth Devices
License: Apache License 2.0
JSON structure is too heavy for BLE, optimization is needed.
CBOR is a good alternative http://cbor.io/spec.html
With PR #26 a new release needs to be cut for the pod file, any chance that we can get a new release?
Hi,
I have followed the instructions on how to set up the demo ios app (modified awsconfiguration.json, AmazonConstants.swift).
The build is successful. The app runs. I am able to create a new account, get SMS confirmation, and then login into the app. This is when I get the following exception:
2019-02-09 18:49:53.712659+0100 AmazonFreeRTOSDemo[18854:7075888] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull _fastCStringContents:]: unrecognized selector sent to instance 0x251c399b0'
Any suggestions?
Thanks.
Hello, we have a react-native project with AmazonFreeRTOS and Xcode 14.2. We are experience some issues with building releases:
Undefined symbols for architecture arm64:
"OBJC_CLASS$_AWSServiceConfiguration", referenced from:
objc-class-ref in AmazonFreeRTOSDevice.o
"OBJC_CLASS$_AWSEndpoint", referenced from:
objc-class-ref in AmazonFreeRTOSDevice.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Local Debug builds work with 50% chance. Sometimes we have to re-install Pods in order to fix the issues. But the main problem that we are using github actions for prod and because of that builds are always failing. And so far amazon-freertos-ble-ios-sdk
is the only package which outputs errors in our project with Xcode 14.2 but we really need it for our app. Would it be possible to fix those 2 errors? I know that you already had one Issue created on this topic but its already Closed + we tried everything from that source and nothing helped us. I also believe that the issue might be in the syntax (Swift/Objective-C) and not Cocoapods, because the same config works perfectly fine on Xcode 13. We are ready to provide more info about env if needed and also help with testing fixes and etc.
If I copy/paste the command from the instructions I get No such file or directory.
$ pod 'AmazonFreeRTOS', :git => 'https://github.com/aws/amazon-freertos-ble-ios-sdk.git'
-bash: https://github.com/aws/amazon-freertos-ble-ios-sdk.git: No such file or directory
Undefined symbols for architecture arm64:
"OBJC_CLASS$_AWSServiceConfiguration", referenced from:
objc-class-ref in AmazonFreeRTOSDevice.o
"OBJC_CLASS$_AWSEndpoint", referenced from:
objc-class-ref in AmazonFreeRTOSDevice.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I suspect this is a Mac M1 problem.
Can this be ported to Mac please, ASAP ?
Also, the project has so many warnings on AWS/Amazon libraries. Is that normal ?
Trying to build with Xcode 12.5
We were using 'WifiConfig' from 'Massimiliano Angelino' from the App store, but is seems to have vanished. Is there another published application in the app store (based on this project?) that allows me to provision WiFI on aws freertos devices?
If you call saveNetwork
with a network that has an SSID or a password that contains UTF character this results in a crash in the CBOR encoding library.
Here is the stack trace of the crash:
EXC_BREAKPOINT
amazon-freertos-ble-ios-sdk/AmazonFreeRTOS/SwiftCBOR/Extensions.swift:126:35 Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value amazon-freertos-ble-ios-sdk/AmazonFreeRTOS/SwiftCBOR/Extensions.swift:144:29 ascii_bytes.get merged @objc (extension in AmazonFreeRTOS):__C.NSNumber.encode() -> Swift.String amazon-freertos-ble-ios-sdk/AmazonFreeRTOS/SwiftCBOR/Encoder.swift:35:26 getIncludedEncodings amazon-freertos-ble-ios-sdk/AmazonFreeRTOS/SwiftCBOR/Encoder.swift:96:66 encode merged @objc (extension in AmazonFreeRTOS):__C.NSNumber.encode() -> Swift.String amazon-freertos-ble-ios-sdk/AmazonFreeRTOS/SwiftCBOR/CBOR.swift:16:22 encode amazon-freertos-ble-ios-sdk/AmazonFreeRTOS/AmazonFreeRTOSManager.swift encode amazon-freertos-ble-ios-sdk/AmazonFreeRTOS/AmazonFreeRTOSDevice.swift:292:38 saveNetwork
It looks like amazon-freertos-ble-ios-sdk uses a copy of https://github.com/hassan-shahbazi/CBORSwift as its CBOR implementation. Unfortunately it looks like this library is no longer being maintained. This CBOR implementation explicitly tries to parse strings using ASCII encoding as seen here: https://github.com/aws/amazon-freertos-ble-ios-sdk/blob/master/AmazonFreeRTOS/SwiftCBOR/Extensions.swift#L126 which is problematic.
One way to fix this is to update the SwiftCBOR implementation in this repo to handle UTF strings. But another option would be to switch to a Swift CBOR library that is actively maintained. What would you propose? Thanks.
I checked out the master branches of amazon-freertos and amazon-freertos-ble-ios-sdk and did the usual configuration setup, including everything described in issue #9.
When I run the example iOS demo app, I get the bluetooth pairing popup but I don't get the list of local Wi-Fi networks.
The last thing reported in the ESP32 console log is: Failed to allocate taskpool job for list network request
Am I missing some configuration setting, perhaps? I did enable IOT_BLE_ENABLE_WIFI_PROVISIONING
When calling AmazonFreeRTOSManager.shared.devices[uuid]?.saveNetwork() there is no return for that if the password is incorrect, this does not work in the demo app for iOS either. It would be very helpful if we could get that added to both so we can implement the same feature that the Android SDK already supports.
For the latest cocoapod version(which is 1.6.1), when we try to do pod install with the provided link:
pod 'AmazonFreeRTOS', :git => 'https://github.com/aws/amazon-freertos-ble-ios-sdk.git'
we get the SWIFT_VERSION missing issue.
I pair a new BLE device (ESP32 FreeRTOS), and I can read the secured values (eg Mtu). If I then disconnect the device from the UI, or close the app, and then connect to the device again, the app is unable to read the secured values.
I have to forget the device from the Bluetooth settings and pair it again for it to work
Requirement:
Problem:
setPin
method. However, in the iOS SDK, I haven't found a similar method that fulfills our requirement. It seems that there is no such method even in CBCentralManager.Here are some threads indicating that achieving this in iOS is not possible
We are using this SDK and would like to know how we can implement PIN-based authentication programmatically.
Please advise on how to proceed with this implementation.
When performing OTA, After device restart, the proxy should auto reconnect to the device and allow MQTT proxying.
Allow Large Object Transfer to be used by things other than MQTT proxy.
I checked out the Release-1.5 branch of the amazon-freetos project and built a version for the EPS32 board after doing the usual Thing/Cert/Policy creation using SetupAWS.py.
Next I checked out the beta branch of this project (amazon-freertos-ble-ios-sdk), modified AmazonConstants and awsconfiguration.json with the appropriate AWS/IoT IDs, and ran the demo app under Xcode.
The demo app runs fine and lets me create an account. It recognizes the ESP32 board. But when I try to use the Network Config feature, the app reports the following error:
2019-05-20 15:53:51.786156-0700 AmazonFreeRTOSDemo[1774:792997] [AFR][8D78F2FC-A4CF-8F6D-EA70-53B6E8C876EC][NETWORK][ERROR] NetworkConfig service or RXNetworkMessage characteristic doesn't exist
After poking around a bit, it looks like the NetworkConfig service is not being discovered in AmazonFreeRTOSManager.swift.
If intentional, maybe a bit confusing?
The function name starts with gat, which in BLE terms it could suggest GATT.
But the source comments suggest it should bet get:
/** Get afrVersion of the Amazon FreeRTOS
peripheral.... */ public func gatAfrVersionOfPeripheral(_ peripheral: CBPeripheral)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.