J-Link Remote Server
J-Link Remote Server is a utility (available as command line or GUI application) that makes a J-Link accessible via IP, be it in the local network or from anywhere on the world.
The J-Link itself does not need to provide an Ethernet interface, USB is sufficient.
For more information on the J-Link Remote Server as well as a tutorial on how to use it, refer to the SEGGER website.
Command line options
The table below lists the commands line options accepted by the J-Link Remote Server.
|?||Prints the list of available command line options.|
|-Port||Specifies listening port of J-Link Remote Server.|
|-UseTunnel||Specifies if tunneled connection shall be used.|
|-SelectEmuBySN||Specifies to connect to a J-Link with a specific S/N. Only valid for LAN mode.|
|-TunnelServer||Specify a tunnel server to connect to (default: jlink.segger.com:19020). Only valid for tunnel mode.|
|-TunnelBySN||Specifies to identify at tunnel server via J-Link S/N. Only valid for tunnel mode.|
|-TunnelByName||Specifies to identify at tunnel server via custom name. Only valid for tunnel mode.|
|-TunnelPW||Specifies to protect the connection with a password. Only valid for tunnel mode.|
|-TunnelPort||Specifies to connect to a tunnel server listening on a specific port. Only valid for tunnel mode.|
|-TunnelEncrypt||Specifies to encrypt any transferred data of a tunneled connection|
|-select||<USB/IP>[=<SN/Hostname>] Specify how to connect to J-Link.|
|port 1||Selects the IP port on which the J-Link Remote Server is listening.|
|UseTunnel 1||Starts J-Link Remote Server in tunneling mode|
|SelectEmuBySN 1||Selects the J-Link to connect to by its serial number.|
1 These command line options exist because of backwards-compatibility. We suggest to use the command line options that start with a dash (’-’).
The Remote server provides a tunneling mode which allows remote connection to a J-Link / J-Trace from any computer, even from outside the local network. To give access to a J-Link neither a remote desktop or VPN connection nor changing some difficult firewall settings is necessary. When started in tunneling mode, the Remote server connects to a tunnel server via port 19020 and registers with its serial number or custom name. After that, a remote computer can established a connection to that J-Link from within a debugger, for example. After successfully connecting, the debugger is connected to the J-Link.
A device vendor is developing a new device which shall be supported by J-Link. Because there is only one prototype, a shipment to SEGGER is not possible. Instead, the vendor can connect the device via J-Link to a local computer and start the J-Link Remote Server in tunneling mode. The connection parameters (e.g. serial number or custom name, etc.) of the J-Link is then sent to a to an engineer at SEGGER. The engineer at SEGGER can use J-Link Commander or a debugger to test and debug the new device without the need to have the device on the desk.
Connecting to J-Link using J-Link Remote Server
When connecting to J-Link - for example when using the J-Link Commander - in most cases, a connect string can be entered.
When connecting to a J-Link in LAN via Remote Server, the following syntax applies:
When connecting to a remote J-Link via a tunneled connection using Remote Server, the following syntax applies:
This variant can be used in the default case: When connecting to the SEGGER default tunnel server (jlink.segger.com) where the serial number has been used to register a J-Link.
IP tunnel:600100000 IP tunnel:932000000
|<SN/Name>||Either the J-Link's serial number or name that the J-Link was registered with at the Remote Server. |
Note: The name used to register a J-Link at a Remote Server is NOT the J-Link's Nickname
|<Password>||Password that was used when setting up the Remote Server.|
|<TunnelServer>||Address or hostname of the tunnel server. This is only needed if a tunnel server other than the SEGGER default tunnel server (jlink.segger.com) is used.|
IP tunnel:932000000:MyPassword123:jlink2.segger.com // J-Link was registered by S/N, with a password, at jlink2.segger.com IP tunnel:MyJLink::jlink2.segger.com // J-Link was registered by Name, without a password, at jlink2.segger.com IP tunnel:600100000:MyPassword123 // J-Link was registered by S/N, with a password, at the SEGGER default tunnel server
Usage with different clients
|Remote server cannot connect to tunnel server||
|J-Link Commander cannot connect to tunnel server||
To test whether a connection to the tunnel server can be established or not a network protocol analyzer like Wireshark can help. The network transfer of a successful connection should look similar to this: