Wednesday, March 21st 2018, 2:23am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: Nov 19th 2015

Posts: 27


Wednesday, January 11th 2017, 11:38am

How to use a second RTT channel?


I am investigating a remote setup using RTT. The setup is to be automated. Here is the scenario:

  1. A manager node will contain a test script, connecting to a remote Raspberry Pi (RPi) node, which is connected via USB to an ARM development kit (DK). The test script sends commands to a CLI on the DK, and the DK replies with printouts. The CLI uses RTT channel 0.

  2. On the RPi, I start JLinkExe like this: JLink.exe -AutoConnect 1 -device XXXX -SelectEmuBySN YYYY -RTTTelnetPort 19122 -if SWD -speed 4000 , where XXXX and YYYY are parameters suitable for the DK.

  3. As the RTT telnet port is only accessible from localhost (and not any remote host (for security reasons, I guess)), I set up a SSH connection from the manager node to the RPi. This SSH connection adds a tunnel from a port on the manager to port 19122 on the RPi. This way, I can start a Telnet session on the manager, and be connected to the CLI on the DK. All this works well.

Now, I would like to add a separate printout channel for logging, on RTT channel 1. Is there a way to get the output of that channel to the manager? I am aware of (but have not tested) RTT Logger. The RTT Logger seems unsuitable, as it is a command like application, making it difficult to automate.


SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 377


Wednesday, January 11th 2017, 3:10pm


Currently it is not possible to route any other RTT Channel than channel 0 to the Telnet connection.
We plan to improve this in the future and provide an option to use other channels as well.

Best regards



Date of registration: Nov 19th 2015

Posts: 27


Wednesday, January 11th 2017, 4:02pm

Hi, and thanks for your answer. I would appreciate this possibility.

Just fantasizing a little:

As the -RTTTelnetPort parameter is already used for only one of the channels (channnel 0), one could envision other methods. One example is to add to the semantics of the same parameter, e.g. -RTTTelnetPort 19023,3 (where "'3" is optional) meaning using port 19023 for channel 3. The program could allow several -RTTTelnetPort instances on the command line, for several channels open. I guess that would be backwards compatible, albeit a little more complex to implement.

Another method would be to add a new command line parameters for channels other than 0, for example -RTTTelnetPortChannel 19023,3.

Did I say that I would appreciate this possibility?


Thanks for very quick answers on this forum.