1喊崖、通過lightblue軟件 可以得到藍(lán)牙設(shè)備的屬性,例如:write雇逞、read荤懂、write withoutResponse、notify塘砸;
write节仿、write withoutResponse:用于寫數(shù)據(jù)的,但是值得注意的是:通過lightblue軟件谣蠢,看是哪個(gè)值粟耻,并在type上做出相應(yīng)的選擇
read 、notify:用于接受數(shù)據(jù)眉踱;往往writewithoutResponse會(huì)通過notify的數(shù)據(jù)取得結(jié)果挤忙;
今日踩坑:原因是新設(shè)備的屬性不一樣 ,新設(shè)備讀:WriteWithoutResponse 通過notify取到數(shù)據(jù)谈喳;舊設(shè)備是通過Write (相當(dāng)于WriteWithResponse)和read 册烈;read和notify 得到數(shù)據(jù),項(xiàng)目源碼已經(jīng)完成了婿禽,所以只要在write的時(shí)候赏僧,把屬性改為WriteWithoutResponse就好了;