Difference between revisions of "J-Link Remote Server"
(→Troubleshooting) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[File: RemoteServer_Direct.PNG | 300px | thumb | right | J-Link Remote Server (direct connection)]] |
||
− | __TOC__ |
||
− | |||
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. |
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. <br> |
The J-Link itself does not need to provide an Ethernet interface, USB is sufficient. <br> |
||
For more information on the J-Link Remote Server as well as a tutorial on how to use it, refer to the [https://www.segger.com/products/debug-probes/j-link/tools/j-link-remote-server/ SEGGER website]. |
For more information on the J-Link Remote Server as well as a tutorial on how to use it, refer to the [https://www.segger.com/products/debug-probes/j-link/tools/j-link-remote-server/ SEGGER website]. |
||
+ | |||
+ | __TOC__ |
||
= Command line options = |
= Command line options = |
||
− | |||
The table below lists the commands line options accepted by the J-Link Remote Server. |
The table below lists the commands line options accepted by the J-Link Remote Server. |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|- |
||
− | ! Command !! Description |
+ | ! Command !! Description |
|- |
|- |
||
− | | ? || Prints the list of available command line options. |
+ | | ? || Prints the list of available command line options. |
|- |
|- |
||
− | | -Port || Specifies listening port of J-Link Remote Server. |
+ | | -Port || Specifies listening port of J-Link Remote Server. |
|- |
|- |
||
− | | -UseTunnel || Specifies if tunneled connection shall be used. |
+ | | -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. |
+ | | -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. |
+ | | -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. |
+ | | -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. |
+ | | -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. |
+ | | -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. |
+ | | -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 |
+ | | -TunnelEncrypt || Specifies to encrypt any transferred data of a tunneled connection |
|- |
|- |
||
− | | -select || <USB/IP>[=<SN/Hostname>] Specify how to connect to J-Link. |
+ | | -select || <USB/IP>[=<SN/Hostname>] Specify how to connect to J-Link. |
|- |
|- |
||
− | | port <sup>1</sup> || Selects the IP port on which the J-Link Remote Server is listening. |
+ | | port <sup>1</sup> || Selects the IP port on which the J-Link Remote Server is listening. |
|- |
|- |
||
− | | UseTunnel <sup>1</sup> || Starts J-Link Remote Server in tunneling mode |
+ | | UseTunnel <sup>1</sup> || Starts J-Link Remote Server in tunneling mode |
|- |
|- |
||
| SelectEmuBySN <sup>1</sup> || Selects the J-Link to connect to by its serial number. |
| SelectEmuBySN <sup>1</sup> || Selects the J-Link to connect to by its serial number. |
||
Line 47: | Line 47: | ||
= Tunneling mode = |
= Tunneling mode = |
||
+ | [[File: RemoteServer_Tunnel.PNG | 300px | thumb | right | J-Link Remote Server (tunnel connection)]] |
||
− | |||
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. |
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. |
To give access to a J-Link neither a remote desktop or VPN connection nor changing some difficult firewall settings is necessary. |
||
Line 53: | Line 53: | ||
After that, a remote computer can established a connection to that J-Link from within a debugger, for example. |
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. |
After successfully connecting, the debugger is connected to the J-Link. |
||
+ | |||
+ | [[File: RemoteServer_Schematic.png | 600px ]] |
||
== Example scenario == |
== Example scenario == |
||
Line 62: | Line 64: | ||
= Connecting to J-Link using J-Link Remote Server = |
= Connecting to J-Link using J-Link Remote Server = |
||
+ | When connecting to J-Link - for example when using the [[J-Link_Commander | J-Link Commander]] - in most cases, a connect string can be entered. |
||
+ | [[File: RemoteServer_Commander.PNG ]] |
||
− | When connecting to J-Link - for example when using the [[J-Link_Commander | J-Link Commander]] - in most cases, a connect string can be entered.<br> |
||
== LAN connection == |
== LAN connection == |
||
− | |||
When connecting to a J-Link in LAN via Remote Server, the following syntax applies: |
When connecting to a J-Link in LAN via Remote Server, the following syntax applies: |
||
− | |||
IP <RemoteServerIP> |
IP <RemoteServerIP> |
||
== Tunneled connection == |
== Tunneled connection == |
||
− | |||
When connecting to a remote J-Link via a tunneled connection using Remote Server, the following syntax applies: |
When connecting to a remote J-Link via a tunneled connection using Remote Server, the following syntax applies: |
||
Line 88: | Line 88: | ||
{| |
{| |
||
− | | <SN/Name> || Either the J-Link's serial number or name that the J-Link was registered with at the Remote Server. <br> '''Note''': The name used to register a J-Link at a Remote Server is ''NOT'' the J-Link's [[J-Link |
+ | | <SN/Name> || Either the J-Link's serial number or name that the J-Link was registered with at the Remote Server. <br> '''Note''': The name used to register a J-Link at a Remote Server is ''NOT'' the J-Link's [[J-Link Nickname | Nickname]] |
|- |
|- |
||
| <Password> || Password that was used when setting up the Remote Server. |
| <Password> || Password that was used when setting up the Remote Server. |
||
Line 96: | Line 96: | ||
'''Examples''': |
'''Examples''': |
||
− | |||
IP tunnel:932000000:MyPassword123:jlink2.segger.com // J-Link was registered by S/N, with a password, at jlink2.segger.com |
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:MyJLink::jlink2.segger.com // J-Link was registered by Name, without a password, at jlink2.segger.com |
||
Line 107: | Line 106: | ||
= Troubleshooting = |
= Troubleshooting = |
||
− | |||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|- |
||
! Problem !! Solution |
! Problem !! Solution |
||
+ | |- |
||
+ | | Remote server cannot put socket into listening state || |
||
+ | #Make sure the server's listener port (19020 by default) is not occupied by any other process running in parallel |
||
+ | |||
|- |
|- |
||
| Remote server cannot connect to tunnel server || |
| Remote server cannot connect to tunnel server || |
||
Line 126: | Line 128: | ||
To test whether a connection to the tunnel server can be established or not a network |
To test whether a connection to the tunnel server can be established or not a network |
||
protocol analyzer like Wireshark can help. |
protocol analyzer like Wireshark can help. |
||
+ | The network transfer of a successful connection should look similar to this: |
||
+ | |||
+ | [[File: RemoteServer_Wireshark.gif]] |
Latest revision as of 16:27, 31 August 2023
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.
Contents
Command line options
The table below lists the commands line options accepted by the J-Link Remote Server.
Command | Description |
---|---|
? | 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. |
Note:
1 These command line options exist because of backwards-compatibility. We suggest to use the command line options that start with a dash (’-’).
Tunneling mode
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.
Example scenario
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.
LAN connection
When connecting to a J-Link in LAN via Remote Server, the following syntax applies:
IP <RemoteServerIP>
Tunneled connection
When connecting to a remote J-Link via a tunneled connection using Remote Server, the following syntax applies:
Variant 1:
IP tunnel:SN
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.
Examples:
IP tunnel:600100000 IP tunnel:932000000
Variant 2:
IP tunnel:<SN/Name>[:<Password>[:<TunnelServer>]]
<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. |
Examples:
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
Troubleshooting
Problem | Solution |
---|---|
Remote server cannot put socket into listening state |
|
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: