2011-07-17 08:27:41 +00:00
|
|
|
This project provides you with a bash library to control a NetIO 230A LAN IP Remote Socket.
|
2011-07-17 08:23:39 +00:00
|
|
|
|
2011-07-17 08:27:41 +00:00
|
|
|
PREQUISITES:
|
|
|
|
============
|
|
|
|
|
|
|
|
the following tools are needed to use this script:
|
|
|
|
|
|
|
|
* bash
|
|
|
|
* wget
|
|
|
|
* md5sum (for encrypted login)
|
|
|
|
|
|
|
|
|
|
|
|
LIMITATIONS:
|
|
|
|
============
|
|
|
|
|
|
|
|
The library currently only can control one netio at a time. if you want to control more you have
|
2011-07-17 08:23:39 +00:00
|
|
|
to logout/login whenever you switch between them. The login will be remembered for the current
|
|
|
|
script or bash instance until a logout is done.
|
|
|
|
|
2011-07-17 08:27:41 +00:00
|
|
|
|
|
|
|
USAGE EXAMPLES:
|
|
|
|
===============
|
2011-07-17 08:23:39 +00:00
|
|
|
|
|
|
|
# import the library
|
|
|
|
|
|
|
|
source libnetio230a.sh
|
|
|
|
|
|
|
|
# login to the NetIO at 192.168.1.10 with encrypted login user power password 123
|
|
|
|
|
|
|
|
netio.login 192.168.1.10 c power 123
|
|
|
|
|
|
|
|
# get status of port 3 and print it
|
|
|
|
|
|
|
|
netio.getport 192.168.1.10 3
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
# set port 4 to off
|
|
|
|
|
|
|
|
netio.setport 192.168.1.10 4 0
|
|
|
|
|
|
|
|
# logout
|
|
|
|
|
|
|
|
netio.logout
|