Access MI Band through Bluetooth - android

I am a new bee to the android world, smartwatches, fitness bands. I am basically a.NET web developer. Need possible ways to access MI band and its data through Bluetooth programmatically.
Can anyone please help me with related documentation links and sample application code links.
Thank you

The MI Band uses Bluetooth Low Energy (BLE) and you can start accessing its services using any generic BLE scanner app such as nRF Connect. You should find out what services the band offers and what kind of data it makes available.
After you found what you are looking for using a generic app you could start developing your own app/program. This part depends on the language you want to use. There are many BLE libraries and tutorials for different platforms available online.
I just found this library which allows you to access a Xiaomi MiBand4 from linux.

Related

can we use iBeacon to transfer data via bluetooth in iOS - android?

I want to know how iBeacon works actually. I found the sample code of AirLocate, but couldn't figure out how it works. iBeacon is works on BLE, so it may be possible for do data communication with other BLE supported devices via bluetooth?
As it possible to make data transfer between iOS - android device via bluetooth using BLE or beacon?
iOS had already announced iBeacon technology, but didn't find out any technical specification document regarding this. I also want to know how it works on android?
Can some one please describe about this technology and is it possible to make data-communication via bluetooth between iOS-iOS device, and iOS-Android Device?
No, you cannot communicate between devices using iBeacons because an iBeacons are transmit only. Mobile devices, both iOS and Android can both hear iBeacons, but they cannot talk back.
iBeacons work by transmitting a 3-part identifier and a transmitter power reference value every second (or more often.) That's it. They do nothing more. SDKs in iOS and Android listen for these signals and report them to your app, but the rest is up to the app developer.
What you suggest may be possible with a custom Bluetooth LE beacon, but it would need to be significantly more complex than an iBeacon, and you would have to build your own.
Here are a couple of links to give you more info:
How iBeacons work on Android from Radius Networks
iBeacon overview by Dave Addey
Full disclosure: I work for Radius Networks.

Transfer data between iOS and Android via Bluetooth?

I've been reading up on how to transfer data between iOS devices over Bluetooth using GameKit. I'm not writing a game, per se, but do have a need to transfer a small amount of binary data between two devices. Between two iOS devices, this is easy enough. However, I was wondering if it is possible to transfer data between an iOS device and an Android device via the same mechanism.
Has anyone come across documentation/tutorial that would explain how to do this? Is it even technically possible? Or has Apple put in some sort of restriction that would prevent this?
The other option I discovered was Bonjour over Bluetooth. Would this be a more suitable option for this type of operation?
This question has been asked many times on this site and the definitive answer is: NO, you can't connect an Android phone to an iPhone over Bluetooth, and YES Apple has restrictions that prevent this.
Some possible alternatives:
Bonjour over WiFi, as you mentioned. However, I couldn't find a comprehensive tutorial for it.
Some internet based sync service, like Dropbox, Google Drive, Amazon S3. These usually have libraries for several platforms.
Direct TCP/IP communication over sockets. (How to write a small (socket) server in iOS)
Bluetooth Low Energy will be possible once the issues on the Android side are solved (Communicating between iOS and Android with Bluetooth LE)
Coolest alternative: use the Bump API. It has iOS and Android support and really easy to integrate. For small payloads this can be the most convenient solution.
Details on why you can't connect an arbitrary device to the iPhone. iOS allows only some bluetooth profiles to be used without the Made For iPhone (MFi) certification (HPF, A2DP, MAP...). The Serial Port Profile that you would require to implement the communication is bound to MFi membership. Membership to this program provides you to the MFi authentication module that has to be added to your hardware and takes care of authenticating the device towards the iPhone. Android phones don't have this module, so even though the physical connection may be possible to build up, the authentication step will fail. iPhone to iPhone communication is possible as both ends are able to authenticate themselves.
Maybe a bit delayed, but technologies have evolved since so there is certainly new info around which draws fresh light on the matter...
As iOS has yet to open up an API for WiFi Direct and Multipeer Connectivity is iOS only, I believe the best way to approach this is to use BLE, which is supported by both platforms (some better than others).
On iOS a device can act both as a BLE Central and BLE Peripheral at the same time, on Android the situation is more complex as not all devices support the BLE Peripheral state. Also the Android BLE stack is very unstable (to date).
If your use case is feature driven, I would suggest to look at Frameworks and Libraries that can achieve cross platform communication for you, without you needing to build it up from scratch.
For example: http://p2pkit.io or google nearby
Disclaimer: I work for Uepaa, developing p2pkit.io for Android and iOS.
You could use p2pkit, or the free solution it was based on: https://github.com/GitGarage. Doesn't work very well, and its a fixer-upper for sure, but its, well, free. Works for small amounts of data transfer right now.

