Hello Everyone, I hope you are all doing well.
I have some questions regarding Trezor Communication between laptop (Trezor Suite or Trezorctl command line) and wallet (for old firmware versions), as I understand it Trezor uses a Server-Client structure (where the wallet/device is the server and the host on which the trezor Suite or trezorctl is running is the client) with HTTP/1.1 (for old firmware versions). It also uses google protocol buffers as well as nanopb libraries to define message types and serialise data exchanged between the host and the device. This much is clear (I donât know if my very brief explanation is correct). However, while using wireshark to monitor the packets, I got confused :
- The syn/ syn-ack / ack handshake is initiated from port 37006 (random port changing each time) to port 21325 on localhost. If I understand it well, the port number 21325 is fixed and is the one used by trezorctl command line. So how come in the documentation, it is mentioned that the device can never initiate communications ?
- If itâs not the case and the port used by trezor device is 21325, where is this defined in the firmware code ? Also I canât see on the firmware code anything mentioning the usage of TCP as transmission protocol (or is it innately used by the protobuf/nanopb library ?)
Any help, clarification or reference that can help me clarify the communication would be immensely appreciated.