Skip to main content
FW version: Stable

Communication interfaces

info

TLDR: SWtools supports various communication interfaces. Your system has to have support for the one you like. The design of the interface drivers was done with emphasizing low-level, conection-less, plug-and-play style of operation.

tip
  • Suggested connection to the siliXcon devices is trough CAN. Use Kvaser or PeakCAN dongle.
  • Use USB interface for connecting to the siliXcon device, when the is without power.

You can connect to the device using multiple interfaces. Please check your device's datasheet regarding what is available. Also, different interfaces have different specifics (e.g. USB is more prone to interference, CAN requires a specific hardware, etc). Each interface driver is held in a shared library (.dll on Windows) and linked by the tool to communicate with the device. Each interface driver has a dedicated format of option string.

Interface namephysicaltopology and features
usbUSB1:n (multiple devices can be connected to a single PC as long as they have different addresses)
kvaserCAN1:n (multiple devices can be connected to a single bus as long as they have different addresses, multiple Kvaser channels/dongles can be used)
pcanCAN1:n (multiple devices can be connected to a single bus as long as they have different addresses, multiple Peak CAN channels/dongles can be used)
umsgSerial port1:1 note that ASCII stream service of the device is available through a generic COM/tty terminal as well
fwdlogical (use your device as a gateway/proxy for another device)1:n (depends on the forwarded interface) This is a logical interface driver (needs to load another, physical interface driver to establish a physical link to the gateway device)
btBluetooth1:1 requires Bluetooth pairing
udpUDP/IP1:n requires reachable networking
usbdkUSBdeprecated
dmsgSWD/JTAGdeprecated

USB

info

To communicate with a controller during operation, you must first connect the controller to a power source (battery) and then connect the USB. Reverse order only leads to activation of the processor without power stage, the driver layer will not initialize. Readings might be zero, but you can download logs or upload configuration without power.

Why is not recomended to use USB with controllers.

USB interface on the controllers is galvanically connected to the BAT-. This brings us two potential problems:

Interference problems EMI from the motor phases can be transferred to the USB interface and cause communication problems. USB is not robust interface for this kind of application. Result of this are just comunication problems. Also this differs from notebook to notebook. Some notebooks are more robust, some are not. Also cheap USB cables, without proper shielding can cause problems.

Frying your USB port In case of situation, when BAT+ touch your workbench, full battery voltage can reach your notebook chasi and trough the USB back to the controller. In best scenario, only one USB port on your notebook is dead, in worst, you can fry your notebook.

The reason, why CAN is recomended is, that CAN dongle have galvanic isolation between USB and CAN BUS, so this kind of problems are not possible.

To avoid this, you can use USB isolator, but these are also sensitive to EMI. And CAN dongle starts from 10USD on Aliexpress (which is cheaper than USB isolator).

