Page 2 of 2

Re: Xiaomi MI Band 4 - Can you create an apt?

PostPosted: 2020-07-20 17:03
by RU55EL
stevepusser wrote:
RU55EL wrote:
Scorpion wrote:Yes I mean a debian package, with apt I meant a (debian) ApPlicaTion.


The Debian program apt is an Advanced Package Tool, not an ApPlicaTion.


Yes, apt is already taken. It only leads to confusion when you use it for something else in the Debian forum, like if I asked for a deb file, only to explain later I meant a "Dynamic Equilibrium Brake" configuration file--Guh!


Just for fun I looked up abbreviations for 'application'. APT wasn't listed among the 11 abbreviation variations, at least at the first place I looked.

[edit] 'apt' does have quite the list. [/edit]

Re: Xiaomi MI Band 4 - Can you create an apt?

PostPosted: 2020-07-21 06:39
by Scorpion
Yes, I used apt for application (instead of app) because of the Advanced Package Tool, but it only leads to confusion.

Can someone make a debian package to obtain the authentication key? And then maybe add it to the https://github.com/satcar77/miband4/issues/new.

Re: Xiaomi MI Band 4 - Can you create an apt?

PostPosted: 2020-07-28 17:32
by Scorpion
pylkko wrote:apt is a package manager, you probably mean a debian package like a .deb-file.

I researched the mi band 4 a bit more and it appears that you can indeed read the ble characteristics despite them being encrypted. apparently you need to do the first ever pairing with the native app, and this allows you to fetch the key. after this you can just read it like a book.

Bluetooth low energy is different from the standard bluetooth protocol, in the sense that you do not need to pair the device, the device can send out pulses of data. For example, a watch can read your pulse with a sensor and broadcast this out every 5 seconds. Then any device near that has a ble device can read them (there are multiple apps for reading ble signals in app stores).

Here is a python library for that purpose. it even comes with a ready made console program with a pseudo-graphical interface (similar to ncurses)

all you need to do is install a package with apt, clone the code and get your key (the instructions are on the github page)

https://github.com/satcar77/miband4

I got the key but that project doesn' t have the band settings, sleep monitoring and more.
Most of the functions are available on the band.

Can someone use https://codeberg.org/Freeyourgadget/Gadgetbridge to create a debian package?
It is an open source app, available also on github.