# NetCom/NetCAN Plus SNMP Configuration

## Software Requirements

There are many software tools and libraries allowing to work with SNMP
protocol. This documentation uses Net-SNMP (http://www.net-snmp.org/)
suite.

### Windows

Net-SNMP project provides Windows binaries. In order to use VScom MIB
files copy the following files to `c:\usr\local\share\snmp\mibs` folder
if you have used the default installation path:

* `IEEE802dot11-MIB.txt`
* `RS-232-MIB-rfc1659.txt`
* `VSCOM-MIB.txt`

### Linux (Debian/Ubuntu)

Net-SNMP can be installed directly via `apt`:

    apt install snmp snmp-mibs-downloader

VScom MIB files can be copied to the `~/.snmp/mibs` folder.

## Usage Examples

All examples assume that your device has the default IP address
192.168.254.254.

### Show all values for VSCOM-MIB

    snmpwalk -c public -v1 192.168.254.254 VSCOM-MIB::vsCom

### Show all values for RS-232-MIB

    snmpwalk -c public -v1 192.168.254.254 RS-232-MIB::rs232

### Change the baud rate

    snmpset -c root -v1 192.168.254.254 RS-232-MIB::rs232PortInSpeed.1 i 115200
    snmpset -c root -v1 192.168.254.254 RS-232-MIB::rs232PortInSpeed.2 i 9600
    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciInternalControl.0 i 2

The first port will be configured to 115200, the second to 9600 and the last
command applies the changes.

### Set static IP address

    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciIPUseDHCP.0 i 0
    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciIpAddress.0 a 192.168.0.20
    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciIpNetMask.0 a 255.255.255.0
    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciBcastAddress.0 a 192.168.0.255
    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciGateway.0 a 192.168.0.1
    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciInternalControl.0 i 2
    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciInternalControl.0 i 1

The last command reboots the device.

### Reboot

    snmpset -c root -v1 192.168.254.254 VSCOM-MIB::vsnciInternalControl.0 i 1

### Changing setting when the password is set

If a password is set in the server configuration, it should be used instead of
the 'root' community:

    snmpset -c <password> -v1 192.168.254.254 VSCOM-MIB::vsnciInternalControl.0 i 1