opt string format

  • use the opt string to specify the match requirement for the socket physical location (e.g. Port*#0001.Hub*#0004)
  • use 'LOCATION' to print the physical location strings of all connected devices
  • add (*) at the beginning to reset the device upon init
  • add (!) at the beginning to proceed without a successful device init
  • add (~) at the beginning to force single-device mode
example

For most common cases, leave the opt string empty.

Windows driver

the siliXcon USB interface driver is automatically deployed by the installer. Set the if string (e.g. in LaunchPad) to usb. The driver supports multiple devices, as long as they have different logical addresses. Each time you plug a siliXcon device, you should be able to see it in your Device Manager:

device manager

Kvaser CAN

Kvaser CAN is a hardware converter manufactured by Kvaser http://www.kvaser.com/.

info

Other CAN-to-USB converters may be supported on request.

opt string format

  • Use the opt string in one of the following formats: 'conf' OR 'port,conf' OR 'position,port,conf' to specify:
    1. conf as the msgconf value; (see YOS msgconf command)
    2. port as the Kvaser CAN port
    3. position as the kvaser CAN device slot position.
  • Use 'LOCATION' to print the physical location strings of all connected devices.
  • Add (!) at the beginning to skip the init device presence check.
msgconf valuebus speed
12 Mbit/s
2 or empty1 Mbit/s
default CAN speed for siliXcon devices
4500 kbit/s
5400 kbit/s
8250 kbit/s
10200 kbit/s
16125 kbit/s
20100 kbit/s
example
  • opt = "" (empty string) - Default configuration - 1000kbit/s
  • opt = 0,4 - 500kbit/s, port 0

Note that the msgconf value may encode other bus parameters, such as timings (sampling points, SJW), selection of CAN FD vs CAN standard, etc. Please contact siliXcon for more details.

Windows driver

The kvaser driver is installed with the SWTools (full version) installer. In case CAN hardware is inserted for the first time, Windows may try to find and install device drivers, this will fail and the process ends up with a pop-up window 'Device Not Recognized'. In such a case, please reinstall Kvaser drivers manually.

After installation, the device manager shows the new device group. You should be able to see your converters once plugged into the PC. Set the the if string (e.g. in LaunchPad) to kvaser and opt string to the channel number (usually, 0, or a number that reflects the CAN channel, depending on the kind of hardware you use or if you have more kvaser converters simultaneously).

Peak CAN

PCAN-USB is a hardware adapter manufactured Peak Systems.

Cheap alternative adapter

You can also purchase alternative CAN to USB adapter from Aliexpress (and similar sites). Their price is around 10USD. Always use the "pro" variant, because have galvanic isolation between USB and CAN. These adapters come with firmware, that emulates PeakCAN adapter.

Canable

warning

If you upload original Canable 2.0 firmware to your dongle, it will not be recognized as PeakCAN adapter anymore and will not work with SWTools.

opt string format

  • Use the opt string in one of the following formats: 'conf' OR 'port,conf' OR 'position,port,conf' to specify:
    1. conf as the msgconf value; (see YOS msgconf command)
    2. port as the PCAN CAN port
    3. position as the PCAN CAN device slot position.
msgconf valuebus speed
12 Mbit/s
2 or empty1 Mbit/s
default CAN speed for siliXcon devices
4500 kbit/s
5400 kbit/s
8250 kbit/s
16125 kbit/s
20100 kbit/s
2583.3 kbit/s
4050 kbit/s
example
  • opt = "" (empty string) - Default configuration - 1000kbit/s
  • opt = 0,4 - 500kbit/s, port 0

Note that the msgconf value may encode other bus parameters, such as timings (sampling points, SJW), selection of CAN FD vs CAN standard, etc. Please contact siliXcon for more details.

Windows driver

The PCAN-USB driver is installed with the SWTools (full version) installer. In case CAN hardware is inserted for the first time, Windows may try to find and install device drivers, this will fail and the process ends up with a pop-up window 'Device Not Recognized'. In such a case, please reinstall PCAN-USB drivers manually.

After installation, the device manager shows the new device group. You should be able to see your converters once plugged into the PC.

UART (umsg)

info

On top of the UART character stream, siliXcon device employs a binary message carrier layer, called umsg. It is designed to transfer binary packets and to co-exist with the ASCII input and output.

to reach the YOS/Shell via serial interface (UART), any terminal emulation program can be used (such as TTY, puTTY, CoolTerm, etc). Automated process control communication in the ASCII (human-readable) form can be also used. All PC programs based on ASCII serial communication (terminal emulators) require a computer with a serial port. If you do not have a serial port, the common practice is to use USB-to-UART bridge (for example bridges based on chip Silicon Labs CP201x).

opt string format

"[COM port number] optionally followed by a comma and [msgconf value]"

msgconf valuebaud rate
81200 bps
92400 bps
104800 bps
119600 bps
1219200 bps
1338400 bps
1457600 bps
15115200 bps
default CAN speed for siliXcon devices
16230400 bps
17460800 bps
18921600 bps
example
  • opt = "COM3" Use UART on COM3 with default configuration (115200 bps)
  • opt = COM3,11 - Use UART on COM3 with 9600 bps

Note that the msgconf value may encode other bus parameters, such as frame configuration: parity, no of stop bits, etc. Please contact siliXcon for more details.

Windows driver

Once you have the device connected to a serial port, please check the number of your port in the Device Manager. Set the if string (e.g. in LaunchPad) to umsg and opt string to the COM number (e.g. COM3). Optionally, you can set COM parameters, e.g. COM3,15 where 15 is the msgconf value (see YOS msgconf command).

device manager

FWD

is a logical interface driver. It provides a gateway interface that can be used to connect to a device through another device. For exp. you can use any siliXcon device with CAN connected to your PC through USB as the CAN gateway and reach all other devices on the CAN.

info

For details about configuring the gateway and starting forwarding, please contact siliXcon.

opt string format

  • the string is comprised of 3 semicolon-separated sections:
    1. gateway's interface (selection of interface and msgconf value inside the gateway to forward)
    2. host interface (selection of local interface driver and its options to reach the gateway)
    3. gateway addressing (the address and other link strings to reach the gateway)
  • full string: 'modeflags:msgconf;hostlib:options;address:local:mesh'
  • individual sections may be left empty (as long as the colons and semicolons are kept)
  • add (~) at the beginning to disable transmit acknowledge

Bluetooth

siliXcon device with Bluetooth first needs to be paired with your PC. Please follow device-specific pairing instructions. Our device identifies itself using its basename, vendor and address:

device manager

Once pairing is done, set the if string (e.g. in LaunchPad) to bt.

opt string format

  • use the opt string to specify a match for the device name (e.g. '[siliXcon]')

UDP/IP

set the if string (e.g. in LaunchPad) to udp.

opt string format

  • use opt string to specify the IP address and port (e.g. '192.168.1.10:6666')
info

UDP support is preliminary. Please contact siliXcon for further information.