Page 1 of 1

Xiaomi MI Band 4 - Can you create an apt?

Posted: 2020-07-15 14:14
by Scorpion
I' m struggling over anbox and virt-manager, I would like a native debian apt for that hardware.
Synchronizing it with the pc instead of the phone.

Can you make it?

Edit: For apt I meant app(lication).

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

Posted: 2020-07-16 04:32
by stevepusser
I'm not even sure what you're trying to ask...

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

Posted: 2020-07-16 06:28
by Scorpion
Xiaomi MI Band 4 is a smart watch that has sleep and hear rate monitoring function. It only has the bluetooth to communicate.

You can view the stats only on the android app "Mi Fi" https://play.google.com/store/apps/deta ... alth&hl=en and you can change some setting only there.
Or in another compatible app like "Tools & Mi Band", I never tried it.

So I need a virtual machine that has also the bluetooth, but a native debian apt would be the best.

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

Posted: 2020-07-16 08:07
by pylkko
what is a "Debian native apt"?

There are a few fully open and hackable smart watches out there. But most of them are not. There are some where you can flash the firmware, and thus replace the one the manufaturer offers with a free one.

Even though the non-open ones use bluetooth low energy, which allows to send data out and read without pairing, some of them are encrypting the stream. If it is not, you can read it with a BLE app.

I googled "mi band 4 and open source" and found a link to a sofware developed by research group called ICT innovations in Health Care, Windesheim University of Applied Sciences.
https://github.com/ictinnovaties-zorg/openwindesheart

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

Posted: 2020-07-16 10:12
by eriefisher
It would likely be easier to buy a cheap android phone. After all it's meant t be portable.

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

Posted: 2020-07-16 14:41
by Scorpion
"Debian native apt"= apt that I can install with apt install <apt>.
Or at least is an apt designed for linux and not for android.

I did some searches to see if is possible to use the pc, I found nothing.

I can see on your link:
The features have been tested with Android/iOS phones in combination with the Mi Band 3/Xiaomi Band 3.
After there is the section for the Band 4 but I suppose is for the phone, I want to use the pc.

It would likely be easier to buy a cheap android phone. After all it's meant t be portable.
Is it meant to be portable? I want to use it on the pc at home.

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

Posted: 2020-07-17 06:32
by pylkko
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

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

Posted: 2020-07-17 09:14
by Dai_trying
My *guess is that you want to create an apt-mirror to have all your required .deb files available from a local computer/server, I have this set up for my AMD64 systems and it was not too difficult to set-up after reading the manuals.

https://packages.debian.org/buster/apt-mirror

* difficult to understand exactly what you want

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

Posted: 2020-07-17 13:52
by cuckooflew
Scorpion wrote:I' m struggling over anbox and virt-manager, I would like a native debian apt for that hardware.
Synchronizing it with the pc instead of the phone.

Can you make it?
"Can you make it?"

Sounds like the OP wants you, or someone else on the forum to make it for them...... :?:
I would get busy with it, but am not feeling well at all, guess that would be another topic for "off topic" though :cry:

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

Posted: 2020-07-17 17:12
by Scorpion
It seems so, I would like the debian developers to do that. Aren' t they the most suited?

Where should I ask?

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

Posted: 2020-07-17 17:19
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
Yes I mean a debian package, with apt I meant a (debian) ApPlicaTion.

I will check this project, I will borrow a phone eventually for that time that you need it, thanks.

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

Posted: 2020-07-17 17:32
by RU55EL
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.

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

Posted: 2020-07-18 16:57
by stevepusser
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!

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

Posted: 2020-07-18 22:55
by cuckooflew
Scorpion wrote:It seems so, I would like the debian developers to do that. Aren' t they the most suited?

Where should I ask?
https://www.debian.org/contact
Debian Development

If you have questions that are more development related, there are several development mailing lists in Debian that you can use to contact our developers.

The general development mailing list is debian-devel: you cansubscribe to it and then send e-mail to debian-devel@lists.debian.org.

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

Posted: 2020-07-19 02:18
by stevepusser
The standard procedure is to use reportbug to file a bug report against it asking that it be packaged. I think the acronym for it is "WNP". You are asked to provide as much information as possible about it, be clear in that, and you should use standard terms for what you mean.

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

Posted: 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?

Posted: 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?

Posted: 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.