Comments (7)
这代码里面的是你startNotify之后,这里的onSuccess回调只是接收到notify的成功回调,不是设置之后成功的回调,如果你是要设置成功之后的回调,需要你自己重写一下handleCharacteristicNotificationCallback这个方法里的onDescriptorWrite这个方法的,不知道你问的是不是这个问题。才疏学浅,莫怪。
from fastble.
@lizhongze123 我要的就是接收仪器返回的notify,service的uuid和characteristic的uuid确定都是对的,在我的项目中是可用的,而且刚开始运行项目是有返回值的,后来用就一直不返回了
from fastble.
这个很难判断错误在哪里。或者你用其他蓝牙工具看可不可以接收到,如果可以,那就不是UUID的问题了,那你就要看看你的代码了
from fastble.
@lizhongze123 好的,谢谢,我再看看
from fastble.
@lizhongze123 上次的问题解决了,遇到新的问题,如果需要连续监听多个notify的uuid,该怎么做?
from fastble.
@lioulei1317 请问你是怎么解决的?
from fastble.
@androidxu 要有一个时间间隔,我是监听和写入隔了100ms,如果写在一起不间隔就不返回
from fastble.
Related Issues (20)
- app运行过程中闪退,异常是框架里的代码 Attempt to invoke virtual method 'boolean com.hihonor.bluetooth.btfreeze.BluetoothBleConnectItem.isSame(com.hihonor.bluetooth.btfreeze.BluetoothBleConnectItem)' on a null object reference com.clj.fastble.bluetooth.BleBluetooth.connect(BleBluetooth.java:10)
- onCharacteristicChanged内存泄漏
- 发送失败: GattException{gattStatus=10} BleException { code=101, description='Gatt Exception Occurred! '}
- 添加服务UUid扫描不到设备 HOT 1
- 我写了一个库,欢迎来围观 HOT 3
- 我已解决notify的那个102 descriptor equals null 的错 HOT 9
- 使用FastBle发送图片的同时使用A2dp协议播放音乐 但是暂停后不能恢复的问题
- FastBle怎么调用无返回的特征值写入,没有看到相关的api呢
- 一个设备可以被多次连接,多次连接成功之后, 断开一次就断不开了。 HOT 2
- 现在的版本是否支持外设模式
- vivoV2241A搜索不到
- onWriteFailure 102 This device not connect! HOT 3
- Is there a trick to set the MTU size? HOT 1
- ActivityCompat.checkSelfPermission PackageManager.PERMISSION_GRANTED) {
- 蓝牙设备连接成功后,到开始发现服务,中间sleep了 500ms,这里为什么要休眠呢? HOT 2
- 请问一下,怎么设置write no response模式? HOT 1
- 设置MTU值成功之后,如果分包传输设为false,手机app向蓝牙模块发送数据,超过20字节,蓝牙会自动断开 HOT 1
- 手机连手机收发数据可以吗
- 当长按蓝牙设备按钮时,抬起的时候收不到消息了
- Jetpack 出了新的 bluetooth api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastble.