# Modem Configuration

General Commands

Modem control characters are allowed.

Init. |
    ^ATZ|
| Modem initialisation string. This string is sent to modem at line start-up, after a file transfer session finish and each two minutes of line inactivity (modem check). Use Modem Disable Reinit atom to disable periodical modem check. Make sure that most modems accept commands and report RING only when DTR is high, so don't remote `^` character that raises DTR.
Answer |
    ATA!
| Answering string - this string is sent to the modem whenever RING response is detected and Argus goes into connection waiting state.
Dial prefix |
    ATDP
| Dialling command prefix. Complete dialling command includes the prefix, the number to dial and the suffix.
Dial suffix |
    !
| Dialling command suffix. Usually it is ! (control character CR without waiting)
Hang-up |
    !`v~~^`!!`
| Physical disconnect command that is sent to a modem only when DCD signal is high. Most of the modern modems could disconnect with lowering DTR signal and holding it down during one second. The string given in this example send CR, waits 0.1 sec, lowers DTR signal, waits 1.0 sec (usually it is enough), raises DTR, waits 0.1 sec, sends CR twice, and waits for 0.1 sec again.
Info | none | Info command is sent to the modem after a session termination, before sending Init string. The result of this command is logged. You may use Response Log Format atom to format data came from a modem. By default, Info command is not defined, so no info command at all is sent.

Responses

The standard modem responses are set in this string grid. All possible responses are divided by a space. Space characters in response string must be replaced with underline characters. You may not use wildcards but may use Regular Expressions here.

Flags

It is possible to pre-initialise the modem in special manner just before calling a node with particular Nodelist flags (flags could be set in the nodes configuration of Argus). Dial Prefix and Dial Suffix could depend on flags as well.

Each row of Flags string grid is a combination of Flags list and override of Init. string / Dial Prefix / Dial Suffix corresponding to the Flags list. Flags list a logical expression where space character is OR operator and comma character is AND operator (AND has higher priority than OR).

For example:

Flags list column | Meaning
    PEP
| `PEP`
    HST H16
| `HST` or `H16`
    V32B,V42B
| `V32B` with `V42B`
    ZYX,V34 32T
| either `ZYX` with `V34` or `V32T`

Overrides of Init. string / Dial Prefix / Dial Suffix placed in the second column of Flags grid are divided by slash character. If the appropriate value is to be taken from General Commands (no need to override the value in special manner), single full stop character must be used.

The following example illustrates the formation of dialling pre-init string and dialling command and, using values from General Commands and Flags Init/Prefix/Suffix.This also illustrates how different settings of Flags Init/Prefix/Suffix could change formation of dialling command and dialling pre-init string.

This example illustrates different Flags Init/Prefix/Suffix values generating different pre-init string and dialling commands with constant General Commands settings. The number is taken for example `323323` .

General Commands settings

Init. |
    ATZ|
Dial Prefix |
    ATDP
Dial Suffix |
    !

Flags Init/Prefix/Suffix | Pre-Init string | Dialling command | Comment
    ATB1|/ATM0DP/!
    ATB1|
    ATDP323323!
| Init. string - `ATB1|` Prefix - `ATM0DP` Suffix - `!`
    ATM0|/ATDT
    ATM0|
    ATDT323323!
| Init. string - `ATM0|` Prefix - `ATDT` Suffix - `!`
    ATH1|
    ATH1|
    ATDP323323!
| Prefix and suffix are taken from General Commands
    /ATX7DP/@!
| none |
    ATX7DP323323@!
| There is no initialisation string to be sent
    ATB0|/./@!
    ATB0|
    ATDP323323@!
| Single full stop in Dial Prefix override - Dial Prefix is taken from General Commands