weliem / bluez_inc

A C library for Bluez (BLE) that hides all DBus communication. It doesn't get easier than this. This library can also be used in C++.
MIT License
89 stars 22 forks source link

Gatt exchange mtu event not work #58

Open Gearspre opened 2 months ago

Gearspre commented 2 months ago

I am trying to use this lib to create gatt server, it works. But no matter how I send the exchange MTU event, its MTU always remains at 517. And I find in application.c line:1035 has one todo : deal with the offset & mtu parameter So is this a known issue, and is there any simple solution?

weliem commented 2 months ago

I have been looking into this but I don't think Bluez has an API for this.

Gearspre commented 2 months ago

Yes. I found a link discussing this thing : Determine ATT MTU size over DBUS

Now I have another problem. How can I get the negotiated MTU size from GattCharacteristic? A simple solution is get from ReadValue or WriteValue method options. But it's not a good solution. Do you have any idea?

weliem commented 1 month ago

Using the MTU from the ReadValue and WriteValue options parameter is totally fine to use. However, that doesn't enforce a MTU. It simply says what the current MTU is....