Comments (3)
Trying to fix this too, though I'm trying to fix it on pangliangs library. Doesn't matter though as I'm sending the commands that I find here. I know of apps in the store that succesfully implement custom vibrations, so they should work!
Have you made any progress since opening this issue?
Edit:
I seem to be able to successfully trigger the standard 2-times vibrations and also the vibrate-until-stop. What I can't seem to do for some reason is make any of them stop...
from mi-band.
Can you please share how you trigger the vibration-until-stop?
From Elad Nava, this helped on original MiBand- Color Led:
public synchronized void notifyBandRepeated (final int flashColour, final int vibrateTimes, final int
waitDuration) {
List<BLEAction> list = new ArrayList<>();
byte[] colors = convertRgb(flashColour);
for (int i = 1; i <= vibrateTimes; i++) {
list.add(new WriteAction(Profile.UUID_SERVICE_VIBRATE, Profile.UUID_CHAR_ALERT_LEVEL, Protocol.VIBRATION_NEW_FIRMWARE));
list.add(new WriteAction(Profile.UUID_CHAR_CONTROL_POINT, colors));
list.add(new WaitAction(waitDuration));
}
queue(list);
}
from mi-band.
I'm currently much deeper inside the libraries, but the following is what I'm sending to my band:
Service: Profile.UUID_SERVICE_VIBRATE
Characteristic: Profile.UUID_CHAR_ALERT_LEVEL,
Data: new byte[] { 2 }
It makes my band with heart sensor (1S?) vibrate until I tap it (or almost, it keeps going for like a few seconds). For some reason betamalujes library (this) has byte[] VIBRATION_UNTIL_CALL_STOP = {0x8, 1};
which does not work for me. Maybe try changing this to what I used?
Edit:
Finally managed to stop the vibration above. It seems to be some problem with multi-threading. Anyways, to stop it I used the same service and characteristic as above, just sent new byte[] { 0 }
instead!
from mi-band.
Related Issues (16)
- Why not differ "TYPE_ACTIVITY" into walk and run? HOT 1
- Sync error : OncharacteristicWrite fail
- Mi Band 2 HOT 2
- Create plugin for cordova? HOT 1
- mi band 2 support?
- MI Band 2 Support
- Connected but Write Action returns false in all cases
- Q: Mi Band Sync Activity Data Protocol
- Method miBand.startListeningSync(actionCallback) do not work. HOT 2
- Invalid parameters UserInfo.create(UserInfo.java:74) HOT 4
- Vibration no longer working with new firmware HOT 15
- Rename resources to avoid conflict HOT 1
- Support for heart rate monitor of Mi Band Pulse? HOT 2
- Sync fail: data null HOT 2
- Cannot connect HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mi-band.