Skip to content

stormluke/Mili-iOS

Repository files navigation

Mili-iOS

Mili (Xiaomi bracelet) iOS API and demo app. Current API based on firmware v1.0.3.0 (app v1.1.372).

screenshots

API Example

MLCentralManager *manager = [MLCentralManager initSharedManagerWithDelegate:nil];
[manager scanForMilisWithBlock:^(MLMiliPeripheral *mili, NSNumber *RSSI, NSError *error) {
    userInfo = ...;
    [manager stopScan];
    [mili connectWithUserInfo:userInfo block:^(MLMiliService *service, NSError *error) {
        [service readDeviceInfoWithBlock:^(MLDeviceInfoModel *deviceInfo, NSError *error) {
            NSLog(@"%@", deviceInfo);
        }];
    }];
}];

Please check MLCentralManager.h, MLMiliPeripheral.h, MLMiliService.h and the demo app for more details.

Note that current demo will use a fake user info for authentication, this will replace the old profile and cause mili vibrate (re-auth) when connected.

Mili BLE Wiki

See Characteristics.

TODO

  • Send firmware
  • More precise error
  • Separate API from demo app
  • Documents

Thanks

License

MIT

About

[DISCONTINUED] Mili (Xiaomi bracelet) iOS API and demo app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published