Setting up the RT Box
Network Configuration
Communication with the RT Box is done via Ethernet. The box is identified either by its IP address or by a unique hostname. The RT Box supports Zero Configuration Networking (Zeroconf) to allow identifying the box by its hostname without any additional network servers (see Set up Zeroconf).
Three networking scenarios are supported by the RT Box:
Dynamically assigned IP addresses: The RT Box is connected to a larger network and receives an IP address from an external DHCP server. Name resolution is done by an external DNS server or optionally by using Zeroconf.
Static IP address: A fixed IP address is assigned to the RT Box. The box can be accessed by its IP address. Name resolution is done by an external DNS server or optionally by using Zeroconf.
Self-assigned IP address: The RT Box is connected directly to a PC with no additional network infrastructure. Both the RT Box and the PC use automatically assigned IP addresses. Address assigning and name resolution is done by Zeroconf, the installation of a Zeroconf driver is mandatory.
Setting the hostname
Since the IP address of the RT Box is typically not known it is more convenient to access the box by its hostname. By default the hostname is set to the MAC address (without colons) with the prefix rtbox-, for example rtbox-20b0f70361c2. The MAC address is printed on a sticker below the SD card slot on the backside of the RT Box.
A custom hostname can be set by creating a text file named hostname in the directory /config/etc on the SD card of the RT Box. The file should contain a single line with the custom hostname.
Using dynamically assigned IP addresses (DHCP)
By default the RT Box is configured to use a dynamically assigned IP address from a DHCP server. No additional setup is necessary for this scenario.
After the box has been switched on the green Ready LED will turn on when the box has acquired an IP address from the DHCP server and is ready for communication.
If the box was previously configured with a static IP address it can be reconfigured to use dynamic address by removing the file /config/etc/network/interfaces from the SD card.
Using static IP addresses
Follow these steps for configuring the RT Box using static IP addresses:
Choose a suitable private IP subnet. For example, enter
192.168.0.3for the RT Box and choose192.168.0.2for the host computer.Create a text file with the following structure with your specific addresses (the parameters):
auto lo iface lo inet loopback auto eth0 # IPv4 addres: all parameters except for 'address' and 'netmask' # are optional iface eth0 inet static address 192.168.0.3 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1The file must be named
interfacesand be placed in the directory/config/etc/networkon the SD card of the RT Box.Plug the ethernet cable of the RT Box to either an ethernet port or an ethernet adapter of the host computer and boot the RT Box.
For Windows:
Open the “Network and Sharing Center” in the Windows Control Panel and click on the appropriate connection.
In the “Local Area Connection x Status” window, click on Properties.
In the “Local Area Connection x Properties” window, double-click on Internet Protocol Version 4 (TCP/IPv4).
In the “Internet Protocol Version 4 (TCP/IPv4) Properties” window, configure the static IP address of the host computer. For example, enter
192.168.0.2as the “IP address” and255.255.255.0as the “Subnet mask”.
For Mac:
“Open Network Preferences” and select the appropriate interface with a new “Service Name”.
“Manually” configure the IPv4 of the host computer. For example, enter
192.168.0.2as the “IP address” and255.255.255.0as the “Subnet mask”.
The RT Box should now be listed when clicking the Browse RT Boxes button. The RT Box can be targeted by entering the chosen static IP address of the RT Box, for example, enter
192.168.0.3or the hostnamertbox-xyz.localas the Target Device in the Coder Options dialog.
Network ports used by the RT Box
If the RT Box is to be operated behind a firewall the following TCP ports need to opened to be able access the RT Box through the firewall:
TCP Port |
Purpose |
|---|---|
80 |
Web interface |
9998 |
RPC |
9999 |
External mode |
Additionally all UDP ports used in UDP Send or UDP Receive blocks may have to be forwarded.
Firmware Update
Users can update the RT Box firmware either automatically or manually.
Automatic Firmware Update
The automatic firmware update is done via PLECS.
Make sure that the latest version of the target support package is installed on your PC. Meanwhile the firmware on the SD card inserted in your RT Box is still at a lower version.
Turn on the RT Box and make sure the ethernet cable connection between the RT Box and your PC is working.
Create a new PLECS model.
In PLECS Coder Options window, in the Target field of the Target tab, choose your RT Box type.
Next in the Target device field, click the binoculars icon to browse available RT Boxes. Select your box and you will see with an exclamation mark inside a yellow triangle, if there is an unmatch between patch versions (e.g. version 3.1.3 and 3.1.2). In case of an unmatch between major versions (e.g. version 3.1.3 and 3.0.6), you will see the exclamation mark inside a red circle, instead of a yellow triangle.
Click on the exclamation mark. Click Yes to update automatically. See the screenshot below as an example.
Fig. 1 Confirmation dialog when updating firmware
Wait for a while when the firmware on the box is automatically updated and then the box is rebooting.
Once the box is rebooted, you can close this window. The automatic update is finished. The exclamation mark no long appears since the two versions are matching now.
Manual Firmware Update
The firmware of the RT Box is stored on a SD Card which is accessible on the back side of the box. The version of the installed firmware is displayed in the Info tab in the RT Box web interface.
Follow these steps for updating the firmware:
Make sure that the latest version of the target support package is installed on your PC. The target support package is available from the Plexim website.
Turn off the RT Box. Remove the SD Card from the slot on the back of the box by pushing it in.
Put the card into an SD card reader connected to your PC.
Locate the new firmware: Open the directory containing the target support package, then open the folder
PLECS_RT_Box/firmware. It contains a sub-directory versionnumber, e.g. 1.2.0, with another sub-directory rtbox1 (for RT Box 1 and CE) and rtbox2 (for RT Box 2, 3 and 4). The firmware consists of three files: image.ub, BOOT.BIN and uboot.env.Copy the files image.ub, BOOT.BIN and uboot.env to the root directory of the SD card.
Eject the SD card and remove it from the card reader.
Place the SD card back into the slot on the back of the RT Box.
Turn on the box and reload the web interface of the RT Box in your web browser. The new firmware version should be displayed in the Info tab of the RT Box Web Interface.
Automatic Start of an Executable
It is possible to automatically run an executable directly after the startup of the RT Box. This option is useful if an RT Box should always run the same model or if no connection to a host PC is available.
Follow these steps to configure the box for this purpose:
Leave the target device field of the Target tab in the PLECS Coder options empty and generate code.
Open the output directory that is specified in the General tab of the PLECS Coder options.
Rename the file
modelname.elftoautostart.elfand copy it to the root directory of the SD card which also contains the RT Box firmware.Reboot the RT Box with the same SD card. The model will start after the RT Box has booted up.