piggz / harbour-amazfish

Amazfit Bip support for SailfishOS
GNU General Public License v3.0
103 stars 51 forks source link

Add support for AsteroidOS watches #284

Closed sviscapi closed 7 months ago

sviscapi commented 11 months ago

Dear Adam,

Could you please add support for AsteroidOS watches to Amazfish ?

https://asteroidos.org

I tried https://github.com/AsteroidOS/starship but couldn't find a binary compatible with Sailfish OS 4.5 on aarch64.

Best regards,

Samuel

jmlich commented 11 months ago

From the documentation https://wiki.asteroidos.org/index.php/BLE_profiles it seems they are using different bluetooth services then was implemented in amazfish. Basically only battery service is the same. In theory, the libasteroid could be adjusted (and it doesn't look that difficult). In real world, some device is needed to debug it. I am not able to help with that unless you want to donate some device.

RelevanterUsername commented 10 months ago

as little contribution from my side I would like to point out that asteroidos support has been implemented in gadgetbridge and that code from there possibly could be used: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3013

robthebold commented 10 months ago

From the documentation https://wiki.asteroidos.org/index.php/BLE_profiles it seems they are using different bluetooth services then was implemented in amazfish. Basically only battery service is the same. In theory, the libasteroid could be adjusted (and it doesn't look that difficult). In real world, some device is needed to debug it. I am not able to help with that unless you want to donate some device.

I've got a spare device, if you're somewhere I can get it shipped without spending more than the thing is worth. (The watch lives in USA right now.) Lemme know if interested.

jmlich commented 10 months ago

I am in Czech Republic (EU). Please contact me at jmlich83@gmail.com

jmlich commented 9 months ago

I have first step of implementation here https://github.com/jmlich/harbour-amazfish/tree/asteroidos However, I am not able to debug it without device. There is only Battery Service right now, so don't expect too much. I even don't know if this works properly.

RelevanterUsername commented 9 months ago

I could test this, but I don't know how to install it. IS there a compiled rpm package or only the source available?

jmlich commented 9 months ago

I am making builds just for Ubuntu Touch. Currently, I don't have SailfishOS SDK installed. I guess some CI may help in that area https://github.com/piggz/harbour-amazfish/issues/313

jmlich commented 9 months ago

RPM packages are here https://github.com/jmlich/harbour-amazfish/actions/runs/7143123539

RelevanterUsername commented 9 months ago

I installed armv7 on my device, but cannot connect to watch (sturgeon with asteroidos). What is the correct order of doing the pairing? Or isn't this supposed to be working yet?

jmlich commented 9 months ago

Its blind implementation. There should be just pairing and battery service (it should show charge level on first page only). And I am not able to verify if this works properly

Recently, I was checking the pairing mechanism, and there is a filter of device name on the device pairing page which hides all devices without expected name (which is now set to AsteroidOS). Workaround is to click back to device selection and reopen the pairing page (it is probably bug, but now it is convenient - see #315). It seems all asteroid devices (bass, sturgeon, dory, ..) must be added to list separately.

I have created new commit to improve this filtering. See https://github.com/jmlich/harbour-amazfish/actions/runs/7205990724

RelevanterUsername commented 9 months ago

I installed the rpm and now was able to connect to my watch, but it disconnected immediately. I couldn't see if the battery service worked, because I don't know where I have to watch. Could the disconnect be related to an too old version of asteroidos on the watch? I didn't update at least for one year. Also the watch strangely thought it was connected to my PC and not my phone.

jmlich commented 9 months ago

I have no idea. You have to check logs. I expect I will be able to check it next week my self.

jmlich commented 8 months ago

There were number of errors. Please try newer version. I am not sure about pairing process, the smart watch shows pin, which is not handled by system agent. I was able to confirm pin using system wide bluetooth pairing in Ubuntu Touch. Is is not ready to use, but provides interface for future development.

RelevanterUsername commented 6 months ago

I'm super excited to be finally be able to use my asteroidos watch with sailfish. When will this be released?

robthebold commented 6 months ago

I'm super excited to be finally be able to use my asteroidos watch with sailfish. When will this be released?

If you're brave --as in willing to do a local install -- and eager to try it out now in its current state (which is "working" IMO) see @jmlich 's earlier post for the RPMs built with sfos support:

RPM packages are here https://github.com/jmlich/harbour-amazfish/actions/runs/7143123539