PHP script to gather Docsis Cable Modem information via SNMP. Easy to connect to any other web service as it has NBI in SoAP.
No DHCP information needed. Stand-alone service. Easy applicable.
- APACHE Server with SNMP access to the CMTS and CM
- SoapUi (for testing)
- When searching for cable modem this is always the first step. It returns the information containing US, Cable modem IP...
- IP and CM SNMP community should return the downstream information on all channels
- IP and CM SNMP community should return the upstream information on all channels. Gathered from the Cable Modem. All other infromation are returned via getCMTSParams.
- IP and CM SNMP community should return basic Cable Modem infromation, uptime, vendor, firmware...
- CM IP, CM SNMP community and CMTSid returned via getCMTSParams, should return Forwarding Database Records. (IPs and MAC addresses seen on the WAN side of CM)
- Input of this message is MAC address. It will walk through all of the CMTSes and return the IP address of requested device.
- CMTSid and PTR returned via getCMTSParams, should return detailed upstream parameters directly from the CMTS.
- Copy docsisWs.php and cmtses.json to your apache directory
$cp docsisWs.php /var/www/html/ $cp cmtses.json /var/www/html/
- Create directory ws in your apache directory
- Copy ws/DocsisCMDiag.wsdl to your apache ws/ directory
$cp ws/DocsisCMDiag.wsdl /var/www/html/ws
- Edit cmtses.json config file and add your cmtses (vendor Cisco,Casa,Arris and Motorola are suppored)
- Edit docsisWs.php and ws/DocsisCMDiag.wsdl
Search for modemdiag.cmtsnet.local and replase it with your apache server hostname/ip
Download SoapUI. Add a new project: http://your.apache.hostname/ws/DocsisCMDiag.wsdl
It's written very long time a go for php5.3 so the best thing would be to port it to python or at least new version of PHP7.
- cablemodem reset
- cablemodem upgrade
I'm not programer but a docsis engineer. This only a partion of a much greater project. The current version that I can't release here includes Wireless scan, set/get WLAN parameters, get LAN hosts, get WiFi clients with (RSSI signal), get MTA status...