### set modem

Use the set modem command to

- Assign modem test and initialization scripts to ports

- Display the modem table

- Clear the association between ports and modem test and initialization scripts

Normal users can use the set modem command to display the scripts associated with the port they are using. Administrator (root) privileges are required to use the command to display information on other ports and to configure an association between a port and test and initialization scripts.

See the set script command for information on creating scripts.

#### Command Syntax

##### Configuration Syntax

Enter the set modem command as shown below to configure an association between a port and modem test and initialization scripts.

> `set modem [init=script] [range=range] [test=script]`

##### Display Syntax

Enter the set modem command as shown below to display modem table entries.

> `set modem [range=range]`

##### Clear Syntax

Enter the set modem command as shown below to clear an association between a port and modem test and initialization scripts.

> `set modem [init=no] [test=no]`

#### Command Fields

Command Field | Description
init | Specifies one of the following: The name of an initialization script (created with the set script command) The index number of an initialization script in the scripts table no, which clears an association between a port and an initialization script
range | Specifies the range of ports to which this command applies.
test | Specifies one of the following: The name of a test script (created with the set script command) The index number of a test script in the scripts table no, which clears an association between a port and a test script

#### Command Examples

##### Displaying the Current Port’s Scripts

In this example, the set modem command displays the names of scripts associated with the user’s port.

> `set modem`

##### Displaying a Range of Ports’ Scripts

In this example, the set modem command displays the names of scripts associated with a range of ports.

> `set modem range=1-16`

##### Configuring a Port for Scripts

In this example the set modem command configures an association between a port and test and initialization scripts.

> `set modem test=test1 range=2 init=init1`

##### Clearing a Port of Scripts

In this example, the set modem command clears an association between a port and test and initialization scripts.

> `set modem range=2 test=no init=no`