Command Line Tool

Description

Estimated time required: 5 minutes per command

Following the tutorial below, you can try the most important commands in the CLT.

Required hardware

  • 1 NeoCortec Evaluation boards
  • 1 USB cables

Required software

  • NeoCortec Command Line Tool (Supplied on your USB card)

Command List

getVersions

  • Function description:
    This function can be used to get the firmware and radio protocol version of a computer connected NeoCortec module.
  • Function call:
    -getVersions -port port [-reboot]
  • Arguments of the function:
    -port: Specifies the COM port through which the device system port is connected to the computer.
    -reboot: (Optional) If appended to the command, a reboot will be performed after the completion of the firmware version checking.
  • Example use cases:
    Firmware version check with reboot:
E:\Bin\CommandLine>NeoTools.CommandLine.exe -getVersions -port com10 -reboot
Enabling boot-loader: ...Done!
BootLoaderVersion: ... 1196 (0x04ac) Done!
ProtocolVersion: ... RadioProfile=Rp868 Version=1196 (0x04ac) Done!
Rebooting: ...Done!

uploadVer

  • Function description:
    This function can be used to burn a new firmware version on the NeoCortec module.
  • Function call:
-uploadVer versioned-neo-file -password passwd [-restoreSettings] [-reboot] <-port port -destinationId nodeId|-portMapper portToNodeIdMapFile> -[-destinationId nodeId] [-retryCount number]
  • Arguments of the function:
    -password: (Optional)(HEX) Your password for the NeoCortec module. This argument is only necessary when you want to use the -restoreSettings option, since it requires the readout and transfer of all the module's configuration settings to the computer. Only the settings available with your access code level will be saved. The default level 1 password for the module: 0x4c766c3130.
    -restoreSettings: (Optional) If the password argument is present, offers the opportunity to restore the config settings after firmware update.
    -reboot: (Optional) If appended to the command, a reboot will be performed after the completion of the firmware update.
    -port: Specifies the COM port through which the device system port is connected to the computer.
    -destinationId: (Optional)(HEX) Changes the NodeId of the node after the firmware update is successful. it requires the -password property to be given.
    -retryCount: (Optional) Specifies how many times the firmware update will be retried in case of an error occurring.
  • Example use cases:

    Firmware update with reboot:
E:\Bin\CommandLine>NeoTools.CommandLine.exe -port com10 -uploadVer "1196_NC868.combined.neo" -reboot
Enabling boot-loader: ...Done!
Pause 2 seconds: ...Done!
Flashing: ...........................Done!
Pause 5 seconds: ...Done!
Enabling boot-loader: ...Done!
Pause 2 seconds: ...Done!
Flashing: ..................................................................................................................................................................................Done!
Rebooting: ...Done!

Firmware update with NodeID change:

E:\Bin\CommandLine>NeoTools.CommandLine.exe -port com10 -uploadVer "1196_NC868.combined.neo" -password 4c766c3130 -destinationId 0010
Enabling boot-loader: ...Done!
Pause 2 seconds: ...Done!
Flashing: ...........................Done!
Pause 5 seconds: ...Done!
Enabling boot-loader: ...Done!
Pause 2 seconds: ...Done!
Flashing: ..................................................................................................................................................................................Done!
Login: ...Done!
Setting ID=0010:: ...Done!
Commiting: ...Done!

Firmware update with reboot and config settings restoration:

E:\Bin\CommandLine>NeoTools.CommandLine.exe -port com10 -uploadVer "1196_NC868.combined.neo" -reboot -restoreSettings -password 4c766c3130
Enabling boot-loader: ...Done!
Login: ...Done!
Reading settings: ...Done!
Enabling boot-loader: ...Done!
Pause 2 seconds: ...Done!
Flashing: ...........................Done!
Pause 5 seconds: ...Done!
Enabling boot-loader: ...Done!
Pause 2 seconds: ...Done!
Flashing: ..................................................................................................................................................................................Done!
Login: ...Done!
Writing settings: ...Done!
Commiting: ...Done!
Rebooting: ...Done!

listenSystem

  • Function description:
    This function listens to the system port of the NeoCortec module. Please note that for this tutorial the "trace output" option was set to "01" within the configuration settings. If your command is syntactically correct, but you do not get any data from the board, check the settings.
  • Function call:
-listenSystem -port port
  • Arguments of the function:
    -port: Specifies the COM port through which the device system port is connected to the computer.
  • Example use cases:

    Listen system call with 2 neighbours:
E:\Bin\CommandLine>NeoTools.CommandLine.exe -listenSystem -port COM10
2019-01-04 11.40.41.1557 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.41.3643 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.41.5765 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.42.1552 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.42.3792 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.42.6220 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.42.7151 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.43.1547 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.43.3930 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.43.6692 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.44.1002 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.44.1540 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.44.4101 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff
2019-01-04 11.40.44.7158 : 55aa|19|0010|ff|Neighbors|ffffffffffffffff00200040ffffffffffffffffffffffff

listenApi

  • Function description:
    This function listens to the Api port of the NeoCortec module. Please note that the system port and the api port of the NeoCortec module receive different port designations. For example on the same module, the system port might be COM10, while the Api port is COM9.
  • Function call:
-listenApi -port port
  • Arguments of the function:
    -port: Specifies the COM port through which the device Api is connected to the computer.
  • Example use cases:

    Listen api call with incoming network message:
E:\Bin\CommandLine>NeoTools.CommandLine.exe -listenApi -port COM9
2019-01-04 11.57.05.7859 : HostData 52|08|0020|0014|00|112233

exportSettings

  • Function description:
    This function can be used to export he current configuration settings from a NeoCortec module. Please note that a password is required to perform this command.
  • Function call:
-exportSettings [neoSettings-file] -password passwd [-retryCount number]
  • Arguments of the function:
    -password: (HEX) Your password for the NeoCortec module. This argument is mandatory. Only the settings available with your access code level will be plotted to the command line. The default level 1 password for the module: 0x4c766c3130.
    -port: Specifies the COM port through which the device system port is connected to the computer.
    -retryCount: (Optional) Specifies how many times the settings readout will be retried in case of an error occurring.
    neoSettings-file: (Optional) Here you can specify a file to write the exported configuration settings into.
  • Example use cases:

Export configuration settings with Level 1 password:

E:\Bin\CommandLine>NeoTools.CommandLine.exe -port com10 -exportSettings -password 4c766c3130
SETTING_LAYOUT:0200000000
PSW_LEVEL_1:4c766c3130
PSW_LEVEL_2:4c766c3230
PSW_LEVEL_3:4c766c3330
ID_A:0010
NODE_APP_FUNCTION:00
CNFG_VAL_T_MAX_SD_PERIOD:008000
CNFG_VAL_T_BEACON_PERIOD:008000
CNFG_VAL_FULL_SCAN_PERIOD:01f4
CNFG_VAL_INITIAL_FULL_SCAN_PER:02
CNFG_VAL_INITIAL_FULL_SCANS:10
CNFG_VAL_INITIAL_NO_BEACON_PER:03
CNFG_VAL_RX_SD_TIME_OUT_MAX_TIMES:04
CNFG_VAL_T_MAX_NET_ROUNDTRIP:04
CNFG_VAL_APPLICATION:000000000000000000000000000000000000000000000000
CNFG_VAL_T_MAX_TIME_TO_LIVE:0f
CNFG_VAL_MAX_LOCAL_RETRIES:0a
CNFG_VAL_BID_INCREMENT_SPEED:03
CNFG_VAL_BID_HYSTERESIS:05
CNFG_VAL_MIN_FS_ROUTING:54
CNFG_VAL_RF_TX_POWER:8f
CNFG_VAL_RF_CHAN0_CHAN15:003c780c488418549024609c306ca8bcc8d4
CNFG_VAL_NETWORK_PASSWORD:4e656f436f7274656320202020202020
PANA_ENABLED:01
CNFG_VAL_HAPA_ENABLED:00
WES_NETWORK_PASSWORD:4e656f436f7274656320574553202020
WES_ENABLED:01
CNFG_VAL_BID_INIT_VAL:64
CNFG_VAL_MAX_NEIGHBORS:06
CNFG_VAL_UART0_API_INTERLEAVE:01
CNFG_VAL_T_UART0_API_CTS_SETUP:10
CNFG_VAL_T_UART0_API_WAKE_SETUP:10
CNFG_VAL_TX_NL_DOWNCOUNTER:0a
CNFG_VAL_FORCED_INTERLEAVE:00
CNFG_VAL_ALTERNATE_SOURCE_ID:0020
CNFG_VAL_HIBERNATION_CONFIG:20
CNFG_VAL_APPLICATION_1_ID:000000000000000000000000000000000000000000000000
CNFG_VAL_TIME_OUT_TO_HIBERNATION_ID:00
CNFG_VAL_NR_OF_WAKE_BURST_ID:02
CNFG_VAL_BURS_LENGTH_ID:14
CNFG_VAL_MAX_BURST_PERIOD_ID:02
CNFG_VAL_ALTERNATE_T_MAX_SD_PERIOD_ID:008000
65:0400
66:0f00
67:0f00

