I have the following use case that I would like to understand if the edgeEngine can support
iOS app is connected to a BLE device
iOS app sets up edge engine and deploys a microservice
iOS app is backgrounded (At this point the edgeEngine is paused)
iOS app gets BLE message from device while in background
During #4, is it possible to wake up the edgeEngine to make calls via microservice?
Issue: Unable to make edge microservice API calls when the application is in the background.
Cause: edgeEngine Runtime is not running.
Remedy: It is the application’s responsibility to bring the application to the foreground when it needs to make API calls to the edge microservices. Therefor you can always call the mimik Client Library's startEdgeEngine before making the edge microservice calls.
Note: The mimik mimik Client Library helps with the process by automatically restarting the edgeEngine Runtime once the application comes back to the foreground.
Related
I have started to work with OpenThread with a Nordic DK.
I am working with the BLE/Thread coap example that I modified in order to be a FTD instead of a MTD. Also, on one of my devices, the CoAP is configured as a server.
I figured out that when I pushed the button nRF52840 DK board programmed as a CoAP server, the light of the other board changes which means that the otCoapSendRequest function works.
Isn't it supposed to only works on a client device ?
Is it a normal or just a small bug in the OpenThread function ?
I can't speak for OpenThread in particular, but it is common in CoAP that server functions are enabled in addition to client functions rather switching between client and server mode – so it's not unexpected that client features still work even though you enabled server features.
This is because CoAP is designed to have much code shared between client and server. The Web of Things architecture calls the resulting client-server nodes "servients" (server-clients).
Thanks for your answer.
I dug into the Nordic Code and found out that the CoAP init function creats services if the server mode is enable.
In my code I switch from server to client on a randomly elected main device and this switch seems not to remove the services, I guess this combine with what you said explains what I have.
My UWP C# application is by essence a headless one running in Win 10 IoT (current Insiders Preview build 10.0.17035.1000) on Raspberry Pi 3 SBC. Part of its functionality is to communicate with BLE devices. It is pretty stable but there are some UWP BLE communication problems I encounter. The most important one for now is that UWP BluetoothLEAdvertisementWatcher, after started and stopped multiple times, periodically gets in Aborted state on a Start command. The solution I currently use to recover from a pending Aborted state is to restart the device using ShutdownManager.BeginShutdown() method. Can you, please, advise me if there is a more elegant solution to recover the BluetoothLEAdvertisementWatcher to Started state.
I work with POS devices. We have a cross-platform mobile Xamarin App which talks to POS devices using Bluetooth or USB.It would be a great help if you can do that.
No you cannot, unfortunately the only way to interact with any device needed by the mobile client is through web requests. Unfortunately this is limited because no 1 BLE solution would work for everyone (actually it would only work for very few).
Another challenge is that the automated UI tests will run in the order determined by Xamarin Test Cloud and you may potentially have multiple devices interacting with your one device.
You could do this all locally though on your own device. You would just trigger the UITest locally through the command line and have the BLE device by your phone. I know this isn't ideal, but really one of your best options here.
The other option you have is creating a middle-man for your POS devices. Basically the middleman would be a REST API hosted on some IoT device that contains BLE integration. You would than have to forward the BLE requests from the IoT device to your POS device, but this solution would require larger time frames for the data to transfer and wouldn't necessarily be a "real-world" testing scenario. I would expect that you would have some false failure tests due to the details with creating this solution. I have done something similar for Particle, but I was only able to run UI Tests on 1 device at a time.
Disclosure: I work for Xamarin/Microsoft.
Anyone knows if external accessory can launch terminated apps in iOS?
The documentation, from Apple, says that "Declaring support for specific protocols lets the system know that your app can be launched when that accessory is connected".
So if my app register a protocol X, and I connect my iPhone to a bluetooth accessory that has that protocol (X), my app is launched, in background, even if is terminated (like CoreBluetooth)? And I can send commands to that accessory?
Thanks
I think it's clear from the External Accessory Programming Topics, which you quoted (copied below), that the app can be launched, meaning the app didn't need to be already running in the fore or background. However "launched" to me does not imply launched in the background, such as is done with the CoreBluetooth background modes, but rather, it means launched normally into the foreground.
Apps that are able to communicate with an external accessory must declare the protocols they support in their Info.plist file. Declaring support for specific protocols lets the system know that your app can be launched when that accessory is connected. If no app supports the connected accessory, the system may choose to launch the App Store and point out apps that do.
I am trying to find a clever way to keep a BLE app active in the background on iOS 6, without breaking any of Apple's rules. I plan to use the phone as a peripheral device and another BLE circuit as the central. My app will automatically be opened when a user arrives to a building using geofencing. After that the iPhone will connect to the first BLE central device it sees (the device will be in its white list). The user will then be able to move throughout the building switching to different BLE "nodes".
My question is: What do I need to do in the background when a user is stationary at their desk so that the app does not get suspended due to memory resources?
My idea is based on this solution for a separate problem: There could potentially (not regularly) be 10-50 users in an area with only a few BLE "nodes" and I read at bluetooth.org that I could setup a dynamic connection system, basically rotating connections through all the users.
My idea is to setup a similar dynamic system where the central device (not the iPhone) disconnects the device on regular intervals (30-40 minutes) and then the iPhone will reconnect.
Is this something that some feasible? Is this against the iOS development guidelines? I was unable to find anything explicit about this. I have also asked on the iOS developer forum, but unfortunately it is not as popular as this site.
Thanks in advance!
Xcode -> Project target -> Capabilities -> Enable background mode
Check Uses Bluetooth LE Accessories
Capabilities
Also enable the following key in .plist file
Required background modes
App communicates using CoreBluetooth
Plist