## Sending Commands To A DS in Linux Using DSNetCmd dsnetcmd is a Linux command-line tool which helps configure Tibbo devices over the network. It makes a UDP command connection to the command port of the EM or DS module, sends configuration commands and gets replies (all commands are described under [http://docs.tibbo.com/soism/commands.htm](http://docs.tibbo.com/soism/commands.htm)) dsnetcmd is **provided as part of the free Tibbo [VSPDL](/downloads/soi/vspdl.html) package**. After installation, you can find it under /usr/local/vspd/bin/. ### Synopsys Usage: ./dsnetcmd [options] [cmd] [-h|–help]: this help [-v]: verbose (debugging messages) [-b]: broadcast mode [-a]: send broadcast from all interfaces (auto-discover bcast interfaces) [-p]: prompt for user command [-i]: interactive (read commands from stdin) [-t]: wait for reply timeout (default:50 msec) [–ta=]: IP subnet mask (default: 255.255.255.255) or specific destination address. [–tp=]: command port (default: 65535) [cmd]: network command (for example, X) dsnetcmd works in 3 modes: 1. Simple mode 2. Command-line mode (with prompt) 3. Command-line mode without prompt (batch mode) ### Examples #### Sending a broadcast command X to find devices in our subnet **-b** - broadcast command, **-a** - send command from all interfaces, **X** - echo command for DS.

[dvorkin@dvhome bin]$ ./dsnetcmd -b -a X success 0.2.3.4.22.216 1001 usual mode fixed, set manually closed admin c4

found 1 device with MAC=0.2.3.4.22.216, data_port = 1001 #### Do the same in verbose mode (-v)

[dvorkin@dvhome bin]$ ./dsnetcmd -v -b -a X setting target to 255.255.255.255:65535.. found broadcast address 127.255.255.255 in lo found broadcast address 10.1.1.255 in eth0 found broadcast address 10.1.2.255 in eth1 sending command X to 127.255.255.255:65535... sending command X to 10.1.1.255:65535... sending command X to 10.1.2.255:65535... reply A0.2.3.4.22.216/1001/N**M*/**/admin/c4 from 10.1.1.8:65535 success 0.2.3.4.22.216 1001 usual mode fixed, set manually closed admin c4

#### Sending the U command (status command)

[dvorkin@dvhome bin]$ ./dsnetcmd -b -a U success 192.168.0.2 6450 0 285 0 0 308 38400 bps closed full-duplex RTS/CTS none 8 LOW LOW HIGH LOW

#### Changing the IP of a DS with input from stdin **-p** - prompt **–ta** - , **-i** - input from stdin

[dvorkin@dvhome bin]$ ./dsnetcmd -p --ta=10.1.1.8 -i dsnetcmd>GIP access denied // we try to get current IP - access denied - need login dsnetcmd>Ltest success // we are successfully logged in with password "test" dsnetcmd>GIP success 10.1.1.8 // now we can make any command on DS dsnetcmd>SIP10.1.1.7 success // we changed DS IP dsnetcmd> + // exit from dsnetcmd

#### Changing the IP of a DS in batch mode

[dvorkin@dvhome bin]$ echo -ne "Ltest\nGIP\n" | ./dsnetcmd --ta=10.1.1.8 -i success success 10.1.1.7