This FAQ will demonstrate how to copy a configuration from one BB-400 to another BB-400 using the BB-CLI (Brainboxes Command Line Interface).

Configuration settings

The configuration settings are stored in the bb_config.yaml file in the boot partition of the BB-400, it can be accessed from the command line directly by typing:

$ sudo nano /boot/bb_config.yaml

These are settings which change infrequently and can be known even before the device is switched on, e.g. hostname, ethernet mode (DHCP or static), which io protocols are enabled, etc.
These configuration settings can be copied from one BB-400 to another, this can save time and ensures a standard configuration can be applied to multiple devices.

Steps to copy configuration settings from one BB-400 to another:

1. Copy the bb_config.yaml file from the boot partition of the BB-400 to your local machine using a file manager like WinSCP.

Here we are using WinSCP to copy files from the BB-400 to local PC.

image.png

Just drag and drop the bb_config.yaml file in the boot partition to your local folder.

image.png

2. Use one of the two methods, a or b below, to copy the bb_config.yaml file to the boot partition of the new BB-400:

a) Connecting the BB-400 as an external flash drive to your PC

  • Set the jumper to flash on the BB-400
  • Use the USB port on the BB-400 and connect it to your PC
  • Power on the BB-400 and run the RPiBoot.exe on your PC. After a few seconds, the BB-400 will pop up under Windows as a disk (USB mass storage device). The RPiBoot download link for Windows can be found here.
  • Copy/paste the bb_config.yaml file onto the BB-400 drive
  • Disconnect and power off the BB-400
  • Set the jumper back to normal mode
  • Switch on the BB-400
  • The new settings will be applied to the BB-400 during boot up.

b) Using Putty to connect over SSH

  • Note you cannot use WinSCP to copy the bb_config.yaml file back to a BB-400 as you must be logged in as a ROOT user, the default user bb can only acquire ROOT privileges by invoking the sudo command. This is by design to ensure a high level of security on the device.
  • SSH into the BB-400 using Putty and delete the old bb_config.yaml file using $ sudo rm /boot/bb_config.yaml
  • Create a new bb_config.yaml file using $ sudo nano /boot/bb_config.yaml. Paste the contents of the bb_config.yaml from your local area to the recently opened file on the BB-400 (Right click on the mouse to paste on the terminal window). Close the file using Ctrl+X and Y.
  • Run the command $ sudo bb install.
  • The install command can take a couple of minutes to complete. On successful completion it gives the following message:
    {
        "message": "Finished install",
        "success": true
    }
    

3. Validate the install was successful:

To validate an install was successful you can review the response from the install command by viewing the bb_cli.log file

$ tail -f /var/log/brainboxes/bb_cli.log  

4. Success

This FAQ show that if a user has a bb_config.yaml with a desired configuration, it can be deployed on every BB-400 that needs to have the same configuration.

This FAQ Applies to the following Brainboxes Product Ranges: