ZEPP OS3 BLE functionality #291
bigdigital
started this conversation in
Developer Feedback
Replies: 1 comment 1 reply
-
hello @bigdigital , thanks for your kindly feedback. the 1# and 2# issue I will check and share later. about 3# issue, actually, only scan operation is forbidden in BG service, other operation like connect, build profile, and data interaction are allowed, you and try can check it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I've been trying to implement direct communication with a BLE device. During my attempts to communicate with the device, I discovered the following issues:
The current BLE functionality does not allow writing to a characteristic with the ATT_WRITE_CMD opcode (0x52). When using the hmBle.mstWriteCharacteristic function, it sends the data with the ATT_WRITE_REQ opcode (0x12). Unfortunately, without this operation, my testing device simply does not receive data, making it impossible to use for direct communication. Additionally, the ATT_WRITE_CMD transfer method is much faster because it does not require a reply from the slave device. Maybe it is possible to add an option for mstWriteCharacteristic to write data as ATT_WRITE_CMD?
I also found that when configuring a descriptor as an indication (by configuring CCCD with [02, 00] data), there is no confirmation reply from the watch with the opcode ATT_HANDLE_VALUE_CFM (0x1E).
Furthermore, I observed that currently, the master BLE functionality does not work in the background service (BG service). I recall you mentioning that this is intentional to save battery life. However, I am certain that there are scenarios where BLE functionality in BG service would be the sole means of communication. Also usually it is not necessary to keep the Bluetooth connection open all the time. For example, the device I'm trying to communicate with wakes up every 5 minutes for only 5 seconds (a Glucose sensor). Since the interval is always the same, it is possible to start the BG service by a timer just a few seconds before the sensor wakes up, perform data transfer silently in the background, and then end the service. Without support for BLE transfer in BG service, one needs to open the app using the timer, potentially interrupting some active apps. Additionally, opening the app will activate the watch screen, which reduces battery life more than using the BG service. I hope it would be possible to activate BLE in BG service in the future.
Beta Was this translation helpful? Give feedback.
All reactions