exportSettings

  • Function description:
    This function can be used to import new configuration settings onto a NeoCortec module. The new settings can be directly typed into the command prompt or contained in a .neoSettings file. Please note that a password is required to perform this command, and you are only able to modify the configuration fields unlocked by your password level.
  • Function call:
-importSettings [neoSettings-file|key-value-pairs] <-port port|-portMapper portToNodeIdMapFile> -password passwd [-reboot] [-retryCount number]
  • Arguments of the function:
    -password: (HEX) Your password for the NeoCortec module. This argument is mandatory. Only the settings available with your access code level will be modified. The default level 1 password for the module: 0x4c766c3130.
    -port: Specifies the COM port through which the device system port is connected to the computer.
    -reboot: (Optional) If appended to the command, a reboot will be performed after the completion of the configuration settings update.
    -retryCount: (Optional) Specifies how many times the settings overwrite will be retried in case of an error occurring.
    [neoSettings-file|: (Optional) This file should contain your new configuration settings. You can look at an example file here.
    Please note, that you do not have to fill out every configuration setting in the file. Only the key-value pairs within the file will be updated, the command leaves the rest of the settings unchanged.
    |key-value-pairs]: (Optional) Instead of providing a file you can also simply type down key-value pairs what yo wish to override into the command line.
  • Example use cases:

Single key-value pair write without reboot:

E:\Bin\CommandLine>NeoTools.CommandLine.exe -port com10 -importSettings ID_A:0011 -password 4c766c3130
Enabling boot-loader: ...Done!
Login: ...Done!
Reading existing entries: ...Done!
Settings to write:
ID_A:0011
Writing settings: ...Done!
Commiting: ...Done!

Write new settings from shortened configuration file with reboot:

E:\Bin\CommandLine>NeoTools.CommandLine.exe -port com10 -importSettings "0010_NU_AG.neoSettings" -password 4c766c3130 -reboot
Enabling boot-loader: ...Done!
Login: ...Done!
Reading existing entries: ...Done!
Settings to write:
ID_A:0010
CNFG_VAL_NETWORK_PASSWORD:4e656f436f7274656320202020202020
WES_NETWORK_PASSWORD:4e656f436f7274656320574553202020
CNFG_VAL_ALTERNATE_SOURCE_ID:0020
CNFG_VAL_HIBERNATION_CONFIG:20
CNFG_VAL_TIME_OUT_TO_HIBERNATION_ID:00
CNFG_VAL_NR_OF_WAKE_BURST_ID:02
CNFG_VAL_BURS_LENGTH_ID:14
CNFG_VAL_MAX_BURST_PERIOD_ID:02
WES_ENABLED:01
Writing settings: ...Done!
Commiting: ...Done!
Rebooting: ...Done!