User Tools

Site Tools


civilinfrastructureplatform:renesasboard

Renesas IWG20M Setup & Configuration (3/5)

This set of instructions assumes you have already Setup and Configured the B@D Virtual Machine. If that is not the case please go back to the B@D Setup and Configuration wiki page. You will need to use the latest version of B@D from git for this board.

If you are using the Beaglebone Black board see this page.

Working with the IWG20M

Cabling to the IWG20M

  • The IWG20M should be powered using the wall plug - however the LAVA tests will require automated power on and off of the device so we recommend at this is done using a remote power switch such as http://www.aviosys.com/.
  • The USB-to-Serial cable provides a way to view the IWG20M console.
  • The Ethernet cable is used to connect the IWG20M to the LAN and allows the user to make an SSH connection to the IWG20M.

Connecting the USB to Serial Cable

1. Verify on your host machine (if necessary installing ser2net first) the ser2net.conf configuration file to ensure the serial port is correct for the CIP B@D Virtual Machine.

user@host:~$ tail /etc/ser2net.conf

The last line below shows that serial port /dev/ttyUSB0 is routed to the host PC's IP Address, port 8020.

 # The original config file shipped with the upstream sources can be
 # found in /usr/share/doc/ser2net/examples
 
 BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n
 
 2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner
 2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner
 3000:telnet:600:/dev/ttyS0:19200 8DATABITS NONE 1STOPBIT banner
 3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner
 8020:telnet:0:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner

2. If your USB cable uses a different USB port, edit the ser2net.conf file on the host.

user@host:~$ sudo nano /etc/ser2net.conf

3. Restart the ser2net daemon.

user@host: sudo systemctl restart ser2net.service

4. B@D now uses a private network so that the host IP address no longer needs setting in the device dictionary. If your local IP address settings are such that a change is necessary from the default 192.168.22.1, edit myrenesas.dat appropriately and then copy it into the device dictionary:

vagrant@guest:$ sudo cp myrenesas.dat /etc/lava-server/dispatcher-config/devices/iwg20m01.jinja2

Note: If you have multiple IP addresses (e.g. due to WiFi and Ethernet both being active) then it is recommended that you disable all but one network interface.

In addition you will need to configure the device dictionary entry so that the power commands are set, the git repos has this

 {# Ensure to set 'FILL REMOTE POWER COMMAND' appropriately #}
 {% set power_on_command = 'FILL REMOTE POWER COMMAND' %}
 {% set power_off_command = 'FILL REMOTE POWER COMMAND' %}
 {% set hard_reset_command = 'FILL REMOTE POWER COMMAND' %}

You should also replace FILL REMOTE POWER COMMAND with the appropriate command; for the 9258 switch the following can be set (assuming that switch has the IP address of 10.24.1.50)

 {% set power_on_command = 'curl http://10.24.1.50/set.cmd?user=admin+pass=12345678+cmd=setpower+p63=1' %}
 {% set power_off_command = 'curl http://10.24.1.50/set.cmd?user=admin+pass=12345678+cmd=setpower+p63=0' %}
 {% set hard_reset_command = 'curl http://10.24.1.50/set.cmd?user=admin+pass=12345678+cmd=setpower+p63=0+p63n=1+t63=5' %}
 

Installing those changes in the /etc/lava-server/dispatcher-config/devices/iwg20m01.jinja2 file.

5. Next, before you test the B@D Virtual Machine Setup with the Renesas IWG20M and the CIP Linux Kernel, you will need to create an initramfs with BusyBox for the IWG20M.

civilinfrastructureplatform/renesasboard.txt · Last modified: 2018/09/13 13:10 by rajmarshall