Board Farm & Test Automation Services

Board Farm (Private) Cloud (BFC): BFC is a tool for Embedded Hardware and/or Software Engineering teams for sharing hardware devices during a product development, maintenance or support cycle.

Test Automation Solution(TAS) -an add-on service: TAS is offered by Timesys which adds Test Automation Framework to BFC and offers continually expanding BSP test suites to test from individual drivers all the way to system performance test. Additionally, it allows users to add their own custom tests. The structure is flexible so that users can define custom test suites by selecting tests or parts of test suites from various sources and thereby allowing scenario based testing. It is also got interfaces for continuous build and test systems.

Basic Architecture

The main components of Timesys BFC are a centrally located Master with the necessary software that forms the core of BFC (plus the TAS, if added) connected to various Zombies that are placed at various locations around the corporation, as long as the Zombie has network connectivity to the Master.

A Master supports multiple Zombies and each Zombie can support upto four independent Devices (under development/test).

Master: Master presents a web interface to corporate users for connecting to the remote device of their choice, presenting a device console locally on the users machine giving them full access and an experience as if the device is right next to them.

Zombie: This is a Timesys supplied hardware. It is placed in remote locations, and comes to life when addressed by the Master. Zombie, normally will execute commands from the Master.

-Each Zombie can support four devices(DUT) that can be allocated to users for a particular duration of use.

IOCX - IO Controller and Expander is a hardware supplied by Timesys. It connects DUT to Zombie for providing SDMux, Hotplug Ethernet and USB, user controlled GPIO pins and I2C bus.

Device (DUT): It is any physical hardware board, a device or system that a user needs to work on or test.

Device Boot:
The following boot methods are supported:
  • Netboot: This feature, when enabled, allows a device to boot itself from an image stored at a network location. The kernel,rfs and dtb files are files are downloaded to Zombie’s DUT folder by the user and DUT will boot using NFS mount. The kernel and DTB files are loaded using tftp and rfs is loaded using NFS mount.
    Please Note: For network boot , the root file system(rfs) must be on the network which is accessible from the device.
  • SD Card: To boot a board remotely thru SD Card to test new images without human intervention, Timesys has developed an IO Controller and Expander (IOCX) with SDMux capability. It allows the user to switch the SD Card between Zombie and device through a toggle button available for SDMux. This allows the operation of uploading the images from the user to Zombie when sd card is connected to Zombie side through SDMux.
  • eMMC boot: Many devices support on board NAND and MMC interface. Either interface can be used for booting a system. NAND boot is raw boot, as it reads raw data and manipulate it. MMC boot is FAT boot, as it reads file from mmc sector and manipulated it. eMMC boot can be FAT boot or raw boot.

Quick Start Guide

Adding a device

  1. Add a new device type: This feature can only be used by admin. For adding a new device type if not present already, user needs to request the administrator to add a new device type.
  2. Add a new device: If device is not present, follow these steps to add a new device.

Device allocation

To access the device’s web console, the device must be allocated to the user first. Follow these steps for device allocation to the user.

Access web console

After device allocation to user, web console session must be accessed. Follow these steps for web console access.

Power control features

There are three power control features to change the power state of the device. Follow these steps for power control features functionality.

Netboot

Once web console session is accessed, the device needs to be booted up for testing and other processes. SFTP is such a client to move an image for netbooting. Follow these steps for booting device through network.

Sd card boot

To flash new image on device, follow these steps and select SD card boot section.

Device release

The user must release the device after use. To release the device follow these steps

Device Retire and Activate

Only admin user has the priveleges to activate or retire a device.

To Retire a device
  1. In order to retire an active device, the target device must not be allocated to anyone.
  2. Click on 'Retire' icon present in the 'Actions' column adjacent to the target device that you want to retire.
  3. After the device is retired successfully, the 'Device Status' is changed to as 'Retired' as shown in the below image.
To Activate a retired device
  1. Click on 'Activate' icon present in the 'Actions' column adjacent to the target device that you want to activate.
  2. The activated device is now ready to be assigned to any user.

Example: Network Boot and launch console

Following are the steps to add a device, access the web console session and boot the device for testing and other processes.

  1. Add a new device type: This feature can only be used by admin. For adding a new device type if not present already, user needs to request the administrator to add a new device type.
  2. Add a new device: If device is not present, follow these steps to add a new device.
  3. Device Allocation: To access the device’s web console, the device must be allocated to the user first. Follow these steps for device allocation to the user.
  4. Access Web Console Session: After device allocation to user, web console session must be accessed. Follow these steps for web console access.
  5. Power control features: There are three power control features to change the power state of the device. Follow these steps for power control features functionality.
  6. Move an image for netbooting: Once web console session is accessed, the device needs to be booted up for testing and other processes. SFTP is such a client to move an image for netbooting. Follow these steps for booting device through network.
  7. Device Release: The user must release the device after use. To release the device follow these steps

Example: Allocation of a device & SD card Boot

After adding a device, the user needs to select the device and allocate the device for testing and other processes. In this example, SD card boot is used to flash a new image to sd card of device without any manual activity. Following are the steps to allocate the device to the user and upload a new image to sd card of device and further use the device for testing and other development processes:

  1. Device Allocation: To access the device’s web console, the device must be allocated to the user first. Follow these steps for device allocation to the user.
  2. Sd Card boot: To flash new image on device, follow these steps and select SD card boot section.
  3. Device Release: The user must release the device after use. To release the device follow these steps

HOW TO

SYSTEM MASTER DEVICE
Add a new device Hot Plug
Device Allocation
Web Console Access
Power Control Features
Netboot
Device Release
SD card boot

How to add a new Device

Following are the steps to add a new device to BFC-TAS server:
  1. Login to BFC-TAS home page/dashboard (find your url from the administrator) through web browser with your credentials
    Username : <username>
    Password : <password>
  2. This would open up BFC-TAS Dashboard.
  3. There are two ways to add new device on web server:
    1. Select ‘New Device’ option from ‘Devices’ drop down list.

      OR
    2. User can also click ‘Add Device’ button at the bottom of the page to add a new Device.
  4. ‘Add New Device’ page will appear on the screen.

    Fill the necessary fields available on the screen:

    Device could also be assigned a static IP address during Test job execution. To enable this feature check Do you want to assign Device static IP address during test execution? and enter Device's Network interface as shown in the image below.
i. Device type: A device type is a generic description of a device and identifies different qualities of that device.
In BFC-TAS, a particular DUT is an instance of a device type. For example, if beaglebone-black is a device type, then it can have many device instances like bbb01, bbb02, BBB etc that share same device type with same set of commands.When adding a device, a device type needs to be added corresponding to the device to be added. The device type can be added only by admin.
ii. Device name: <Device name> .Choose a meaningful unique name
iii. Zombie: <Zombie Name:IP Address>
iv. Device Port: DUT port that the device is plugged into on the zombie(1-4)
v. Power Switch Type: Power Switch type can be IP Controlled Power Switch or IO Controlled Switch.
vi. Power Port: Power port that the device is plugged into on the power strip
vii. Console Port: Console port number is assigned automatically to the device as per defined range.
viii. Do you want to assign Device static IP address during test execution?: By default when the device boots up during test job execution, it gets an IP address from Zombie through DHCP. When this checkbox is selected the device is assigned a static IP address.
ix. Tags: Provide a tag name to this device. This tag helps BFC identify a particular device if there are multiple devices of same type.
x. Network Interface: Device network interface used for connecting with Zombie network. It is required when Do you want to assign Device static IP address during test execution? is selected.
Click on Submit button after filling all the fields.
  1. The new device will be added on BFC-TAS server after clicking on ‘Submit’ button.
  2. User can view new devices added by selecting Devices -> All Devices option on BFC-TAS Dashboard.
  3. The new device added is listed on the ‘All Devices’ page.

How to edit Device Dictionary

The device dictionary stores information unique to the device for use with test automation. It is created with every new device added. The user can view the device dictionary under Advanced options available on Edit Device page.
The following are the steps to view or edit Device dictionary:
  1. Go to Devices -> Edit Device
  2. Select the device from drop down list.
  3. Manage device page will appear on the screen.
  4. Click on Advanced options tag and select click here to view Device dictionary.
  5. The Device dictionary will appear on the screen.
  6. The user can view and edit the Device dictionary of the device.The following are the fields in device dictionary which are by default created while adding a new device.
{% extends 'imx6q-nitrogen6x.jinja2' %}
{% set exclusive = 'True' %}
{% set hard_reset_command = 'curl  http://172.16.30.169/api/nitrogen01/power/reboot/' %}
{% set power_on_command = 'curl  http://172.16.30.169/api/nitrogen01/power/on/' %}
{% set power_off_command = 'curl  http://172.16.30.169/api/nitrogen01/power/off/' %}
{% set action_timeout_power_off = 15 %}
{% set connection_command = 'telnet localhost 3003' %}
{% set mac_address = 'e7:6d:5e:0e:c4:ac' %}
{% set memory = '1024' %}
{% set boot_character_delay = 10 %}
{% set test_character_delay = 10 %}

Must parameters in Device Dictionary are:

{% set connection_command = 'telnet localhost 3003' %}
{% set mac_address = 'e7:6d:5e:0e:c4:ac' %}
{% set memory = '1024' %}

Specifications:

set connection_command=’telnet localhost <telnet PORT from 3003-3006> ‘

set mac_address = ‘<Provide unique Mac Address>’

Set memory =’<set memory> ’

Other parameters for reference:

{% set bootloader_prompt = '=>' %}
{% set interrupt_prompt = 'Press SPACE to abort autoboot in 2 seconds' %}
{% set interrupt_char = ' ' %}
{% set console_device = 'ttyS0' %}
{% set boot_message = 'Starting kernel' %}

Specifications:
Bootloader_prompt: It is set by default in Device type of the the device but if the prompt varies then user can set bootloader prompt in device dictionary.
set bootloader_prompt = '=>'

Interrupt_prompt: If the device has interrupt prompt, then user can set interrupt prompt in device dictionary if required.

set interrupt_prompt = 'Press SPACE to abort autoboot in 2 seconds'

Interrupt_char: If the device requires to stop at bootloader prompt then set interrupt char in device dictionary.

set interrupt_char = ' '

Console_device: It is set by default in Device type of the the device but if the prompt varies then user can set console_device in device dictionary.

set console_device = 'ttyS0'

Boot_message: This confirms that booting process has passed the boot prompt and board is available to take next command from framework. Following is one of the scenario where it can be useful:
If the device requires boot message at time of login then user can set boot_message in device dictionary.

set boot_message = 'Starting kernel'

How to View Device Dictionary

Following are the steps to view device dictionary of a device.
  1. Login to BFC-TAS server through web browser using user credentials.
    Username: <Username>
    Password: <Password>
  2. Go to Devices -> All Devices.
  3. All Devices page will appear on the screen. Select the device name (here nitrogen01 is taken as reference) to view the device dictionary.
  4. On the next page, select Device Dictionary tag to view Device dictionary of the selected device.
  5. Device Dictionary of the selected device will be displayed on the screen.

How to allocate Device available on BFC-TAS server

Following are the steps to allocate board to the user available on BFC-TAS server:

  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. BFC-TAS Dashboard will appear on the screen. Select ‘All Devices’ option from ‘Devices’ drop-down list.
  3. ‘All Devices’ page will appear on the screen with the list of all devices on BFC-TAS server. Here both devices are available and could be allocated to any user for use.
  4. Click on the assign button corresponding to the device which user wants to allocate for work. Once clicked, the device is allocated to the user for use.
    Example: Here 'admin' is the user to whom device nitrogen01 is allocated for use.
  5. Also, the logged in user can view the list of all devices that are allocated to him/her by clicking on 'My Devices' option under 'Devices' link on BFC-TAS Homepage as shown in image below:

    OR
    User may click on 'My Devices' button present on home page of the application.

How to use port forwarding

BFC-TAS is providing the port forwarding feature in which you can forward any port of your DUT to your Zombie(Connected to the corporate network). By this feature, you can access any port of your DUT from corporate network .e.g. ssh, telnet etc. There are two ways using which you can forward the DUT's target port on to the Zombie:
  1. SSH Port forwarding
  2. NAT Port forwarding

SSH Port forwarding

Please follow the below steps for SSH port forwarding.
  1. Got to Devices -> All Devices and you will see the list of all available devices.
  2. Select the SSH Port Forwarding button of the device whose port you want to forward or you can see the Port Forwarding feature in the device configuration page.

    OR
  3. After clicking on any of the above given options, you will see the Device SSH Port Forwarding screen.

    In this, you have to provide various details about your DUT.
    • Zombie IP address: It will show the Zombie IP address with which your DUT is connected.
    • Device IP address: Enter the private IP address of DUT.
    • Device SSH Username: Enter the username of DUT.
    • Device SSH Password: Enter the password of DUT.
    • Device SSH Forwarding: If you want to access your DUT over the corporate network, you have to forward DUT ssh port 22 to any port of Zombie.
      SSH port forwarding is also required for the Network Console feature as well.
    • Device Port: It is the port of DUT you want to forward, in our example we are forwarding DUT port 8080 to Zombie port 8000.
    • Zombie Port: It is the port of Zombie on which you forward a port of DUT, in our example we are forwarding DUT port 8080 to Zombie port 8000.
  4. After this, Click on Forward button and if the port of Zombie is free, then your port of DUT will forward to that port. Also the ports will get non-editable, followed by 'Remove' button as shown in the image below.
  5. Whenever you access the Device Port Forwarding screen you will see the status of the current port forward details of that DUT and you can also remove the already forwarded port as well.

NAT Port forwarding

Please follow the below steps for NAT port forwarding.
  1. Got to Devices -> All Devices and you will see the list of all available devices.
  2. Select the NAT Port Forwarding button of the device whose port you want to forward.
  3. Now, Device NAT Port Forwarding screen will be shown.
  4. In this, you have to provide various details about your DUT and the port number of DUT that you want to forward on to Zombie. After this, Click on Forward button.
  5. If the port of Zombie is free, then your port of DUT will forward to that port. Also the ports will get non-editable, followed by 'Remove' button as shown in the image below.
  6. Whenever you access the Device NAT Port Forwarding screen, you will see the status of the current port forwarded details of that DUT and you can also remove the already forwarded port as well.

How to access a device's Web Console

Serial web Console Access.

Following are the steps to access a serial web console:
  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. Select ‘All Devices’ option from ‘Devices’ drop down list.
  3. Click on assign button corresponding to the device selected (nitrogen01 is taken as reference here) to allocate device to the user.
  4. Click on 'Launch Console' button to go to Device's console page.
  5. The following window will appear after selecting the Launch Console option.
    NOTE: The following screen is visible with IO-CX control panel when IO-CX control panel is connected.

    OR
    Click on hostname (nitrogen01 is taken as reference),

    and on the next page, select Launch Console option.

    The following window will appear after selecting the Launch Console option.

Network Console access

Following are the steps to access a serial web console:
  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. After login, first you have to forward your DUT ssh port to any port of Zombie. Please refer to this section for more details on SSH port forwarding.
  3. Select ‘All Devices’ option from ‘Devices’ drop-down list.
  4. Select the Port Forward button of the device whose port you want to forward OR you can see the Port Forwarding feature in the device configuration page.

    OR

    OR
    You can launch the console of the target device and Click on SSH option. Then you can configure the SSH by clicking on the link as highlighted in the image below:
  5. After clicking on any of the above given options, you will see the Device Port Forwarding screen.

    In this, you have to provide various details about your DUT.
    • Zombie IP address: It will show the Zombie's IP address with what your DUT is connected.
    • Device IP address: Enter the private IP address of your DUT.
    • Device SSH Username: Enter the username of your DUT.
    • Device SSH Password: Enter the password of your DUT.
    • Device SSH Forwarding: If you want to access your DUT over the corporate network, you have to forward DUT ssh port 22 to any port of Zombie.
      SSH port forwarding is also required for the Network Console feature.
    • Device Port: It is the port of DUT that you want to forward; in our example, we are forwarding DUT port 8080 to Zombie port 8000.
    • Zombie Port: It is the port of Zombie on which you forward a port of DUT; in our example, we are forwarding DUT port 8080 to Zombie port 8000.
  6. After this, Click on Forward button and if the port of Zombie is free, then your port of DUT will forward to that port. Also the ports will get non-editable, followed by 'Remove' button as shown in the image below.
  7. Whenever you access the Device Port Forwarding screen you will see the status of the current port forward details of that DUT and you can also remove the already forwarded port as well.
  8. To SSH the target device, again launch the console, and click on SSH option. SSH access will be provided to the user as shown in image below:
    NOTE: Currently, you can use only a single console at a time e.g. either a serial console or a network console.

ADB Console Access

Following are the steps to access ADB Console:
  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. After login, first you have to provide Device IP Address in the Port Forwarding page. Please refer to this section for more details on device port forwarding.
  3. Select ‘All Devices’ option from ‘Devices’ drop-down list.
  4. Select the Port Forward button of the device whose port you want to forward OR you can see the Port Forwarding feature in the device configuration page.

    OR
  5. On this page, provide IP Address of your DUT and click on 'Save' button.
  6. To access ADB console of the target device, again launch the console, and click on ADB option. ADB shell prompt will be shown on the screen as depicted in image below:

Launch side by side Console of two devices

Following are the steps to launch console of two devices simultaneously:
  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. Select ‘All Devices’ option from ‘Devices’ drop down list.
  3. Click on 'assign' icon corresponding to the devices selected (nitrogen01 and bb01 is taken as reference here) to allocate devices to the user.
  4. Click on Launch Side By Side Console button.
  5. Select Device_1 and Device_2 from the drop down list of assigned devices.
  6. The following window will appear after selecting the Device_2.
  7. User can also download logs of a particular device from this page by clicking on 'Logs' link (boxed in image below)

Download DUT web console logs

This feature is available when the user is present on console window.

  1. Click on Download Log button available on the screen.
  2. A page will appear on the screen to download console logs. Click on Ok button to save console logs as “consoleLogs.txt”

New Console Session

  1. This feature is available when we are present on console window.
  2. Select 'Serial' option under the 'Console Session' option as shown in the image below.
  3. A confirmation pop up window appears on the screen. Click on 'New Session' button to start a new session.
  4. The new Console session appears on the screen.

Power status message: When present on console window, the color symbol adjacent to the 'Power' navigation option shows the current power status of the DUT. Red means the power is OFF while Green means the power is ON.

Enable KGDB Debugging

KGDB is a source level debugger for Linux kernel. This section will provide information about how a KGDB enabled board can be debugged remotely using Timesys BFC-TAS.
We can achieve this functionality by using the USB-Over-IP feature of BFC-TAS and one time setup on your Local Linux machine.

Steps to be performed on BFC-TAS and Zombie: Identify the board that you want to debug.
  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. After login, click on 'My Devices' option under the 'Devices' dropdown.
  3. Click on the device name connected to the concerned Zombie that you want to debug.
  4. Select 'Manage Device' option.
  5. Identify the board Zombie IP and serial console port.
  6. Now, select 'Zombie Workers' option under the 'Zombies' dropdown.
  7. Click on 'View Zombie status' icon under the 'Actions' column of the concerned Zombie.
  8. Now user will be redirected to the Zombie status page.
  9. On this page, under 'USB Devices' section, all the USB devices connected to that Zombie are listed.
  10. Click on 'Login' button present on top right corner and provide valid login credentials to login.
  11. Then click on 'Zombie Status' tab.
  12. Identify your device, and click on 'Toggle' button.
  13. Device's status now gets changed to 'Shared'. Now the device is available to be accessed remotely.
  14. This is all you need to do on BFC-TAS and Zombie. Now you have to setup your local Linux machine to debug the board.
Steps to perform on Local Linux Machine: Follow the steps mentioned in the link on the Zombie status page.
  1. Follow the link as mentioned in the image below (present at the bottom of Zombie Status page), and it will provide you all the information needed to install and use 'usbip'.
  2. Click on the link and follow all the steps mentioned.
  • Install usbip utility in your local linux machine (from where you want to access the device connected on BFC).
  • After successfully attaching the remote device serial console to local machine, it will start showing it’s entry in system device tree.
  • Now you can access this device from your Local machine.

Manage Power Switches

Add a New Power Switch

  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. After login, click on 'New Power Switch' option under 'Zombies' dropdown.
  3. 'Add Power Switch' screen will open. Input all the required details and click on 'Submit' button. User may also add some custom commands by clicking on 'Add More Commands' link present at the bottom.

Edit Power Switch

  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. After login, click on 'Edit Power Switch' option under 'Zombies' dropdown.
  3. Select the Power Switch that you want to edit from the dropdown.
  4. Screen to edit Power Switch Details will be shown on the screen. Make the required changes and then click on 'Submit' button. A confirmation message will be shown on the screen.

Power Switches List

  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. After login, click on 'Power Switches' option under 'Zombies' dropdown.
  3. List of all the entered Power Switches will be shown on the screen.
  4. User may delete a power switch by clicking on 'Delete' action as shown in image below.

Power Control Feature

Through BFC-TAS Server, user can control the power state of the device connected to any Zombie.

There are three power switch options available:
  • Power On
  • Power Off
  • Reboot

These options are available on device’s web console screen:

Once user clicks on the Power On/Power Off/Reboot button, the power state of board changes and the color symbol is displayed on the screen.

Power On Confirmation:

When the color adjacent to 'Power' label is Green, it means the Power is ON.

Power Off Confirmation:

When the color adjacent to 'Power' label is Red, it means the Power is OFF.

Reboot Confirmation:

When the color of 'Power' label switches from Red to Green, irrespective of current color, it means the reboot is successful.

API Calls

The user can provide api calls from command line terminal as well as web browser. The following is the format for providing API calls for changing the power state.

From Web browser:

http://{Master IP Address}/api/<devicename>/power/<on, off, reboot>/

Example:
http://192.168.12.81/api/nitrogen01/power/on/
Output: result : "Success" 

From Command line terminal:

 $ curl http://{Master IP Address}/api/<devicename>/power/<on, off, reboot>/'

Example:
$ curl http://192.168.12.81/api/nitrogen01/power/off/
{"status": "off", "result": "Success"}

$ curl http://192.168.12.81/api/nitrogen01/power/on
{"status": "on", "result": "Success"}

$ curl http://192.168.12.81/api/nitrogen01/power/reboot
{"status": "reboot", "result": "Success"}

How to release Device available on BFC-TAS server

Following are the steps to release device access on BFC-TAS server:
  1. Login to BFC-TAS home page/dashboard (find the url from administrator) through web browser with your credentials.
    Username : <username>
    Password : <password>
  2. BFC-TAS Dashboard will appear on the screen. Select ‘All Devices’ option from ‘Devices’ drop down list.
  3. ‘All Devices’ page will appear on the screen with list of all devices on BFC-TAS server. Here both the devices are allocated to user admin and are unavailable for use.
  4. Click on 'Release' icon corresponding to the device which you want to release.
  5. Once clicked, the device is released from the last assigned user.

    Example:Here admin is the user to whom device nitrogen01 was initially allocated for use. Once Actions tag was selected , device was released from the admin user.
  6. Click on the device which was released from use by user and on next page, the user is prohibited from device’s web console access.

    The above steps releases the device from use.
    OR
    If the user is present on the Console page and the device is free from use, the user can release the device with the help of “Release Device” button available on Console page.

    The device is released and free for use for any user. The user can verify for released device on Devices -> All Devices

