May 7
MI BAND 2 laiko nuskaitymas BT Linux
Pradžiai prasiskenuojam BT įrenginius ir randam miband2 device MAC adresą kuris reikalingas prisijungimui.
sudo hcitool lescan
Pabandom prisijungti prie Mi Band 2 ir surasti visus galimus servisus ir charakterisitikas
sudo bluetoothctl
connect E2:C0:EC:AE:88:57
arba
pair E2:C0:EC:AE:88:57
menu gatt
list-attribute E2:C0:EC:AE:88:57
Jeigu pavyksta prisijungti gaunam visus servisus
milvis@ubuntu:~$ sudo bluetoothctl
Agent registered
[bluetooth]# connect E2:C0:EC:AE:88:57
Attempting to connect to E2:C0:EC:AE:88:57
[CHG] Device E2:C0:EC:AE:88:57 Connected: yes
Connection successful
[CHG] Device E2:C0:EC:AE:88:57 ServicesResolved: yes
[MI Band 2]# menu gatt
Menu gatt:
Available commands:
-------------------
list-attributes [dev] List attributes
select-attribute <attribute/UUID> Select attribute
attribute-info [attribute/UUID] Select attribute
read [offset] Read attribute value
write <data=xx xx ...> [offset] Write attribute value
acquire-write Acquire Write file descriptor
release-write Release Write file descriptor
acquire-notify Acquire Notify file descriptor
release-notify Release Notify file descriptor
notify <on/off> Notify attribute value
register-application [UUID ...] Register profile to connect
unregister-application Unregister profile
register-service <UUID> Register application service.
unregister-service <UUID/object> Unregister application service
register-includes <UUID> Register as Included service in.
unregister-includes <Service-UUID><Inc-UUID> Unregister Included service.
register-characteristic <UUID> <Flags=read,write,notify...> Register application characteristic
unregister-characteristic <UUID/object> Unregister application characteristic
register-descriptor <UUID> <Flags=read,write...> Register application descriptor
unregister-descriptor <UUID/object> Unregister application descriptor
back Return to main menu
version Display version
quit Quit program
exit Quit program
help Display help about this program
export Print evironment variables
[MI Band 2]# list-attributes E2:C0:EC:AE:88:57
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052
0000fee1-0000-1000-8000-
00805f9b34fb
Anhui Huami Information Technology Co.
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0064
0000fec1-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0064/
desc0066
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0062
0000fed3-0000-1000-8000-
00805f9b34fb
Apple, Inc.
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0060
0000fed2-0000-1000-8000-
00805f9b34fb
Apple, Inc.
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char005e
0000fed1-0000-1000-8000-
00805f9b34fb
Apple, Inc.
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char005c
0000fed0-0000-1000-8000-
00805f9b34fb
Apple, Inc.
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char005a
0000fedf-0000-1000-8000-
00805f9b34fb
Design SHIFT
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0058
0000fede-0000-1000-8000-
00805f9b34fb
Coin, Inc.
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0056
0000fedd-0000-1000-8000-
00805f9b34fb
Jawbone
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0053
00000009-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0052/char0053/
desc0055
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d
0000fee0-0000-1000-8000-
00805f9b34fb
Anhui Huami Information Technology Co.
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char004f
00000010-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char004f/
desc0051
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char004c
00000008-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char004c/
desc004e
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0049
00000007-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0049/
desc004b
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0046
00000006-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0046/
desc0048
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0043
00000005-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0043/
desc0045
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0040
00000004-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0040/
desc0042
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char003d
00002a04-0000-1000-8000-
00805f9b34fb
Peripheral Preferred Connection Parameters
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char003d/
desc003f
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char003a
00000003-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char003a/
desc003c
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0037
00000002-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0037/
desc0039
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0034
00000001-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0034/
desc0036
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0031
00000020-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char0031/
desc0033
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char002e
00002a2b-0000-1000-8000-
00805f9b34fb
Current Time
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service002d/char002e/
desc0030
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0027
0000180d-0000-1000-8000-
00805f9b34fb
Heart Rate
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0027/char002b
00002a39-0000-1000-8000-
00805f9b34fb
Heart Rate Control Point
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0027/char0028
00002a37-0000-1000-8000-
00805f9b34fb
Heart Rate Measurement
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0027/char0028/
desc002a
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0024
00001802-0000-1000-8000-
00805f9b34fb
Immediate Alert
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0024/char0025
00002a06-0000-1000-8000-
00805f9b34fb
Alert Level
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service001d
00001811-0000-1000-8000-
00805f9b34fb
Alert Notification Service
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service001d/char0021
00002a44-0000-1000-8000-
00805f9b34fb
Alert Notification Control Point
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service001d/char0021/
desc0023
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service001d/char001e
00002a46-0000-1000-8000-
00805f9b34fb
New Alert
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service001d/char001e/
desc0020
00002901-0000-1000-8000-
00805f9b34fb
Characteristic User Description
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0017
00001530-0000-3512-2118-
0009af100700
Vendor specific
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0017/char001b
00001532-0000-3512-2118-
0009af100700
Vendor specific
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0017/char0018
00001531-0000-3512-2118-
0009af100700
Vendor specific
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0017/char0018/
desc001a
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service000c
0000180a-0000-1000-8000-
00805f9b34fb
Device Information
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service000c/char0015
00002a50-0000-1000-8000-
00805f9b34fb
PnP ID
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service000c/char0013
00002a23-0000-1000-8000-
00805f9b34fb
System ID
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service000c/char0011
00002a28-0000-1000-8000-
00805f9b34fb
Software Revision String
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service000c/char000f
00002a27-0000-1000-8000-
00805f9b34fb
Hardware Revision String
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service000c/char000d
00002a25-0000-1000-8000-
00805f9b34fb
Serial Number String
Primary Service
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0008
00001801-0000-1000-8000-
00805f9b34fb
Generic Attribute Profile
Characteristic
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0008/char0009
00002a05-0000-1000-8000-
00805f9b34fb
Service Changed
Descriptor
/org/bluez/hci0/dev_E2_C0_EC_
AE_88_57/service0008/char0009/
desc000b
00002902-0000-1000-8000-
00805f9b34fb
Client Characteristic Configuration
[CHG] Device E2:C0:EC:AE:88:57 ServicesResolved: no
[CHG] Device E2:C0:EC:AE:88:57 Connected: no
[CHG] Device E2:
Susirandam Current Time charakterisiką
Bandom nuskaityti nuo pradžių pirma prisijungimas tada nuskaitom reikiamą charakterisiką
select-attribute /org/bluez/hci0/dev_E2_C0_EC_AE_88_57/service002d/
sudo bluetoothctl
connect E2:C0:EC:AE:88:57
arba
pair E2:C0:EC:AE:88:57menu gatt
select-attribute /org/bluez/hci0/dev_E2_C0_EC_AE_88_57/service002d/read
Ir taip atrodo konvertuota data ir laikas:
No comments
No Comments
Leave a comment