Is it possible to monitor multiple bands from a single app? - microsoft-band

Is it possible to have one app on the android or ios phone monitor 2 or more bands, Place tiles and respond to button/ accelerometer events? I did not see that in the docs.
Thanks

Yes, this is possible. It is a more advanced configuration so you must pair the Band's in the phone's BlueTooth Settings. Then when you query the SDK APIs for devices you iterate over the devices and create one connection per device. This should allow you to then communicate with each device from within one app.

Related

Need help for a deeper understanding of BLE

I have to write a BLE application on an embedded device and there are some features where I'm not sure if BLE supports that or whether I've to create some wrapper around everything or if it's maybe not possible at all. The gerenal descriptions of Bluetooth and BLE I found around the internet usually only cover the overall functionality but don't go in too much detail. If this post gets too complex I'll split it up into different smaller ones.
I use the STM32 BlueNRG-MS chip
1. Discoverability (resolved)
The user has to be able to disable the BLE function in case there are several devices in reach. I see that there are functions aci_gap_set_discoverable() or aci_gap_set_non_discoverable() but altough I set it to not discoverable I can still see it in the LightBlue App on my mobile. How would I correctly disable the BLE functionality of a device to make sure no one can see it or connect to it?
Update: Okay that has been a mistake from my end, if I call the aci_gap_set_non_discoverable() function it is actually undiscoverable. So that's fine.
2. Only accept connections of paired devices
I'd like to achieve a behavior such that, if you have an unpaired phone you have to set the BLE device into a pairing mode in order to connect. If the phone has already been paired, the BLE device shall accept the connection request regardless of whether it's currently in pairing mode or not. Is this what the whitelist should be there for or do I have to do this manually by saving the address of the device after successful pairing? If whitelist is the right approach, I read that newer phones cause issues with whitelisting because they change their address on a regular basis, how can I handle this? That's actually where I thought I'm gonna work with the "discoverability".
3. Automatically reconnect
I'm not sure if this topic has to be handled on the BLE device or on the mobile phone. E.g. my phone is paired with my car's radio, so whenever the phone is in the car it automatically connects - how is this done? It's still the phone that acts as central device I assume?

How do I program this BLE location tag?

I bought one of these:
https://www.aliexpress.com/item/Smart-finder-Key-finder-Wireless-Bluetooth-Tracker-Anti-lost-alarm-Smart-Tag-Child-Bag-Pet-GPS/32806261079.html
As far as I can tell it is a BLE (Bluetooth Low Energy) location tag.
I downloaded the app for it onto my iphone, and the app instantly recognised it and connected to it. The iPhone app seems to know how far away the tag is - it has a little map of the local area and says how many feet away. I was able to set the device name via the app, but I'm not sure if that set it locally or on the tag itself. The iPhone app also has a "find" button - when you press it, the tag beeps.
So I want to know how I can program this thing myself. I want to be able to identify it when it is nearby, connect to it and make it beep. I've searched for quite a while but not come up with much.
I'm assuming (wrongly/rightly?) that there is some general standard or approach for talking to these BLE location devices and carrying out the basic functions with them - but what is that standard - where is the documentation?
Does anyone have any idea how to program these BLE location tag devices?
BLE devices typically communicate using GATT, either using standard GATT services, or custom ones. The command to make it beep is probably implemented using a custom GATT service.
For finding out the distance to the beacon, typically the RSSI is used. This is a measure of the received power. It needs to be compared to the output power at the emitter. Usually beacons will put their output power in advertisement data, so it can be used without connecting to them. Here since the app is also able to send commands to the beacon, chances are it keeps a connection to it and has a custom GATT protocol to retrieve the output power.
Here is what I would suggest:
Read up on BLE, especially advertising and GATT. For instance read this for advertising and this for GATT. The full BLE spec is available here but should be used for reference and not introduction
Sniff the communication between your device and your phone. You can see this other answer of mine to get started
Replicate the communication protocol in you own app. For that you'll need to use your target platform's BLE libraries. For instance for iOS it is CoreBluetooth

Is there any standard way to make our own BLE accessory device auto re-connectable in iOS /Android?

I'm wondering whether or not we can make a specific BLE peripheral device with having this ability to be supported by iOS/Android for automatic scanning for automatic reconnecting, i.e without using any extra app.
I think some standard BLE accessory devices (like Heart sensor) are already known by smartphones, so after first-time pairing, the smartphone's OS itself will scan for finding them again automatically for re-connecting each time when the connection gets lost.
Yes. If the device is a HID device then the system will auto connect to the device until you disable it in Android and unpair it in iOS.
But what's the purpose if you don't have an app?

Is it possible to record external HDMI device in Android TV app?

For example, if there is a gaming console (i.e PlayStation) connected to HDMI input in a TV with Android TV. Then, is it possible to record the video going through this HDMI input with a 3rd party app?
In my question I'm referring to Android's TV input framework
Thanks for the helpers.
The TV Input Framework docs mentions that it supports TV recording APIs.
DVR
For devices on Android 7.0 and above, the TV App must support the
Android framework TV recording
APIs,
to support, list, and play recorded programs.
This allows device manufacturers to plug their DVR subsystems into TIF
and dramatically reduce the integration effort it takes to enable or
integrate DVR functionality on a TV device. It also enables third
parties to provide aftermarket DVR systems that can be plugged into an
Android TV device.
In addition to recording live content, the TV App also handles
resource conflict. For example, if the device has two tuners, it can
record two programs at the same time. If the user asks to record
three, the TV App must handle the conflict and should either surface a
notification or request that the user schedules a priority for these
requests.
However I don't have code samples for you as I haven't experimented with this yet.
Another approach would be to use the MediaProjection API and record this with a MediaRecorder. Jake Wharton's app Telecine follows this approach and you can find the source code on GitHub.
The benefit is that these APIs were introduced with Lollipop, so you can use them on all Android TV devices. However I just started experimenting with Android TV, so I can not tell from personal experiences.

Develop app so two mobile phones can directly communicate using their network sensor

Mobile phones are like radios which listen/broadcast on their bands. A mobile phone can connect to a base station and then to another mobile phone. Since the mobile phone has a range of 5 km, I would like to create an app that allows two devices to connect to each other without a base station.
Can anyone provide a reference to a book, online tutorial, website.. anything? Thanks in advance!
In current mobile phones, the radio used to communicate with the phone network is not under the direct control of the main CPU, where your application runs. It is controlled by a separate baseband processor, and the software on this is not typically user-updateable (often, it is not even updateable by the manufacturer of the phone!).

Resources