BFC File Manager

User can list all the files that are present on the BFC Master using this interface. Follow the steps below to view this page.

  1. Login to BFC-TAS home page/dashboard (find the url from administrator) through web browser with your credentials.
    Username : <username>
    Password : <password>
  2. BFC-TAS Dashboard will appear on the screen. Select ‘BFC File Manager’ option from ‘Devices’ drop down list.
  3. BFC File Manager page will be shown on the screen. All the files uploaded on to BFC Master will also be visible on this page.

How to boot the device using Network Boot

Using this feature, a user can boot the DUT from a network rather than an SDCard connected on SDMux.

Procedure to​​ copy​ BSP Files​ on to Zombie

Go to the concerned device's console and follow the steps given below to copy BSP Files. Follow these steps to Launch Console of the concerned device

1. Select 'Network Boot' option shown on the console screen.

2. Network boot page will be shown on the screen. Also, all the boot image details will be present on this screen.

3. Click on 'Upload New Image' link shown on the page.

4. Upload all the desired files needed for booting the DUT.

5. After selecting all the concerned files, click on 'Upload and Transfer' button.

6. A progress bar will be shown on the screen regarding image transfer.

7. After successful image transfer, a success notification message will be shown on the screen.

8. The list of newly transferred files can be viewed by clicking on 'Network Boot file Manager' link. These files are present on the Zombie connected to the DUT.

Now follow these steps to Boot DUT with New BSP.

Booting DUT with New BSP

Once​ BSP​ files​​ are​ copied,​ follow​ steps​ mentioned below​ to​ boot DUT​ with​ new​ BSP​ files.

  1. Access​ ​device ​web console​ ​via​ BFC-TAS Server​.​ ​Go to​ ​U-boot​ prompt​ of​ DUT​ as​ shown​ ​below.

    Configure​ boot arguments in​​ u-boot​ prompt​ ​to​ boot​​ DUT​ from​​ NFS​ rootfs​ of​ Zombie.
    Execute​ following​ commands​ in​ u-boot​ prompt​ to​ perform​ this​ action
    => setenv serverip <Zombie IP>
    => setenv bootargs​ ​ console=<serial console>,<baud rate> ​ root=/dev/nfs​ ​ rw nfsroot=<Zombie IP>:<exact rootfs location>,tcp,hard,intr​ ​ip=dhcp
    Example:
    => ​ ​ setenv​ ​ serverip​ 192.168.111.1
    => ​ ​ setenv​ ​ bootargs​ ​ console=ttyS0,115200n8​ ​root=/dev/nfs​ ​rw nfsroot=192.168.111.1:/var/lib/lava/dispatcher/tmp/upload/DUT4/rootfs,tcp,hard,intr​ ​ip=dhcp
    NOTE:Here​ replace​ DUT4​ with​​ your​ DUT​​ directory​ where​ you​ have​ copied​ BSP​ files and replace the directory name for extracted rootfs with your directory name.
  2. Now​ ​assign​ automatic​ IP​ address​ to​ DUT.​ By​​ executing​​ ‘dhcp’​ command on U-boot, ​DUT​ will​ be assigned a new​ IP address.
    => ​ ​ dhcp
  3. Once​​ DUT​​ is​ bound with​ IP​ address, load​​ kernel​ file​ from zombie TFTP​ to DUT by executing the following command:
    = > ​ ​ tftp​ ​ 0x82000000​ ​ ​ 192.168.111.1:upload/DUT4/<kernel_binary_file> = > ​ ​ tftp​ ​ 0x88000000 192.168.111.1:upload/DUT4/<dtb_file>
    Note-​ ​ Replace <kernel_binary_file> with your​ kernel​​ binary file name and Kernel address could​ ​ be​ different for your board. DUT4 should also be changed to your DUT directory where BSP files were uploaded.
  4. Once​ kernel​ file is loaded, then similarly​ load​ DTB​​ file​ . After loading DTB execute following command to boot DUT​ with​ new​​ BSP. = >booti​ <kerneladdr>​ ​- <dtbaddr>
    Example: =​ ​> booti​​ 0x82000000​​ - ​0x88000000
    Depending on Kernel image types, there are various boot options available:
    Example1: If kernel image type is Image
    => booti​​ 0x82000000​ - ​0x88000000
    Example2: If kernel image type is uImage = > bootm 0x82000000 - 0x88000000
    Example3: If kernel image type is zImage = > bootz 0x82000000 - 0x88000000
    The device is booted through network boot and is ready for testing and for performing other processes on the device. Monitor​ to see​ Login​ prompt​ of​ DUT​ to​ verify​ that​ DUT​ successfully​ booted​​ with new BSP.Verify​ to​ ​see​​ changes​ ​of​ ​New​ ​BSP​ ​and​ perform​ ​further​ ​test​ ​functionality.

How to flash a new image with SDMux

