Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.75 KB

README.md

File metadata and controls

48 lines (34 loc) · 1.75 KB

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