In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you how to read the binary data values of the eigenvalues of low-power Bluetooth devices in Mini Program development. The content is simple and clear. I hope it can help you solve your doubts. Next, let me take you to study and learn this article, "how to read the binary data values of low-power Bluetooth devices in Mini Program development."
Read the binary data value of the eigenvalue of the low-power Bluetooth device. Note: the eigenvalue of the device must support read before it can be successfully called. For more information, please see the properties attribute of characteristic.
OBJECT parameter description:
Parameter type is required to indicate that deviceIdString is the id of Bluetooth device. Reference device object serviceIdString is Bluetooth eigenvalue corresponding to the service uuidcharacteristicIdString is Bluetooth eigenvalue. If uuidsuccessFunction is successful, return local Bluetooth adapter status failFunction No API call failed callback function completeFunction No API call end callback function (both successful and failed calls will be executed)
Success return parameters:
Parameter type description errCodeNumber error code errMsgString success: ok, error: details
Sample code:
/ / the callback here is required to obtain the wx.onBLECharacteristicValueChange (function (characteristic) {console.log ('characteristic value comed:', characteristic)}) wx.readBLECharacteristicValue ({/ / the deviceId here needs to have established a link with the corresponding device through createBLEConnection [* * new**] deviceId: deviceId, / / the serviceId here needs to obtain serviceId: serviceId in the getBLEDeviceServices API above / / the characteristicId here needs to obtain characteristicId: characteristicId, success: function (res) {console.log ('readBLECharacteristicValue:', res.errCode)}} in the above getBLEDeviceCharacteristics API. What does Mini Program mean? Mini Program is an application that can be used without download or installation. By scanning the QR code or searching it for immediate use, it is easy to operate and easy to spread, and can achieve seven functions such as message notification, offline code scanning, official account association and so on. 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.
The above is about "how to read the binary data values of eigenvalues of low-power Bluetooth devices in Mini Program development". If this article is helpful to you and think it is well written, please share it with your friends to learn new knowledge. if you want to know more about it, please pay more attention to 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.