-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于发送大数据量数据分包的问题 #77
Comments
检查autoWriteMode属性值是否为true,如果为true则delay不会生效 |
非常感谢,我试下,这个autoWriteMode默认应该是false吧,我看源码用的是java,默认没填值,按理应该就是false。 |
|
设置autoWriteMode为FALSE,利用多线程一直发送数据,发现数据发送几个就失败了,请问如何处理 |
2023-07-13 15:39:01.340 32617-5074 AndroidBLE com.example.admin.mybledemo D [20478] BleRequestImpl: 54:3D:21:91:13:BC -- write result:true |
/**
* 写入大数据量的数据(分包)
* @param device 蓝牙设备对象
* @param data 写入的总字节数组(如整个文件的字节数组)
* @param packLength 每包需要发送的长度
* @param delay 每包之间的时间间隔
* @param callback 发送结果回调
* @deprecated Use {@link Ble#writeEntity(EntityData, BleWriteEntityCallback)} instead.
*/
public void writeEntity(T device, final byte[]data, @IntRange(from = 1,to = 512)int packLength, int delay, BleWriteEntityCallback callback){
request.writeEntity(device, data, packLength, delay, callback);
}
在使用上面那种方式的时候可以很快的就发送完成,并且数据都是正确发送的,可是使用下面这种方式的时候每包之间的间隔就非常久,即使在EntityData里填写的delay为1,还是间隔很久,这是啥原因啊?主要是因为上面那种方式在我这里提示是过时的方法了,想找下原因
The text was updated successfully, but these errors were encountered: