【问题标题】:how to get the current MTU in python using dbus/bluez如何使用 dbus/bluez 在 python 中获取当前 MTU
【发布时间】:2018-05-19 23:17:25
【问题描述】:

有没有办法使用 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 中似乎没有这个值的句柄

有什么想法吗?

【问题讨论】:

标签: python dbus bluez


【解决方案1】:

Bluez 不会在 dbus api 上公开 MTU 大小。但是,此信息在选项参数中的读取、写入等回调中给出。

        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)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-07
    • 2021-10-09
    • 2012-09-02
    • 2012-07-01
    • 2015-10-01
    • 1970-01-01
    • 2019-03-04
    • 2016-10-01
    相关资源
    最近更新 更多