Python Automation for PLDT Fibr ONU Router
Run script
python3 PyLDT.py
Current script contains a PyLDT Python class for configuring your PLDT Fibr ONU Router and does the following things:
- Check if https://192.168.1.1/fh is available and accepting requests.
- Logon using
fibersuperadmin
credentials and enabletelnet
,webadmin switch
, andomci debug
. - Connect to the modem via
telnet
onport 22
anddisable AP isolation
so that you can use all of the LAN ports of your router.
- The ipv4 address of your router is 192.168.1.1 and is reachable from the device running this software
- You are the owner or have authority over the router
- There are no firewalls or restrictions that prevent or block you from reaching port 22 of the router
Download Google Chrome Browser https://www.google.com/intl/en/chrome/
Download your version of ChromeDriver https://chromedriver.chromium.org/
Make sure that the path to the chromedriver executable is included in the system path.
Install all the required Python packages
pip install -r requirements.txt
Login: gepon
Password: gepon
User>
- clear
- enable
- exit
- help
- list
- ping {[-t]}*1 {[-count] <1-65535>}*1 {[-size] <1-6400>}*1 {[-waittime] <1-255>}*1 {[-ttl] <1-255>}*1 {[-pattern] <user_pattern>}*1 {[-i] <A.B.C.C>}*1 <A.B.C.D>
- quit
- show history
- show idle-timeout
- show ip
- show services
- show syscontact
- show syslocation
- terminal length <0-512>
- who
- who am i
From User Exec Mode key in enable
and type the correct password to enter Global Config Mode
User>
User> enable
Password: *****
Config# _
- cd [..|device|service|switch|codec|dsp|protocol|pon|gpon|omci|wlan|tr069|wan|igmp|gponl3|oam|ntp|mld|web]
- clear
- download ftp [system|config] <A.B.C.D>
- erase {startup-config}*1
- exit
- help
- list
- quit
- reboot
- resettings
- save {configuration}*1
- show cpu use
- show flash use
- show history
- show memory use
- show running-config
- show startup-config
- show time
- show version
- upload ftp config <A.B.C.D>
- upload ftp syslog <A.B.C.D>
From User Exec Mode or Global Config Mode key in ddd
to enter Debug Mode
User>
User> ddd
WRI(DEBUG_H)> _
Config#
Config# ddd
WRI(DEBUG_H)> _
- active section [0|1]
- bobtest read_regs slave_addr <0-255> begin_addr <0-255> count <1-32>
- bobtest write_regs slave_addr <0-255> begin_addr <0-255> count <1-32> value1 <0-255> {value2 <0-255>}*1 {value3 <0-255>}*1 {value4 <0-255>}*1 {value5 <0-255>}*1 {value6 <0-255>}*1 {value7 <0-255>}*1 {value8 <0-255>}*1 {value9 <0-255>}*1 {value10 <0-255>}*1 {value11 <0-255>}*1 {value12 <0-255>}*1 {value13 <0-255>}*1 {value14 <0-255>}*1 {value15 <0-255>}*1 {value16 <0-255>}*1 {value17 <0-255>}*1 {value18 <0-255>}*1 {value19 <0-255>}*1 {value20 <0-255>}*1 {value21 <0-255>}*1 {value22 <0-255>}*1 {value23 <0-255>}*1 {value24 <0-255>}*1 {value25 <0-255>}*1 {value26 <0-255>}*1 {value27 <0-255>}*1 {value28 <0-255>}*1 {value29 <0-255>}*1 {value30 <0-255>}*1 {value31 <0-255>}*1 {value32 <0-255>}*1
- clear
- commit section [0|1]
- config ploam_log [enable| disable]
- config test clear_all_gemport_cnt
- config test mib_del_hi_tcont_alloc [0|1]
- config test web_acl_mode port <0-3> mode <0-2> type <0-2>
- config test web_acl_rule port <0-3> is_ipv6 <0-1> vid <0-4095>
- config upgrade_window_size <3characters>
- control opticalgenerator [enable|disable|off] {mode [hf0101 |lf0101 |mix |user |prbs7|prbs15|prbs23|prbs31]}*1
- control test up_optical_tx [auto| always_on | off] {tx_level [high |low]}*1
- debug cli_msg id
- debug cli_msg send_buf
- delete onuhw version
- dumpenv
- exit
- fandebug [enable|disable]
- fhdrv_kdrv_i2c read <0-10> <0-255> <0-255> <0-255>
- fhdrv_kdrv_i2c write <0-10> <0-255> <0-255> <0-255>
- get image status
- get nvram
- get saveflags status
- get system status
- get upgrade mem mode
- get version info
- get web [user|admin] username
- help
- i2c read
- i2c write
- list
- mibreset
- optdebug [enable|disable]
- output redirect
- printenv env_key [fhsnoui|FHSNOUI|ethaddr]
- quit
- read gpio <0-256>
- read i2c device page <0-255> addr <0-255>
- run [local_config]
- run [omci_tl]
- set bar code [pcb|bosa]
- set catv rf offset
- set console [on|off|reboot_on|reboot_off]
- set default-printf-to [disable|console|telnet|all]
- set electricfan run temperature <0-100> stop temperature <0-100>
- set nvram
- set onuhw version
- set opt rxpoweradjust1 min max offset
- set opt rxpoweradjust2 min max offset
- set optoutpower level <0-2>
- set optoutpower offset
- set optpoll [enable|disable]
- set ponrate_config_switch <0-1>
- set upgrade mem mode <0-255>
- set web [user|admin] username password
- set web default [user|admin] username password
- setbuttondebug [disable|enable|ver|start]
- setleddebug [disable|enable|on|off]
- setlog [omci|none] [old|pkt|timer|conf|temp|info|none|warning]
- setpmlog <0-1>
- setusbdebug
- shell
- show [ponrate_config_switch]
- show bar code [pcb|bosa]
- show debugversion
- show electricfan work temperature
- show flash use
- show history
- show optoutpower level
- show optoutpower offset
- show optrxpower adjust
- show power supply
- show prbs_bist_error_state
- show rf power
- show test web_acl_mode port <0-3>
- show test web_acl_rule port <0-3>
- show upgrade_window_size
- test led
- tshell
- updateenv [fhsnoui|FHSNOUI|ethaddr]
- upload ftp any <A.B.C.D>
- write gpio <0-256> <0-1>
- write i2c device page <0-255> addr <0-255> value <0-255>
Use at your own risk. In no event shall we be liable to you or any third parties for any special, punitive, incidental, indirect or consequential damages of any kind, or any damages whatsoever, including, without limitation, those resulting from loss of use, data or profits, and on any theory of liability, arising out of or in connection with the use of this software.