Cytrence Kiwi: Multiple Instances

Can a Kiwi app run multiple times, so I can work with multiple target devices at the same time? The answer is yes.

Supporting multiple app instances can be convenient even if only one Kiwi is connected. For instance, a user might sometimes work with a virtual serial port connected to the side UART and at other times connect the port to the target device. While it may not save much time, having two configurations can be convenient and potentially prevent mistakes caused by forgetting to change the settings.

When multiple Kiwis and target devices are connected, having multiple running instances with distinct configurations becomes necessary. At the very least, it provides the user with greater flexibility and convenience.

Automatically Assign App Identifier

To use multiple instances of the Kiwi app, simply launch the app multiple times. Each instance will be assigned a unique identifier (ID) to distinguish it from other running instances and to ensure its configuration and log files remain unique.

The app ID can be found from the application’s title bar. The first launch is the default instance, which has no instance ID in the title bar. Subsequent instances will append ” – {ID}” in the title. When an instance is closed, the assigned ID will be released, allowing a new instance to use it.

Automatically Assigned App IDs
automatically assigned app IDs for 3 running instances

Manually Assign an App Identifier

Automatically generated app ID has an obvious drawback: the configuration associated with the instances depends on the launch order. This might be acceptable when running a couple of instances (e.g., to use the second configuration, you need to launch the app twice; the second instance will use the second configuration). However, with more instances running, it can become messy and difficult to track.

To solve the mess, you can manually assigned app ID with a friendly name via the command line. The format is:

CytrenceKiwi {appID} "friendly name"

For example:

CytrenceKiwi 10 "Raspberry Pi 5"

Here, the {appID} range is from 10 to 60 (IDs less than 10 are reserved for automatically assigned IDs).

For convenience, a one-line script or a shortcut could be created for each configurations. On Microsoft Windows, for example, 3 shortcuts are created for 3 different target devices:

Shortcuts
3 shortcuts for 3 target devices

These 3 shortcuts were created for 3 real target devices (sorry for using bare boards for this demostration):

Three different devices connect to the host PC via three Kiwis: Raspberry Pi4, Intel NUC/Ubuntu, Mac Mini

By using the shortcuts, operating those targets is much easier:

Connect/Operate 3 devices from host PC via Kiwi

Leave a Comment

Your email address will not be published. Required fields are marked *