Rhomobile, BLE112 Bluetooth device - iOS and android app

I have been searching for a while now and decided to post a question here to see if someone had already traveled down this specific road.
I am developing a bluetooth enabled device, using the Bluegiga BLE112 chip. They announce this chip to be easily used with iOS devices (and this was our main reason for choosing it)
The device will need to communicate with an App, that we need to be developed for iOS, Android, Windows Phone, and Blackberry. Due to this need, I've decided to use Rhomobile, as it seems to be the only one that supports developing BT apps for iOS without having to develop further plugins.
I only need to send small messages (like commands, small strings) and sometimes a bigger file to the device's internal memory.
On Rhomobile's BT documentation, they state that for iOS it is only possible to comunicate between iOS devices ( i'm thinking that they say this because of the MiFi limitations imposed by Apple, but that using Bluegigas chip are not a problem...)
My question is:
Since Bluegiga's documentation has examples of devices communicating with iOS using their chip, i should be able to develop using Rhomobile and not suffer from the limitation stated above. I wanted to be as sure as possible before making my company spend money ordering the chips and development board and what not..
Has anyone tried this, is my thinking missing something?
Thank you all for your time.
Daniel
Good Question, I think I can understand the reason for your confusion.
The main reason is many people/products/frameworks does not clearly mention if they are talking about Bluetooth Classic or Bluetooth Low Energy (BLE).
These are both 2 different things and even thougfh they are called "Bluetooth" one cannot talk to the other.
(Some devices can be both Classic and Bluetooth Low Energy, which allows it to connect to either types)
Ok now comming to your Question :
THE bluegiga dongle is BLE
The Rhomobile is refering to the Bluetooth Classic version of the API.
On iOS the BLE APIs are open to applications, but Classic is limited on iOS , one way for Apps to use Classic Bluetooth on iOS is via the Gamekit APIs but that is possible only when talking with iOS devices, so it wont connect to another Android or Win device that is also Classic.
Needless to say with BLE APIs you cannot connect to calssic anyways.
The bluegiga examples are BLE examples, and apple also has good documentation and examples / samples on how to use BLE so yes it is easy to build a device and app using BLE on iOS.
There is nothing special abut any particular chip yo ucan use any BLE chip - there are many vendors today.
BUT Android (and I guess Windows as well) does not yet have BLE APIs for applications to use :( (Bit I think is is comming soon :))
So I hope this clears things up a bit.

Can android phones exchange application data directly through mobile networks?

i'm thinking of building an application which will requires communication between 2 android devices. I'm trying to establish a direct connections between 2 devices through the data plan (internet?).
Is it possible or i have to go through server?
You could probably use ZeroConf or if the devices are close together Bluetooth. What are you trying to do? It is highly probable someone has built something already that you can use, for example there are various companies offering multiplayer SDKs.

File transfer between android and iPhone via bluetooth?

I was thinking of developing an iPhone and android application so that they can share data between each other via bluetooth. Is it possible? If yes how?
Thanks for your help
The Question from user1080731 was - Is it possible to transfer Files Via Bluetooth between Android and iPhone.
And I think that the answer is NO.
The App referred to in the previous responses does not seem to use Bluetooth (the App's description is misleading)
In the demo video for the app - It used Bluetooth when talking between 2 iOS devices, but uses WiFi when talking between Android and iPhone.
in iOS the only possibility is to use the GameKit APIs (primarily meant for peer to peer gaming) to talk to other iOS device using Bluetooth. So you can potentially write an App over this API to do file transfer between iOS devices, (But Gamekit will not work for iOS to Android)
You can use File Transfer Profile of bluetooth for transferring files between bluetooth devices. This is generic for bluetooth not for Operating system(Android, iOS, Windows, etc.).
Coming to your requirement, in both Android and iOS the framework will provide API to use the bluetooth profiles. Just read about bluetooth profiles and OS framework you will get ideas to design your app.
If you are interested, see the Bluetooth Chat App available at Android Developers website, you will get good knowledge about how to use bluetooth in Android. But i don't know about iPhone(iOS) framework. I experienced the bluetooth in Android and at firmware development for embedded products. If you want more in formation about bluetooth profiles see this link
I hope it may help you.

Categories

Resources