Tinkerforge Protocol (TFP)
TFP is developed by Tinkerforge for supporting so called Bricks and Bricklets. Bricks and Bricklets are small hardware modules that can be used to control different motor types (stepper, dc, servo), read out lots of sensors (temperature, humidity, ambient light, air pressure, moisture, etc) and for interaction with humans (displays, potis, leds, buttons, joysticks, etc).
All of these modules are controlled from a PC, bindings are available for C/C++, C#, Delphi, Java, PHP, Python, Ruby, Shell and VB.NET.
The protocol was first developed in 2010. It uses both, USB and TCP/IP. The above mentioned bindings use TCP/IP to communicate with a so called Brick Daemon, which translates the TCP/IP packages to USB to talk with the Bricks and Bricklets. With so called Master Extensions it is also possible to directly communicate with the Bricks/Bricklets over TCP/IP via Ethernet or WiFi.
With the TFP dissector it is possible to debug the Brick Daemon (USB dissection) and the Bindings (TCP/IP dissection). The dissector also is very useful for developing a Binding for a new language.
TCP: TFP uses as its transport protocol. TCP port for TFP traffic is 4223.
USB: TFP uses as its transport protocol. Bulk interface type and custom device class is used on USB.
- For capturing and dissecting TFP over USB one must first start the capture on Wireshark and after that connect the Tinkerforge device to USB.
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
The TFP dissector is fully functional.
Example capture file
Here is a sample capture file containing dissected TFP protocol over TCP/IP and USB.
Show only the TFP based traffic:
Show only the TFP based traffic based on UID (String) field:
Show only the TFP based traffic based on UID (Numeric) field:
Show only the TFP based traffic based on Length field:
Show only the TFP based traffic based on Function ID field:
Show only the TFP based traffic based on Sequence Number field:
Show only the TFP based traffic based on R field:
Show only the TFP based traffic based on A field:
Show only the TFP based traffic based on OO (Other Options) field:
Show only the TFP based traffic based on E (Error) field:
Show only the TFP based traffic based on Future Use field:
Capture only the TFP based traffic:
Details of the Tinkerforge protocol http://www.tinkerforge.com/en/doc/Low_Level_Protocols/TCPIP.html#llproto-tcpip
Source code of the Wireshark dissector https://github.com/Tinkerforge/tf-wireshark-dissector