Receive accelerometer and gyroscope signals from smartwatch using BLE - java

I'm trying to develop an android app that should connect itself with a general smartwatch (miband, polar, etc.). In particular, I want to receive
accelerometer and gyroscope signals using Bluetooth.
I already read many articles about BLE but I didn't find any additional information about these signals. Does anyone know if it's possible to receive general signals like these? Is the solution feasible with any type of device?
Thanks for your help

Manufacturers of smartwatches generally don’t publish their bluetooth protocol. So even if it is theoretically possible, it is very hard to do it.
However, Some people reverse engineer the protocols and find ways to do it. Here is an article about how to get raw accelerometer and heartrate data from a MiBand device:
https://medium.com/machine-learning-world/how-i-hacked-xiaomi-miband-2-to-control-it-from-linux-a5bd2f36d3ad

First, you need to get the SDKs from the manufacturers. And use the SDKs to make your APP compatible with the smartwatches with different brand. It's really a giant and trivial work because you are not sure whether the manufacturers are willing to cooperate with you.

I found an app, that can connect to mi fit and offers additional tools for xiaomi bands. In the "Tools" section you can extract the accelerometer data, however there is no option for gyroscope
P.S. Sorry, the site is in Russian, hope you can figure it out ;)

Related

Is there a way to find out what a bluetooth LE device listens to?

I have a bluetooth LE device that is powered by its developer's app.
Sadly it is not maintained anymore and therefore I intend to rewrite the app from scratch.
Additionally it is not possible to pair to the device. It only listens to BLE.
Is it possible in any way to find out, how the device is being controlled?
I tried to decompile the code via JADX but since the manufacturer is chinese and decompilation already comes with its own problems, I thought if it would be possible to find it out without this procedure. (GitHub)App-Decompiled-Code (External)Original-APK-Download-Page
It depends what the device is really. There are number of profiles/services defined in the Bluetooth standard. If the device uses one of them then you could design from the specification rather than the device/app.
A good place to start is to use a generic Bluetooth Low Energy scanning and exploration tool such as nRF Connect to explore the device. Find out the UUIDs of the services and characteristics and compare it to the assigned 16-bit UUIDs values on https://www.bluetooth.com/specifications/assigned-numbers/
If it has a custom BLE profile/service then you can still use the nRF Connect app to explore it. If it is not obvious how to access the data or what commands need to be sent, then looking at the HCI logs on the phone after using the developer's app might be helpful.

Get the count of nearby android cellular devices using cellular signals

Is it somehow possible in Android to get a count of all the nearby devices which are in active state(i.e. connected to any cellular network)? By that I mean any cellular device which is powered on and installed with a working sim.
The reason why I ask this is because whatever answers I have found so far suggest making use of bluetooth, wifi, nearby or some other custom app. My intention is to just look for devices which are actively connected to a cellular network. Each time I see a device emitting/receiving cellular signals the counter gets incremented.
I tried looking into the Android API as well but could not find something which provides this functionality. NeighboringCellInfo gives information about the device(and its network) on which the app is installed. And this is the closest I could get.
I was thinking that if I can get information about nearby cellular carriers then getting information about nearby cellular device should also be possible. End of the day it's about catching radio waves coming out of something.
Thank you so much for your valuable time. Really appreciate your help!
P.S. : I'm not very not sure if my question makes sense to you all. Please let me know if additional information is needed. I actually come from a totally different background and this is the first time i'm trying to develop a mobile app. Please feel free to correct me if my understanding is wrong.

How to control a rc toy with Android app

I have a rc drone. I want to create an Android app to control it but I do not know where to begin and how. I browsed the internet and found only one useful tutorial but it required use of Adruino and was through Bluetooth but I want to create my own Android app and not use Adruino or Raspberry Pi. Please help
First you need to connect via bluetooth (If you have no documentation of your RC drone it will be had to figure out the commands etc).
Maybe you can find a bluetooth sniffer program on the www to record what is going on when using the original hardware.
But I think its not worth the effort. To figure all this out will most likely take a lot of time and might not lead to success at all. So I recommend: next time by a drone where the communication protocol is documented or better a SDK is provided with it.
First, you have to figure out, if this drone uses Wifi or Bluetooth for control, or, some custom- build wireless device. If it use custom adapter, working on another frequency, you won't be able to do anything from software, only reverse- engineer control schematics.

Is it possible to set pin programmatically for bluetooth pairing?

I have an application (however I'm testing using the sample bluetooth chat from the SDK) where two android devices connects each other, and exchange data.
I already have part of the pairing process hardcoded using the BT address, problem is: the dialog it appears to confirm the pin. Is there a way to make that work programmatically? The only thing that "appeared" to solve my problem was in this question, but that API is completely abandoned, has no documentation and many issues.
As fair as I know the problem is that if the device is not the device database with paired devices, without root access the standard API is always going to prompt the user, but I'm still wondering if there's a way.
Bluetooth autopairing is defined only for some devices. To change this you should rewrite Android framework. So, from the application, it seems to me, this is impossible to do.

Simple application that simulates a bluetooth accessory

I'm looking for a no-brain application that allows me to send a pre-defined list of commands through a bluetooth connection, or an equivalent Java/Scala library that works decently in OSX (64bits).
In short, I want to use my computer to "simulate" a bluetooth accessory, so I must be able to control the pairing, the exchanged code, and so on...
Thoughts?
Simulating jsr-82 can be done with the BlueCove Emulator Module:
http://bluecove.org/bluecove-emu/
http://bluecove.org/ works on OS/X and am sure there wouldn't be any issues with a 64bit OS.
I'd refer you to this Answer: https://askubuntu.com/questions/20195/bluetooth-emulator
You may want to reconsider your question...
To emulate a bluetooth device you would need to develop a bluetooth driver getting it's input from a different source, this would be far more complex than buying a real device.
If you are looking to get some NMEA data though, you may be interested in this:
Most bluetooth enabled phones have apps that do that:
Android: https://market.android.com/details?id=com.cajax.gps2bt2
Any J2ME: http://www.digitalmobilemap.com/bluetooth-gps-simulator-for-j2me-phone
Haven't found one for iPhone, only reference it can be done: http://spench.net/drupal/software/iphone-gps
Hope that helps!
Can you be more exact?
Simulate a Bluetooth accessory for ..?
There are different BT accessories for different smartphones...
Making a BT accessory for iPhone usually requires an authentication chip from Apple...I don't know if a Mac can do it, probably it could - however I'm pretty sure it couldn't describe itself as an accessory.
Accessories usually imply a piece of hardware, in my understanding at least.

Categories