Comments (5)
Hi,
You may use requestMtu(...) to set the mtu (is it the gap event length?).
As to the write types, write with response should get callback after the ack was received, so it's synchronous. Write without response is in fact asynchronous and the callback is invoked after the requires was enqueued, but might have not even been started.
Are you using version 2 of this library? We will soon deprecate 1.x when 2 became stable.
from android-ble-library.
Hi,
Thanks for your quick reply.
I am using 1.x version. I am setting MTU with requestMTU(). But I need to set GAP event length. Could you suggest how to do that with this library?
I am using write without response, but I sometimes I don't get data on other side. It looks like phone didn't start sending yet.
Thanks,
Rahul
from android-ble-library.
There are just 3 things you may control with Android API. Mtu, connection priority (that is connection interval) and phy, on phones with Oreo+.
To control the gap length you call requestConnectionPriority(..) where you provide a predefined value (read method's comment for details). This method on Android before 8 has no callback and you don't know how long time did it take, or has it succeeded.
You may also request any other value from the peripheral.
from android-ble-library.
My Nordic board requests 7.5 msec connection interval which is 6 units. But app is only setting 9 units. This is happening regardless of requestConnectionPriority() call. Could you help why this might be happening? I want connection interval 6 units.
from android-ble-library.
Starting from Android 5 or 6 the lowest connection interval is 11.25 ms, set when you request priority high. Before it used to be 7.5 ms.
You may try to request 7.5 from the peripheral, but I guess phone will not allow.
7.5 ms is used only for service discovery, but then it goes up. This is to allow for more simultaneous connections, I guess.
from android-ble-library.
Related Issues (20)
- Null reference exception when calling disconnect HOT 2
- Sometimes onServiceDiscoverd is not called when connecting. HOT 1
- Samsung Tab S6 Lite: Connection Parameter Negotiation HOT 1
- Catch SecurityException from setCharacteristicNotification HOT 2
- NullPointerException android.bluetooth.BluetoothGattServer.cancelConnection(android.bluetooth.BluetoothDevice)' on a null object reference HOT 3
- Library DefaultMtuSplitter is splitting incorrectly for android OS 14 HOT 8
- How to Catch Exception with RequestFailedException HOT 1
- Ask a question, thank you HOT 1
- Want to get the characteristic on which the data was received for the characteristics I have subscribed to get notified for HOT 2
- Concurrent modification exception while notifying device disconnected
- Disconnect not working on various Samsung devices HOT 2
- No response from writeCharacteristic HOT 3
- Question: Will this allow me to send HCI Level Commands? HOT 1
- I stoped receiving notifications even when i have still not get all data HOT 23
- Sometimes causing system Bluetooth to crash. HOT 4
- Notification does not clear after setup a device HOT 3
- Connection interval changes on its own HOT 3
- OTA upgrade problem HOT 1
- Cannot connect the BLE device HOT 6
- A couple of questions, possibly bugs HOT 4
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 android-ble-library.