Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to monitor the eigenvalue changes of low-power Bluetooth devices in Mini Program development

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article "how to monitor the eigenvalue changes of low-power Bluetooth devices in Mini Program development" is not understood by most people except programmers. Today, in order to make you better understand "how to monitor the eigenvalue changes of low-power Bluetooth devices in Mini Program development", I summarize the following contents, which have a certain reference value, the detailed steps are clear, and the details are handled properly. I hope you can get something from this article. Let's take a look at the details.

Listen for eigenvalue changes of low-power Bluetooth devices. The notify interface must be enabled before you can receive the notification pushed by the device.

CALLBACK parameter description:

Parameter type description: deviceIdString Bluetooth device id. Refer to device object serviceIdString eigenvalue the service uuidcharacteristicIdString eigenvalue the latest eigenvalue of uuidvalueArrayBuffer eigenvalue (Note: vConsole cannot print ArrayBuffer type data)

Sample code:

/ / ArrayBuffer to 16 progress string example function ab2hex (buffer) {var hexArr = Array.prototype.map.call (new Uint8Array (buffer), function (bit) {return ('00' + bit.toString (16). Slice (- 2)}) return hexArr.join ('') } wx.onBLECharacteristicValueChange (function (res) {console.log (`characteristic ${res.characteristicId} has changed, now is ${res.value} `) console.log (ab2hext (res.value)) what does Mini Program mean? Mini Program is an application that can be used without download or installation. It can be used immediately by scanning QR code or searching. It is easy to operate and easy to spread, and can achieve seven major functions, such as message notification, offline code scanning, and official account association. It is based on Wechat, similar to APP. You can use it whenever you want. After using it, you will leave without taking up memory.

Thank you for your reading. I hope you have a certain understanding of the key issue of "how to monitor the eigenvalue changes of low-power Bluetooth devices in Mini Program development". The specific use of the need to do your own experiments to understand, quickly try it, if you want to read more related knowledge articles, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report