Following are the steps to flash a new image with the help of SDMux:
  1. Login to BFC-TAS home page/dashboard (find your url from the administrator) through web browser with your credentials.
    Username : <username>
    Password : <password>
  2. The following page will appear on the screen. Select ‘All Devices’ option from ‘Devices’ drop down list.
  3. The hostname is selected from the ‘All Devices’ list.
    For example: Here nitrogen01, the selected device is highlighted as shown in image below.
  4. Select Launch console tag adjacent to action tag to Launch Console page.

    or
    Click on hostname on 'All Devices' page

    and on the next page, select Launch Console option.
  5. The following Web Console session will appear on the screen if the IO-CX board is connected.

    NOTE: If IO-CX board is not connected then the following Console screen appears on the screen and the user cannot access SDMux functionality.
  6. To upload an image on SDMux , first turn off the power of device(board) by clicking on 'OFF' option. The 'SDMUX: Zombie' option will turn to red as shown in the image below. Then click on 'SDMux' option.
    1. Switch to Zombie: SDMux allows the user to switch the sd card between Zombie and the device. By default the sd card is mounted on device(board).
    2. Select .gz Image: The image includes kernel file,dtb and rfs that must be compressed to .gz format before uploading it to device’s sd card.
    3. Upload image to <board>: This process will upload the new image to sd card and remove the current image from sd card of the device.
  7. Now user will be redirected to SDMux page to Upload and Transfer Image.
    There are two ways to Upload and Transfer Image.
    1. Select Existing Image - In Select existing image section, there is a list of already uploaded images. The user can upload the image by selecting from the drop down.

      Select the image from the drop down and then chose on which partition of the memory card is this image to be written.

      Select 'Upload' button to upload the image. The SDCard on SDMux has 2 partitions as shown in the image above. The user can select any partition to upload the image on. It can either be uploaded on the entire SDCard or on any partition available.
    2. Upload new Image- The user selects 'Upload new Image' option.

      Select gz type image for uploading.

      Select Upload button to upload the image. The SDCard on SDMux has 2 partitions as shown in the image below. The user can select any partition to upload the image on. It can either be uploaded on the entire SDCard or on any partition available.
  8. A message will be displayed that Image is being transferred.
  9. After successful image upload, select Launch console button to start Console session. Also, after the image is uploaded successfully, SDMux switches to device on its own.

SDMux API Calls

The user can provide api calls from command line terminal as well as web browser. The following is the format for providing API calls for SDMux:

From Command line terminal:

$ curl http://{Master IP Address}/api/<devicename>/sdmux/<status, switch, switch/zombie/, switch/device/

Example:
 $ curl http://192.168.12.81/api/bbb09/sdmux/status/
 Output: {"side": "device"}

 curl http://192.168.12.81/api/bbb09/sdmux/switch/
 Output: {"result": "Success", "side": "zombie"}

 curl http://192.168.12.81/api/bbb09/sdmux/switch/device/
 Output: {"result": "Success", "side": "device"}

 curl http://192.168.12.81/api/bbb09/sdmux/switch/zombie/
 Output: {"result": "Success", "side": "zombie"}

From Web browser:

'http://{Master IP Address}/api/<devicename>/sdmux/<status, switch, switch/zombie/, switch/device/>/'

Example:

http://192.168.12.81/api/bbb09/sdmux/status/
side : device

How to flash a new image with USBMux

Following are the steps to flash a new image with the help of USBMux:
  1. Login to BFC-TAS home page/dashboard (find your url from the administrator) through web browser with your credentials.
    Username : <username>
    Password : <password>
  2. Go to Devices -> Edit Device.
  3. From the drop down, select the target device that you want to use with USBMux.
  4. Manage device page will appear on the screen. Click on “Show Advanced Options” and search for IOCX Mux mode.
  5. Switch IOCX Mux mode to USBMux. And Choose the HotPlug used for Mux functionality(where USB SD Card reader is connected to IOCX). Then click on 'Save' button.
  6. Go to 'All Devices' page and verify the MUX mode of the device.
  7. Go to Console page of the device. 'USBMux' option present on the page.
  8. To Switch USBMux to Zombie side, click on “USBMux” option in the control panel and on the respective Hotplug port. (As shown in the image below, USBMux and Hotplug4 will turn RED, meaning they are now connected to Zombie side.)
  9. On the Console screen, click on “USBMux” control in the control panel.
  10. USB Mux page will appear on the screen showing details of the memory card connected to the target device.
  11. There are two ways to Upload and Transfer Image.
    1. Transfer an existing Image to USBMux SD Card.
    2. Upload New Image to USBMux SD Card.
  12. Also, user can View/Delete Images uploaded on BFC Server.

How To Access webcam Live Streaming

  1. Edit the Zombie details of the respective Zombie of target device. Go to Zombies > Edit Zombie page. Select the zombie from the dropdown.
  2. 'Manage Zombie' page will appear on the screen. Select the checkbox next to 'Is Streaming Web Camera Connected ?'.
  3. A success message will be shown on the screen that the Zombie details have been updated.
  4. Launch the console of the target device. Follow these steps to Launch Console of the concerned device
  5. Click on 'Video Streaming' option.
  6. After selecting the option, Live Streaming will start on the same page.
  7. Sometimes webcam couldn't stream the video; in that case, access the APP Zombie Config and select Re-connect Web Camera option.

How To Capture Image on webcam

  1. Edit the Zombie details of the respective Zombie of target device. Go to Zombies > Edit Zombie page. Select the zombie from the dropdown.
  2. 'Manage Zombie' page will appear on the screen. Select the checkbox next to 'Is Image Capture Web Camera Connected ?'.
  3. A success message will be shown on the screen that the Zombie details have been updated.
  4. Launch the console of the target device. Follow these steps to Launch Console of the concerned device
  5. Click on the 'Capture Screenshot' button.
  6. Details of the captured image will be shown on the screen. Click on 'here' link to view the last captured image.
  7. To view the list of all captured images, click on 'Image Browser' option.

How To Hear audio from connected mic

  1. Edit the Zombie details of the respective Zombie of target device. Go to Zombies > Edit Zombie page. Select the zombie from the dropdown.
  2. 'Manage Zombie' page will appear on the screen. Select the checkbox next to 'Is Audio Mic Connected ?'.
  3. A success message will be shown on the screen that the Zombie details have been updated.
  4. Launch the console of the target device. Follow these steps to Launch Console of the concerned device
  5. Click on the 'Audio Streaming' button.
  6. List of all connected microphones will be shown on the screen. Chose the target audio source from the dropdown. Browser will start to stream the audio of selected audio source.
  7. Sometimes audio source couldn't stream the audio; in that case, access the APP Zombie Config and edit the Streaming port.

