Skip to main content
FW version: Stable

Addressing the device

info

TLDR: Before any kind of communication with the device, you need to set the correct connection options.

All tools that communicate with the device use the same options scheme.

An easy way first

To start things rolling quickly, let's assume you have a single device connected through USB to your PC. In that case, just open LaunchPad, click first on the Options ... button and then click Set defaults. This will restore everything to this most typical setup. You may want to set your addr field to -1 (if you're not sure what address the device is). After that, click Apply and Close and that's it.

launchpad

Connection options

define the comlink interface between the device(s) and the SWtools:

  • if (-i) the interface driver. This tells the tool which physical interface driver to use for establishing a connection
  • opt (-o) the option string for each interface driver, which refines the connection parameters

the link-layer addressing:

  • addr (-a) the target device address. Use -1 for the broadcast method
  • local (-l) the local node address of the SWtools (typically unspecified, default value is 7)
  • mesh (-m) the link datagram options (e.g. CAN ID to SID translation bits) (typically unspecified)

and common protocol-specific settings:

  • dev (-d) the protocol configuration (typically unspecified)
  • crd (-c) credentials for device log-in (used only by selected tools)

Connection option sets

info

All the tools are accessed through a batch wrapper (preferably, for connection options loading). See cmd/ folder.

There are two sets of connection options to play with:

  • system global. These options are configured globally and are held in a shared config file (or in the system registry on Windows). The values are used to initialize the local options each time a new session starts. A common way to set the global options is either manually, through launchpad or programmatically, through resetconn, loadconn or storeconn tools.
  • session local. These options are held as environment variables in each session (terminal window). Changing them locally will not affect the system's global values (unless storeconn is called).

The session local connection options can be changed as environment variables from the command line (before running the tool), using the system's syntax for setting an environment variable. This is useful if you want to create a configurator product that intermittently selects different options. Examples:

# At the beginning, all local connection options are initialized to the values of global ones (those set e.g. in LaunchPad)

yosctl var get /driver/iref # retrieve the variable from the device using global connection options

# ... do some more work ...

set if=kvaser
set addr=0
yosctl var get /driver/iref # now the yosctl will use Kvaser driver and retrieve the variable from the device with address 0
set addr=1
yosctl var get /driver/iref # now the yosctl will use Kvaser driver and retrieve the variable from the device with address 1

Alternatively, the option can be passed directly to the tool as a raw argument. Examples:


term.exe -imsg_usb.dll -a0 #start term tool with explicit definition of interface driver and device address

scope.exe -imsg_umsg.dll -o3,115200,8,n,1 -dbuggy1 # run the scope on COM3, 115200 baud, 8 bits, no parity, 1 stop bit and protocol named buggy1.

bl_srm.exe -imsg_kvaser.dll -o2 -a0 UPGRADE # Upgrade the device over CAN channel 2 with address 0 to the newest firmware release.

IF and opt

You can connect to the device using multiple interfaces. The if is the string defining which interface driver the tool should use. If you want to pass the -i option directly to the tool executable, you have to provide the whole filename there (e.g. -imsg_usb.dll). The opt is the option string with per-interface dedicated format. It refines the connection parameters.

More about interface drivers

Addr, local and mesh

The addr is the main, logical link address of your device (evaluated as a decimal string). The address is represented in a 16-bit number, but the actual address range depends on the chosen interface. A special value of -1 is used to choose a broadcast method. If you have multiple devices on a bus and choose a broadcast method, the behavior is undefined. A typical address of siliXcon device is:

siliXcon devicedefault address
controller0
BMS4
display6

The local and mesh are strings refining the link addressing in the network and the values are usually application- and interface-specific. For more info, please contact siliXcon.

Dev and crd

The dev is a protocol configuration file. This file may e.g. shift addresses of services, disable some services, etc. Typically useful if your application messages are in collision with siliXcon service protocol. The dev string the 'protoconf' setting on the device side.

The crd stands for credentials. YOS supports multiple levels of entry access rights. This string specifies the authentication token that the tool shall use for the operation to perform. If not specified, the tool may not attempt logging in. In such a case, the last successful logged-in session will be continued, or the operation will be performed with the default guest:guest rights.

In the simplest form, the string is in the format of username:password.

In the floating token set-up, better securing is achieved. The format is usually username:XYZABC, where XYZABC is a floating part of the token string, cryptographically dependent on a dedicated key exchange protocol. In this case, a custom authenticator tool auth may be used for your application. Please contact siliXcon if you are interested in securing access to the device.