我記得做了類似於你所描述的東西,並能夠很好地連接。但是,沒有列出任何指示/通知的特徵,所以除了真正基本的元數據(設備類型,設備名稱等)之外,我無法從設備獲取任何數據。
我只是試圖今天做同樣的事情,我似乎無法建立連接,直到我告訴它使用隨機類型的地址。
下面是我記錄時,我得到它的工作成績面前:
# gatttool -b EB:47:1D:11:11:11 --addr-type=random --primary
attr handle = 0x0001, end grp handle = 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle = 0x0008, end grp handle = 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle = 0x0009, end grp handle = 0x000e uuid: adabfb00-6e7d-4601-bda2-bffaa68956ba
attr handle = 0x000f, end grp handle = 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb
# gatttool -b EB:47:1D:11:11:11 --addr-type=random --characteristics
handle = 0x0002, char properties = 0x02, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x02, char value handle = 0x0007, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x000a, char properties = 0x12, char value handle = 0x000b, uuid = adabfb01-6e7d-4601-bda2-bffaa68956ba
handle = 0x000d, char properties = 0x06, char value handle = 0x000e, uuid = adabfb02-6e7d-4601-bda2-bffaa68956ba
handle = 0x0010, char properties = 0x02, char value handle = 0x0011, uuid = 00002a29-0000-1000-8000-00805f9b34fb
handle = 0x0013, char properties = 0x02, char value handle = 0x0014, uuid = 0000fb00-0000-1000-8000-00805f9b34fb
您可能需要配對設備獲取實際有用的數據...不知道該怎麼做。
非常感謝。我最近一直沒有去過,但這很酷,我將安裝它並嘗試瞭解代碼。 –
嘿,是否有可能讓Fitbit Charge與我正在開發的新的(定製我自己的版本android/iphone)應用程序交談並顯示提醒等。 – user3705478