BFC APIs

Hotplug

The user can provide api calls from command line terminal as well as web browser. The following is the format for providing API calls for Hot Plug:

From Command line terminal:

$ curl http://{Master IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/<on, off, status, switch>/

Example:
$ curl http://172.16.30.65/api/bbb09/hotplug/1/on/
Output: {"status": "on", "result": "Success"}
$ curl http://172.16.30.65/api/bbb09/hotplug/1/off/
Output: {"status": "off", "result": "Success"}
$ curl http://172.16.30.65/api/bbb09/hotplug/1/status/
Output: {"status": "off", "result": "Success"}
$ curl http://172.16.30.65/api/bbb09/hotplug/1/switch/
Output: {"status": "on", "result": "Success"}

From Web browser:

http://{Master IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/<on, off, status, switch>/

Example:
http://172.16.30.65/api/bbb09/hotplug/1/on/
Output: result : Success

Power Control

From Web browser:

http://{Master IP Address}/api/<devicename>/power/<on, off, reboot, userDefinedCommand>/

Example:
http://172.16.30.65/api/bbb09/power/on/
Output: result : "Success" 

From Command line terminal:

 $ curl http://{Master IP Address}/api/<devicename>/power/<on, off, reboot, userDefinedCommand>/'

Example:
$ curl http://172.16.30.65/api/bbb09/power/off/
{"result": "Success"}

$ curl http://172.16.30.65/api/bbb09/power/on/
{"result": "Success"}

$ curl http://172.16.30.65/api/bbb09/power/reboot/
{"result": "Success"}

Network Console

Add Device Port Forwarding

$ curl http://{Master IP Address}/manage/device/portmap/addmap/ -d "zombie_port=<ZombiePort>&dut_port=<DevicePorttoForward>&device_ip=<DeviceIPAddress>&device_id=<devicename>&username=<DeviceSSHUsername>&dut_pw=<DeviceSSHPassword>" -X POST

Example:
$ curl http://172.16.30.65/manage/device/portmap/addmap/ -d "zombie_port=8096&dut_port=80&device_ip=192.168.111.13&device_id=bbb03&username=debian&dut_pw=temppwd" -X POST
 Output: {"result": "pass"}

Remove Device Port Forwarding

$ curl http://{Master IP Address}/manage/device/portmap/delmap/ -d "zombie_port=<ZombiePort>&dut_port=<DevicePorttoForward>&device_ip=<DeviceIPAddress>&device_id=<devicename>&username=<DeviceSSHUsername>" -X POST

Example:

$ curl http://172.16.30.65/manage/device/portmap/delmap/ -d "zombie_port=8096&dut_port=80&device_ip=192.168.111.13&device_id=bbb03&username=debian" -X POST 
 Output: {"result": "pass"}

Restore Device Port Forwarding

$ curl http://{Master IP Address}/manage/device/map/restore/<devicename>/

Example:

$ curl http://172.16.30.65/manage/device/map/restore/bbb03/
 Output: {"status": "pass"}

SDMux

Transfer Image to entire SDCard

$ curl -d "image_url=<DeviceSdcardImageURL>"  -X POST http://{Master IP Address}/api/<devicename>/sdmux/transfer/

Example:

$ curl -d "image_url=http://172.16.30.81:8080/job/Sample_SDMUX_Builder_Job/lastSuccessfulBuild/artifact/images/imx6ull.img.gz" -X POST http://172.16.30.65/api/nittest/sdmux/transfer/ 
{"status": "success", "job_id": "60c6124b-1d4e-4fe5-b6b3-7e52b80f1e64"}

Transfer Image to a SDcard partition

$ curl -d "image_url=<DeviceSdcardImageURL>&partition=<SDCard partition name>"  -X POST http://{Master IP Address}/api/<devicename>/sdmux/transfer/

Example:

$ curl -d "image_url=http://172.16.30.81:8080/job/Sample_SDMUX_Builder_Job/lastSuccessfulBuild/artifact/images/imx6ull.img.bkup.gz&partition=sdb2" -X POST http://172.16.30.65/api/nittest/sdmux/transfer/ 
{"status": "success", "job_id": "7d567ce9-2081-4f40-86a0-99d06d1d77eb"}

SDMux status and switching

From Command line terminal:

$ curl http://{Master IP Address}/api/<devicename>/sdmux/<status, switch, switch/zombie/, switch/device/

Example:
 $ curl http://172.16.30.65/api/bbb09/sdmux/status/
 Output: {"side": "device"}

 curl http://172.16.30.65/api/bbb09/sdmux/switch/
 Output: {"result": "Success", "side": "zombie"}

 curl http://172.16.30.65/api/bbb09/sdmux/switch/device/
 Output: {"result": "Success", "side": "device"}

 curl http://172.16.30.65/api/bbb09/sdmux/switch/zombie/
 Output: {"result": "Success", "side": "zombie"}

From Web browser:

http://{Master IP Address}/api/<devicename>/sdmux/<status, switch, switch/zombie/, switch/device/>/

Example:

http://172.16.30.65/api/bbb09/sdmux/status/
side : device

SDCard

From Web browser:

http://{Master IP Address}/api/<devicename>/sdcard/<info, mount>/

Example:
http://172.16.30.65/api/nitrogen02/sdcard/info/
Output: {"total_size": "14.6G", "device": "sdb", "result": "success", "partitions": [{"type": "part", "dev": "sdb1", "size": "8M"}, {"type": "part", "dev": "sdb2", "size": "1G"}]}

From Command line terminal:

 $ curl http://{Master IP Address}/api/<devicename>/sdcard/<info, mount>/

