Skip to content

Commit

Permalink
Better documentation for requestMTU on iOS (pauldemarco#396)
Browse files Browse the repository at this point in the history
requestMTU is not supported on iOS so this needs better documentations.
issue: https://github.com/pauldemarco/flutter_blue/issues/395
  • Loading branch information
kschulz-samsung authored and pauldemarco committed Oct 17, 2019
1 parent ae67e54 commit 8bb4f84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ characteristic.value.listen((value) {
final mtu = await device.mtu.first;
await device.requestMtu(512);
```
Note that iOS will not allow that you request the MTU size, but will always try to negotiate the highest possible MTU (iOS supports up to MTU size 185)

## Reference
### FlutterBlue API
Expand All @@ -119,7 +120,7 @@ await device.requestMtu(512);
| services | :white_check_mark: | :white_check_mark: | Gets a list of services. Requires that discoverServices() has completed. |
| state | :white_check_mark: | :white_check_mark: | Stream of state changes for the Bluetooth Device. |
| mtu | :white_check_mark: | :white_check_mark: | Stream of mtu size changes. |
| requestMtu | :white_check_mark: | :white_check_mark: | Request to change the MTU for the device. |
| requestMtu | :white_check_mark: | | Request to change the MTU for the device. |

### BluetoothCharacteristic API
| | Android | iOS | Description |
Expand All @@ -138,4 +139,4 @@ await device.requestMtu(512);
## Troubleshooting
### Scanning for service UUID's doesn't return any results
Make sure the device is advertising which service UUID's it supports. This is found in the advertisement
packet as **UUID 16 bit complete list** or **UUID 128 bit complete list**.
packet as **UUID 16 bit complete list** or **UUID 128 bit complete list**.

0 comments on commit 8bb4f84

Please sign in to comment.