J-Link Remote Server: Difference between revisions
No edit summary |
|||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Software Tools]] | |||
[[File: RemoteServer_Direct.PNG | 300px | thumb | right | J-Link Remote Server (direct connection)]] | [[File: RemoteServer_Direct.PNG | 300px | thumb | right | J-Link Remote Server (direct connection)]] | ||
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. | ||
Line 6: | Line 7: | ||
__TOC__ | __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. | ||
Line 18: | Line 19: | ||
|- | |- | ||
| -UseTunnel || Specifies if tunneled connection shall be used. | | -UseTunnel || Specifies if tunneled connection shall be used. | ||
|- | |- | ||
| -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. | ||
Line 33: | Line 32: | ||
| -TunnelEncrypt || Specifies to encrypt any transferred data of a tunneled connection | | -TunnelEncrypt || Specifies to encrypt any transferred data of a tunneled connection | ||
|- | |- | ||
| - | | -USB || Specify a S/N or nickname to connect to over USB (available from V8.20). | ||
|- | |||
| -IP || Specify a hostname, S/N or nickname to connect to over TCP/IP (available from V8.20). | |||
|- | |- | ||
| 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 | ||
|- | |- | ||
|} | |} | ||
Line 46: | Line 45: | ||
<sup>1</sup> These command line options exist because of backwards-compatibility. We suggest to use the command line options that start with a dash (’-’). | <sup>1</sup> These command line options exist because of backwards-compatibility. We suggest to use the command line options that start with a dash (’-’). | ||
= Tunneling mode = | == Tunneling mode == | ||
[[File: RemoteServer_Tunnel.PNG | 300px | thumb | right | J-Link Remote Server (tunnel connection)]] | [[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. | ||
Line 56: | Line 55: | ||
[[File: RemoteServer_Schematic.png | 600px ]] | [[File: RemoteServer_Schematic.png | 600px ]] | ||
== Example scenario == | === Example scenario === | ||
A device vendor is developing a new device which shall be supported by 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. | Because there is only one prototype, a shipment to SEGGER is not possible. | ||
Line 63: | Line 62: | ||
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. | 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 = | == 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. | 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 ]] | [[File: RemoteServer_Commander.PNG ]] | ||
== 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 93: | Line 92: | ||
|- | |- | ||
| <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. | | <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''': | '''Examples''': | ||
Line 100: | Line 99: | ||
IP tunnel:600100000:MyPassword123 // J-Link was registered by S/N, with a password, at the SEGGER default tunnel server | IP tunnel:600100000:MyPassword123 // J-Link was registered by S/N, with a password, at the SEGGER default tunnel server | ||
== Usage with different clients == | === Usage with different clients === | ||
* [[Connect_to_remote_J-Link_via_J-Link_Tunnel_Server | Embedded Studio]] | * [[Connect_to_remote_J-Link_via_J-Link_Tunnel_Server | Embedded Studio]] | ||
* [[IAR_EWARM#Connecting_to_J-Link_via_J-Link_Remote_Server | IAR ]] | * [[IAR_EWARM#Connecting_to_J-Link_via_J-Link_Remote_Server | IAR ]] | ||
* [[Eclipse#Connecting_to_J-Link_via_J-Link_Remote_Server | GDB / Eclipse]] | * [[Eclipse#Connecting_to_J-Link_via_J-Link_Remote_Server | GDB / Eclipse]] | ||
= 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 || |
Latest revision as of 13:13, 20 March 2025
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.
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. |
-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 |
-USB | Specify a S/N or nickname to connect to over USB (available from V8.20). |
-IP | Specify a hostname, S/N or nickname to connect to over TCP/IP (available from V8.20). |
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 |
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: