USB commands

You can run diagnostic and maintenance USB commands on your MindConnect Element.

The following lists various USB commands and the respective JSON format:

Copy agent logs to USB stick

You can create agent runtime log files and provide them by using the USB stick.

The following command will collect all log files, put them into a .tar.gz file and copy this file to the USB stick.

JSON format:

{

  "Commands": [

   {

    "Cmd":"CopyAgentLogsToUsbStick"

   }

  ]

}

Copy archived logs to USB stick

You can retrieve archived log files from MindConnect Nano/IoT2040 by using the USB stick. The following command will copy all archived log files to a sub directory on the USB stick and delete the copied log files from the archive folder optionally. The USB stick should be larger than 200 MB.
Sub directories on the USB stick will have following structure: ConBox_<BOX ID>/<CurrentTime>Sample:ConBox_J47110815/20180318T191647

JSON format:

{

  "Commands": [

   {

    "Cmd":"CopyArchivedLogsToUsbStick",

    "DeleteAfterCopy":"false"

   }

  ]

}

Copy system files to USB stick

For analysis purpose you can copy system files to a USB stick by providing a ConBox_Commands.json file on the USB stick that contains the CopySystemFilesToUsbStick command.

The following command will collect the requested system files and provide them as a ConBox_<deviceID>_SystemFiles.tar.gz file on the USB stick.

JSON format:

{

  "Commands": [

   {

    "Cmd": "CopySystemFilesToUsbStick",

    "TypeOfFiles": "LinuxSystemFiles"

   }

  ]

}

System files:

Depending on the value of TypeOfFiles the .tar.gz file will contain different system files.

TypeofFiles

Collected system files

LinuxSystemFiles

/persistent/config/hosts

/persistent/config/interfaces

/persistent_massdata/sysmsg.log

/persistent_massdata/sysmsg.log.0

/tmp/resolv.conf

/tmp/sysinfos.info

/var/log/boot

/var/log/dmesg

/var/log/fsck.log

AgentSystemFiles

/persistent_appconfig/dns.static

/persistent_appconfig/loggingconfig.ini

AllSystemFiles

All Linux and Agent system files listed above. 

Change system time

For the case that the system time should have been changed so that agent runtime is no longer able to connect to MindSphere, you can retrieve the backend time to correct the system time. The following command provides the possibility to change the system time manually via ConBox_Commands.json file on the USB stick.

JSON format:

{

 "Commands": [

  {

    "Cmd": "SetSystemTime",

    "NewTime": "2017-09-19T12:34:56"

  }

 ]

}

Perform factory reset

For factory reset a ConBox_Commands.json file can be provided by using the USB stick.

The network settings will be reset to their initial state on MindConnect Nano/IoT2040. All temporary files will be then deleted. At the end the MindConnect device will be restarted automatically.

The factory reset command is available on MindConnect Nano/IoT2040 version 03.01.00.00 b00x or later.

JSON format:

{

  "Commands": [

   {

    "Cmd": "DoFactoryReset",

    "DeviceID": "_MindConnect_ID_"

   }

  ]

}

You can find more information on how to set a MindConnect Element to factory settings in chapter Manual firmware update of MindConnect Element