Example:
$ curl http://172.16.30.65/api/nitrogen02/sdcard/info/
{"total_size": "14.6G", "device": "sdb", "result": "success", "partitions": [{"type": "part", "dev": "sdb1", "size": "8M"}, {"type": "part", "dev": "sdb2", "size": "1G"}]}

$ curl http://172.16.30.65/api/nitrogen02/sdcard/mount/
{"url": "http://172.16.30.93:8003", "success": true}

GPIO

GPIO Pins Hardware setup
  1. The following image shows how User GPIO pins are setup.
    These GPIO pins are in the pair of PIN-GROUND format. The following image representation is for Pins 1 to 6.
  2. To set up I2C GPIO pins, see the following image.
    The following image representation is for Pins 7 and 8. These Pins are connected to the I2C bus on first and third pins, starting from the left.

From Command line terminal:

$ curl -k http://{Master IP Address}/api/<devicename>/gpio/<command>/<gpio_pin_pattern>/<gpio_pin_data>

Here's a table overview of the commands, arguments, and the inputs and outputs:

Commands gpio_pin_pattern gpio_pin_data output
read_mode 1-255 Current GPIO pin modes as dec (0-255)
write_mode 1-255 Current GPIO pin modes as dec (0-255)
byte_mode 1-255 0-255 Current GPIO pin modes as dec (0-255)
mode_status 1-255 Current GPIO pin modes as dec (0-255)
bit_mode 1-8 {read,write} Current GPIO pin modes as dec (0-255)
read_byte 1-255 Current GPIO values as dec (0-255)
write_byte 1-255 0-255 Current GPIO values as dec (0-255)
read_bit 1-8 Current GPIO value as bin (0-1)
write_bit 1-8 0-1 Current GPIO value as bin (0-1)

Any value listed as either 0-255 or 1-255 is a decimal representation of the GPIO input or output bytes. The 'mode' arguments refer to input (write) or output (read). For the outputs, 0 is considered 'write', and 1 is considered 'read'.

Example:

curl -k http://172.16.30.221/api/elo01/gpio/read_mode/254
Output: {"result": 255}

How to change your login password

Following are the steps to change the password of the logged in user:
  1. Sign in to BFC-TAS homepage/dashboard using valid credentials.
  2. Click on your username on the top and click on 'Profile' link.
  3. User's profile details will be shown on the screen. Now click on 'update' link.
  4. Enter the details and click on 'Change' button to apply changes.
  5. A confirmation message is shown on the screen regarding successful password update.

USB/IP Management

We can achieve this functionality by using the USB-Over-IP feature of BFC-TAS and one time setup on your Local Linux machine. Following are the steps to access remote USB device on your local machine, given the USB is connected to any port of Zombie.

Steps to be performed on BFC-TAS and Zombie: Identify the USB device that you want to access remotely.
  1. Login to BFC-TAS homepage/dashboard (find the URL from the administrator) through a web browser with your credentials.
    Username : <username>
    Password : <password>
  2. After login, select 'Zombie Workers' option under the 'Zombies' dropdown.
  3. Click on 'View Zombie status' icon under the 'Actions' column of the concerned Zombie.
  4. Now user will be redirected to the Zombie status page.
  5. On this page, under 'USB Devices' section, all the USB devices connected to that Zombie are listed.
  6. Click on 'Login' button present on top right corner and provide valid login credentials to login.
  7. Then click on 'Zombie Status' tab.
  8. Identify your USB, and click on 'Toggle' button.
  9. USB's status now gets changed to 'Shared'. Now the USB is available to be accessed remotely.
  10. This is all you need to do on BFC-TAS and Zombie. Now you have to setup your local Linux machine to access the USB.
Steps to perform on Local Linux Machine: Follow the steps mentioned in the link on the Zombie status page.
  1. Follow the link as mentioned in the image below (present at the bottom of Zombie Status page), and it will provide you all the information needed to install and use 'usbip'.
  2. Click on the link and follow all the steps mentioned.
  • Install usbip utility in your local linux machine (from where you want to access the remote USB).
  • After successfully attaching the remote USB to local mac hine, it will start showing its entry in system device tree.
  • Now you can access this USB from your Local machine.
  • To free the USB device after user, click on 'Toggle' icon to un-share the target device.

NOTE: 1USB Device can be accessed only by 1 user at a time.

Appendix

Troubleshooting

Unable to Network Boot the device

Go to device's console and perform below steps to troubleshoot the Network boot issue.
  1. Check if device's u-boot supports Network mount (nfs-mount).
    If yes, proceed to next step.
    If not, upgrade u-boot.
  2. Check if nfs-utils is installed on the device. Run the following command and observe its output:
    $ mount -t nfs ZombieIP:/directory /mnt
  3. Follow the steps below for the observed outputs.
  • nfs-utils: command not found: It means that nfs-utils is not installed on the device.
    There are 2 ways to install nfs-utils on the device:
    1. If the device supports apt-get, go to device's console and run the following command:
      $ apt-get install nfs-common
      OR
    2. Build a new BSP for the device containing nfs-utils.
  • No route to host: This can be caused by the RPC messages being filtered by either the host firewall, the client firewall, or a network switch. Verify if a firewall is active and if NFS traffic is allowed. As a quick test one can switch the firewall off by:
    $ service iptables stop
    on both the client and the server. Try mounting the NFS directory again. Do not forget to switch it back on and configure it correctly to allow NFS traffic/
  • mount clntudp_create: RPC: Port mapper failure – RPC: Unable to receive: Make sure that both the NFS service and the portmapper (RPC) service be running on both the client and the server. Check it like this:
    $ rpcinfo -p
    $ service portmap status
    $ portmap (pid 7428) is running... [portmap service is started.]
    If not, start it with the commands give below.
    $ chkconfig portmap on
    $ service portmap start

TAS Test Document

Navigate