2024年5月30日发(作者:)
(e)
ading()
},
complete: function(e) {
(e)
}
})
}
3.连接成功后保存连接状态
getSeviceId: function() {
var that = this
var platform = rm
(Id)
DeviceServices({
deviceId: Id,
success: function(res) {
a({
services: es
})
racteristics()
},
fail: function(e) {
(e)
},
complete: function(e) {
(e)
}
})
}
getCharacteristics: function() {
var that = this
var list = es
var num = eId
var write = haracter
var read = aracter
var notify = Character
DeviceCharacteristics({
deviceId: Id,
serviceId: list[num].uuid,
success: function(res) {
(res)
for (var i = 0; i < ; ++i) {
var properties = teristics[i].properties
var item = teristics[i].uuid
if (!notify) {
if () {
CharaterId = item
ServiceId = list[num].uuid
notify = true
}
}
if (!write) {
if () {
haraterId = item
erviceId = list[num].uuid
write = true
}
}
if (!read) {
if () {
araterId = item
rviceId = list[num].uuid
read = true
}
}
}
if (!write || !notify || !read) {
num++
a({
writeCharacter: write,
readCharacter: read,
notifyCharacter: notify,
serviceId: num
})
发布者:admin,转转请注明出处:http://www.yc00.com/news/1717047474a2733259.html
评论列表(0条)