Skip to content
Wireshark Wiki 中文翻译整理专题首页原始页面

Tinkerforge

TFP 由 Tinkerforge 开发,用于支持所谓的 Bricks 和 Bricklets。Bricks 和 Bricklets 是小型硬件模块,可用于控制不同类型的电机(stepper、dc、servo),读取大量传感器(temperature、humidity、ambient light、air pressure、moisture 等),以及与人交互(displays、potis、leds、buttons、joysticks 等)。

所有这些模块都由 PC 控制,可用的 bindings 包括 C/C++、C#、Delphi、Java、PHP、Python、Ruby、Shell 和 VB.NET。

该协议最初开发于 2010 年。它同时使用 USB 和 TCP/IP。上述 bindings 使用 TCP/IP 与所谓的 Brick Daemon 通信,Brick Daemon 会将 TCP/IP packages 转换为 USB,以便与 Bricks 和 Bricklets 通信。借助所谓的 Master Extensions,也可以通过 Ethernet 或 WiFi 在 TCP/IP 上直接与 Bricks/Bricklets 通信。

使用 TFP dissector 可以调试 Brick Daemon(USB dissection)和 Bindings(TCP/IP dissection)。该 dissector 对于为新语言开发 Binding 也非常有用。

协议依赖

  • TCP: TFP 使用 TCP 作为其 transport protocol。TFP 流量的 TCP port 是 4223。

  • USB: TFP 使用 USB 作为其 transport protocol。USB 上使用 Bulk interface type 和 custom device class。

信息

  • 要通过 USB 捕获并解析 TFP,必须先在 Wireshark 上开始捕获,然后再将 Tinkerforge 设备连接到 USB。

示例 payload

Tinkerforge Protocol, UID: 6JJUT5, Len: 8, FID: 2, Seq: 12 UID (String): 6JJUT5 UID (Numeric): 3765449266 Length: 8 Function ID: 2 1100 .... = Sequence Number: 12 .... 1... = Response Expected: 1 .... .0.. = Authentication: 0 .... ..00 = Other Options: 0 00.. .... = Error Code: 0 ..00 0000 = Future Use: 0

Wireshark

TFP dissector 功能完整。

示例捕获文件

下面是一个 sample capture file,其中包含通过 TCP/IP 和 USB 解析的 TFP protocol。

  • SampleCaptures/tfp_capture_tcp_usb.pcapng

显示过滤器

仅显示基于 TFP 的流量:

 tfp

仅显示基于 UID (String) field 的 TFP 流量:

 tfp.uid

仅显示基于 UID (Numeric) field 的 TFP 流量:

 tfp.uid_numeric

仅显示基于 Length field 的 TFP 流量:

 tfp.len

仅显示基于 Function ID field 的 TFP 流量:

 tfp.fid

仅显示基于 Sequence Number field 的 TFP 流量:

 tfp.seq

仅显示基于 R field 的 TFP 流量:

 tfp.r

仅显示基于 A field 的 TFP 流量:

 tfp.a

仅显示基于 OO (Other Options) field 的 TFP 流量:

 tfp.oo

仅显示基于 E (Error) field 的 TFP 流量:

 tfp.e

仅显示基于 Future Use field 的 TFP 流量:

 tfp.future_use

捕获过滤器

仅捕获基于 TFP 的流量:

 tfp

外部链接

导入自 https://wiki.wireshark.org/Tinkerforge,时间为 2020-08-11 23:26:40 UTC

相关 Wireshark Wiki 页面

网络分析技术档案