NSH Network Link Management

In the past, if the network were not connected when you brought up NuttX, two bad things could happen:

But no more. Network link management capability has been added to NSH.

Configuration Options

First, you can very simply enable a feature that moves network initialization to a separate thread so that it is no longer done sequentially. Rather, the network bringup occurs asynchronously and the NSH prompt appears immediately (although the network may not be available until a little later). That feature is enabled simply with the following setting and is the first prerequisite for the full NSH link management feature:

The logic that implements the NSH network management is the file apps/nshlib/nsh_netinit.c. The behavior of the logic in that file depends on several configuration settings. First, there are a settings that are additional prerequisites to support the feature:

Then given all of these prerequisites you can enable the NSH network management on the NSH network intialization with these additonal options:

If the network monitor is selected, then some additional options will control its behavior:

Overview of the Operation

There is a summary of the operation of the NSH management thread.