Tag: gatt

Android BLE API:未收到GATT通知

用于testing的设备:Nexus 4,Android 4.3 连接工作正常,但我的callback的onCharacteristicChanged方法永远不会被调用。 不过,我正在注册的onServicesDiscovered内使用onServicesDiscovered setCharacteristicNotification(char, true) onServicesDiscovered ,该函数甚至返回true。 设备日志(当通知应该出现/通过蓝牙设备发送时,实际上根本没有消息): 07-28 18:15:06.936 16777-16809/de.ffuf.leica.sketch D/BluetoothGatt: setCharacteristicNotification() – uuid: 3ab10101-f831-4395-b29d-570977d5bf94 enable: true 07-28 18:15:06.936 4372-7645/com.android.bluetooth D/BtGatt.GattService: registerForNotification() – address=C9:79:25:34:19:6C enable: true 07-28 18:15:06.936 4372-7645/com.android.bluetooth D/BtGatt.btif: btif_gattc_reg_for_notification 07-28 18:15:06.946 4372-7645/com.android.bluetooth D/BtGatt.btif: btgattc_handle_event: Event 1018 07-28 18:15:06.946 4372-7645/com.android.bluetooth D/BtGatt.GattService: onRegisterForNotifications() – address=null, status=0, registered=1, charUuid=3ab10101-f831-4395-b29d-570977d5bf94 07-28 18:15:06.946 4372-7645/com.android.bluetooth D/BtGatt.btif: […]

蓝牙低功耗:在Linux中侦听通知/指示

我试图通过Linux机器与BLE模块进行通信(模块正在运行心率档案)。 到目前为止,除了听取通知和指示外(例如,听取心率测量通知),我已经能够做到我需要的一切。 我正在使用内核版本3.5和bluez-5.3。 目前使用的成功命令: hcitool lescan hcitool lecc gatttool -b <Mac Address> –primary gatttool -b <MAC Address> –characteristics gatttool -b <MAC Address> –char-read gatttool -b <MAC Address> –char-desc gatttool -b <MAC Address> –interactive 失败的命令: gatttool -b <MAC Address> –listen 任何帮助是极大的赞赏。