Closed MAIMIHO closed 7 years ago
连接上后选择可写服务, 能正常写入, 串口有数据打印. 但反过来, 串口发数据, 选择可通知服务, 并没有走接收消息的回调. showGattServices()方法中 ViseBluetooth.getInstance().enableCharacteristicNotification(characteristic, bleCallback, true); 已经走到了. 但是串口发消息的时候ViseBluetooth中onCharacteristicChanged() 没有收到消息, 是什么原因导致的呢? 麻烦你了.
@MAIMIHO 你更新代码再试试,还有这个需要判定该设备是否支持可通知服务,你看看选择可通知服务的时候下面的编辑框是否有显示UUID内容
现在能正常收到了, 谢谢.
连接上后选择可写服务, 能正常写入, 串口有数据打印. 但反过来, 串口发数据, 选择可通知服务, 并没有走接收消息的回调. showGattServices()方法中 ViseBluetooth.getInstance().enableCharacteristicNotification(characteristic, bleCallback, true); 已经走到了. 但是串口发消息的时候ViseBluetooth中onCharacteristicChanged() 没有收到消息, 是什么原因导致的呢? 麻烦你了.