[問題] ble get service不完全

看板AndroidDev作者 (小弟)時間7年前 (2017/06/21 16:10), 編輯推噓0(005)
留言5則, 2人參與, 最新討論串1/1
想請問一下... 不知道有沒有人遇過抓取ble device的services的時後, 有時候會抓不完整的狀況,但還是會進入onServiceDiscovered(). 用Log印出如下: (1)抓取完整時: Connected to GATT server. Attempting to start service discovery:true Service UUID Found: 00001801-0000-1000-8000-00805f9b34fb Service UUID Found: 00001800-0000-1000-8000-00805f9b34fb Service UUID Found: 0000180f-0000-1000-8000-00805f9b34fb Service UUID Found: 0000fd00-0000-1000-8000-00805f9b34fb Service UUID Found: 0000fa00-0000-1000-8000-00805f9b34fb Service UUID Found: 0000fc00-0000-1000-8000-00805f9b34fb Service UUID Found: 0000fb00-0000-1000-8000-00805f9b34fb (2)抓取不完整時:(少抓到fb00這個service) Connected to GATT server. Attempting to start service discovery:true Service UUID Found: 00001801-0000-1000-8000-00805f9b34fb Service UUID Found: 00001800-0000-1000-8000-00805f9b34fb Service UUID Found: 0000180f-0000-1000-8000-00805f9b34fb Service UUID Found: 0000fd00-0000-1000-8000-00805f9b34fb Service UUID Found: 0000fa00-0000-1000-8000-00805f9b34fb Service UUID Found: 0000fc00-0000-1000-8000-00805f9b34fb 不知道是哪裡出了問題? 請板上神人解答.. -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.163.2.234 ※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1498032635.A.EBE.html

06/21 17:46, , 1F
目前的做法是只要他搜不完全就一直重新discover ...
06/21 17:46, 1F

06/23 10:10, , 2F
裝Nordic的工具試試看是不是也這樣
06/23 10:10, 2F

06/23 10:11, , 3F
不然換支手機試試 我有試過mtk的跟Q的就是不一樣
06/23 10:11, 3F

06/25 23:34, , 4F
目前這個狀況只發生在htc的某個手機上 @@""
06/25 23:34, 4F

06/27 19:02, , 5F
哪就再discovery一次吧 應該是沒影響
06/27 19:02, 5F
文章代碼(AID): #1PIYdxw- (AndroidDev)