5 Start-up PRIME Network Manager on Linux

A fully compliant PRIME v1.4 network is required to run and evaluate the Linux PRIME Network Manager application. At least, it must be composed of:

  • PRIME Network Manager: running in the SAMA5D27-SOM1-EK1 Linux board connected to a PL360G55CF-EK (which runs the PRIME Base Node Modem Embedded project modified as explained in PRIME Base Node Modem Embedded Project), it controls and manages the network formation
  • PRIME Service Node: running on a PL360G55CF-EK, it joins the PRIME network and includes sniffer capabilities
Figure 5-1. Simple PRIME Network

The PRIME Network Manager Linux application “bn_prime” allows some arguments to be passed on execution:

$bn_prime -h
Usage : ./bn_prime [OPTION...]
 -b, --boot Execute boot startup configuration
 -e, --eval Execute argument as command
 -c, --config Load the config file,default /etc/config/prime.conf
 -l, --loglevel Loglevel <0-3>, default 3 (LOG_INFO)
 -f, --logfile Logfile, default /tmp/prime.log
 -v, --version Show the version
 -h, --help Display this help and exit

The application configuration is based on a file saved by default in “/etc/config/prime.conf” but it can be overwritten with the argument “-c | --config PATH_TO_CONFIG_FILE” or with the environment variable PRIME_CONFIG. The most important configuration commands are:

  • config modemport: configures the interface with Base Node Modem.
  • config mode: configures the functionality of the Base Node
  • config tx_channel: configures the PRIME Channel

This is an example of a configuration file:

#Writed on Thu Nov 19 11:37:16 2020
hostname MCHP-PRIME-BASE
!
prime
 config modemport serial ttyS1 speed 115200
 config mode base
 config sniffer_log tcp port 4444
 config sniffer_log tcp enabled
 config sniffer_log logfile enabled
 config sniffer_log enabled
 config tx_channel 1

The path of the application log file is “/tmp/prime.log” by default. It can be overwritten with the argument “-f | --logfile PATH_TO_LOG_FILE” or with the environment variable PRIME_LOGFILE.

Default loglevel is LOG_INFO (according to config loglevel) but it could be overwritten with the argument “-l | --loglevel LOG_LVL”.