jakkra / ZSWatch

ZSWatch - the Open Source Zephyrâ„¢ based Smartwatch, including both HW and FW.
https://forms.gle/G48Sm5zDe9aCaYtT9
GNU General Public License v3.0
2.17k stars 178 forks source link

Implement Chronos App support #257

Open jakkra opened 2 months ago

jakkra commented 2 months ago

I created a skeleton here: https://github.com/jakkra/ZSWatch/tree/jakkra_ble_chronos_app

Commands: https://github.com/fbiego/dt78/blob/master/DT78_COMMANDS.md

Find more info in https://github.com/jakkra/ZSWatch/issues/254

fbiego commented 2 months ago

I have forked the repo and will be working on it soon. Just a quick question, what name and service(s) does the watch advertise for ble discovery?

jakkra commented 2 months ago

I have forked the repo and will be working on it soon. Just a quick question, what name and service(s) does the watch advertise for ble discovery?

Just the NUS UUID. If you have a Linux computer you can run everything in Linux (even with Bluetooth) if you want to experiment :) https://github.com/jakkra/ZSWatch/blob/main/GETTING_STARTED.md#1-native-posix

Although Zephyr can be a bit daunting if you have not worked with it before.

fbiego commented 2 months ago

Yeah, haven't worked with Zephyr before but I'll try to set it up

fbiego commented 1 month ago

I haven't had any luck setting up Zephyr. Considering this, I'm contemplating rewriting the Chronos library in C.

jakkra commented 1 month ago

I haven't had any luck setting up Zephyr. Considering this, I'm contemplating rewriting the Chronos library in C.

I guess you turned on CPP support in Zephyr? If you rewrite it in c, I suggest having a port layer with transmit and receive functions, and then your target platform can implement those however suitable.

Something like I did here https://github.com/jakkra/ZSWatch/blob/main/app/src/ble/ble_transport.h That should make a c library quite flexible and portable.

fbiego commented 1 month ago

Hi @jakkra and @Kampi,

I have created PR #290, which still needs review, particularly regarding the implementation of the functions.

Could you please review the code and provide guidance on how to properly implement these functions? I'm currently unable to test on my end as I have not gotten Zephyr running yet.

jakkra commented 1 month ago

Hi @jakkra and @Kampi,

I have created PR #290, which still needs review, particularly regarding the implementation of the functions.

Could you please review the code and provide guidance on how to properly implement these functions? I'm currently unable to test on my end as I have not gotten Zephyr running yet.

Hi, very nice, I'm busy now for 2 days, but will look into it after that!