Closed 1784450277 closed 1 year ago
If you want to work with file descriptors you have to add another dependency to your project: com.rm5248:dbus-java-nativefd:1.0
DBus-java does not support file descriptors out of the box.
I'm sorry to trouble you again. What I want to do is set the mtu value of Bluetooth. When using gattCharacteristic.AcquireWrite, I also see the relevant mtu introduction in the document, so I try. I don't know if I need to use file descriptors. Can you help me with setting mtu? I haven't seen the relevant introduction on the official website of Bluez
You use file descriptors because the call to AcquireWrite
returns a Tuple containing a file descriptor. This can only be created/serialized when file descriptor support is enabled.
I'm also not sure that AcquireWrite
is really what you want to do. Usually I would try using WriteValue
instead.
Also note that changing the MTU is not always possible. Some device do not allow that, in most cases it is only possible if "you are the server", which means you provide the GATT characteristics.
I want to set the mtu of Bluetooth and call the gattCharacteristic.AcquireWrite method, but an error is reported