[英]Connect to a Bluetooth LE device using bluez python dbus interface
[英]how to get the current MTU in python using dbus/bluez
有没有办法使用dbus bluez在python中获得当前客户端连接的MTU?
如果我观看btmon
,则在连接后可以看到值(503):
# btmon | grep MTU
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 517
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 517
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 503
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 517
但是在dbus.bluez api中似乎没有此值的句柄
有任何想法吗?
Bluez不在dbus api上公开MTU大小。 但是,此信息在options参数的Read,Write等回调中给出。
Methods array{byte} ReadValue(dict options)
Issues a request to read the value of the
characteristic and returns the value if the
operation was successful.
Possible options: "offset": uint16 offset
"mtu": Exchanged MTU (Server only)
"device": Object Device (Server only)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.