mcx-rtos v.2021.09 Network Configuration

How to change the network configuration on your controller for MCX-OS image v.2021.09.

Network adapter configuration

First log in to the controller. Either by connecting a keyboard and screen to the controller or logging in through ssh as explained in Remote Access and file transfer.

  1. Go open the interfaces file:

    sudo nano /etc/network/interfaces
    
  2. In the file find this selection of text:

    # Wired or wireless interfaces
    auto eth0
    iface eth0 inet static
        address 192.168.2.100
        netmask 255.255.255.0
        gateway 192.168.2.100
    
  3. Change the address and the gateway to the desired values. Or switch the interface to DHCP if you connect the controller to a router:

    # Wired or wireless interfaces
    auto eth0
    iface eth0 inet dhcp
    
  4. Safe the file and reboot motorcortex:

sudo reboot

Now your wired network settings are changed!

Renew the security certificate after a change of IP or hostname settings

It is possible that due to the network change the communication certificate has become invalid. For security reasons, the certificate is only valid for the ip address and hostname of the controller. MCX-Linux OS provides a certificate renewal service that checks the certificate and renews it if either it has expired or if the host name or ip address has changed. To renew the certificate, either reboot the controller or restart the cert-gen service:

sudo /etc/init.d/cert-gen restart

Optionally, you can modify the certificate settings by modifying the cert-gen config file:

sudo nano /usr/share/cert-gen/config.json

After your modification restart the service to generate the new certificate.

EtherCAT Device Configuration

The EtherCAT master needs to know which card it will use for EtherCAT. The EtherCAT network card should not be configured for normal networking.

To change the EtherCAT network settings do:

sudo nano /etc/ethercat.conf

The important settings in this file are which network adapter to use and which driver to use. Make sure that the network device that you wish to assign to the EtherCAT driver is not already taken by the normal network configuration, it should be configured as “unmanaged” (see network-adapter-configuration ). ).

You can select your network adapter by modifying the following line:

MASTER0_DEVICE="eth1"

To select the driver type, change the line:

DEVICE_MODULES="generic"

Refer to the EtherLAB documentation for a description of all available configuration options.