|
| 1 | +# General Settings and Useful Commands |
| 2 | + |
| 3 | +## Useful files |
| 4 | +- `/var/config/lastgood.xml` - Contains the user portion of the configuration |
| 5 | +{% if include.lastgoodHs %} |
| 6 | +- `/var/config/lastgood-hs.xml` - Contains the "hardware" configuration (which _should not_ be changed) |
| 7 | +{% endif %} |
| 8 | +- `/tmp/omcilog` - OMCI messages logs (must be enabeled, see below) |
| 9 | + |
| 10 | +## Useful binaries |
| 11 | +- `{{ include.flash }}` - Used to manipulate the config files in a somewhat safe manner |
| 12 | +- `xmlconfig` - Used for low-level manipulation of the XML config files. Called by `{{ include.flash }}` |
| 13 | +- `nv` - Used to manipulate nvram storage, including persistent config entries via `nv setenv`/`nv getenv` |
| 14 | +- `omcicli` - Used to interact with the running OMCI daemon |
| 15 | +- `omci_app` - The OMCI daemon |
| 16 | +- `diag` - Used to run low-level diagnostics commands on the stick |
| 17 | + |
| 18 | + |
| 19 | +## Getting/Setting the ONT's S/N |
| 20 | +```sh |
| 21 | +# {{ include.flash }} get GPON_SN |
| 22 | +GPON_SN=TMBB00000000 |
| 23 | +# {{ include.flash }} set GPON_SN TMBB0A1B2C3D |
| 24 | +``` |
| 25 | + |
| 26 | +## Getting/Setting the ONT's PLOAM password |
| 27 | +{% if include.ploam == 'asciiAndHex' %} |
| 28 | + |
| 29 | +{% include alert.html content="The ploam can be saved in either ASCII or HEX format, without any 0x or separators" alert="Note" icon="svg-info" color="blue" %} |
| 30 | + |
| 31 | +```sh |
| 32 | +# {{ include.flash }} get GPON_PLOAM_PASSWD |
| 33 | +GPON_PLOAM_PASSWD=AAAAAAAAAA |
| 34 | +# {{ include.flash }} set GPON_PLOAM_PASSWD AAAAAAAAAA |
| 35 | +# {{ include.flash }} set GPON_PLOAM_PASSWD 41414141414141414141 |
| 36 | +``` |
| 37 | + |
| 38 | +{% elsif include.ploam == 'hex' %} |
| 39 | + |
| 40 | +{% include alert.html content="The PLOAM password is stored in HEX format, without any 0x or separators" alert="Note" icon="svg-info" color="blue" %} |
| 41 | + |
| 42 | +```sh |
| 43 | +# {{ include.flash }} get GPON_PLOAM_PASSWD |
| 44 | +GPON_PLOAM_PASSWD=41414141414141414141 |
| 45 | +# {{ include.flash }} set GPON_PLOAM_PASSWD 41414141414141414141 |
| 46 | +``` |
| 47 | +{% elsif include.ploam == 'ascii' %} |
| 48 | + |
| 49 | +{% include alert.html content="The PLOAM password is stored in ASCII format" alert="Info" icon="svg-info" color="blue" %} |
| 50 | + |
| 51 | +```sh |
| 52 | +# {{ include.flash }} get GPON_PLOAM_PASSWD |
| 53 | +GPON_PLOAM_PASSWD=AAAAAAAAAA |
| 54 | +# {{ include.flash }} set GPON_PLOAM_PASSWD AAAAAAAAAA |
| 55 | +``` |
| 56 | +{% endif %} |
| 57 | + |
| 58 | +## Checking the currently active image |
| 59 | +```sh |
| 60 | +# nv getenv sw_active |
| 61 | +sw_active=1 |
| 62 | +# nv getenv sw_version0 |
| 63 | +sw_version0=V1_7_8_210412 |
| 64 | +# nv getenv sw_version1 |
| 65 | +sw_version1=V1_7_8_210412 |
| 66 | +``` |
| 67 | + |
| 68 | +## Booting to a different image |
| 69 | +```sh |
| 70 | +# nv setenv sw_commit 0|1 |
| 71 | +# reboot |
| 72 | +``` |
| 73 | + |
| 74 | +## Getting/Setting the ONT Vendor ID |
| 75 | + |
| 76 | +{% include alert.html content="This may need the OMCI_OLT_MODE value to be set to 3 to work" alert="Note" icon="svg-info" color="blue" %} |
| 77 | + |
| 78 | +```sh |
| 79 | +# flash get PON_VENDOR_ID |
| 80 | +PON_VENDOR_ID=ZTEG |
| 81 | +# flash set PON_VENDOR_ID HWTC |
| 82 | +``` |
| 83 | + |
| 84 | +## Getting/Settng the ONT Custom software version |
| 85 | +{% assign customSwVersionAlert = include.customSwVersionAlert | default: "This needs the OMCI_OLT_MODE value to be set to 3" %} |
| 86 | +{% include alert.html content=customSwVersionAlert alert="Note" icon="svg-info" color="blue" %} |
| 87 | + |
| 88 | +```sh |
| 89 | +# nv setenv sw_custom_version0 YOURFIRSTSWVER |
| 90 | +# nv setenv sw_custom_version1 YOURSECONDSWVER |
| 91 | +``` |
| 92 | + |
| 93 | +## Getting/Setting a custom HW Version |
| 94 | +{% include alert.html content="This may need the OMCI_OLT_MODE value to be set to 3 to work" alert="Note" icon="svg-info" color="blue" %} |
| 95 | + |
| 96 | +```sh |
| 97 | +# {{ include.flash }} get HW_HWVER |
| 98 | +HW_HWVER=V2.0 |
| 99 | +# {{ include.flash }} set HW_HWVER MYHWVERSION |
| 100 | +``` |
| 101 | + |
| 102 | +## Getting/Setting a custom ONT Equipment ID |
| 103 | +{% include alert.html content="This may need the OMCI_OLT_MODE value to be set to 3 to work" alert="Note" icon="svg-info" color="blue" %} |
| 104 | + |
| 105 | +```sh |
| 106 | +# {{ include.flash }} get GPON_ONU_MODEL |
| 107 | +GPON_ONU_MODEL=DFP-34X-2C2 |
| 108 | +# {{ include.flash }} set GPON_ONU_MODEL DFP-34X-XXX |
| 109 | +``` |
| 110 | + |
| 111 | +## Getting/Setting OMCI OLT Mode and Fake OMCI |
| 112 | + |
| 113 | +Configure how ONT Stick handle OMCI from OLT: |
| 114 | + |
| 115 | +```sh |
| 116 | +# {{ include.flash }} get OMCI_OLT_MODE |
| 117 | +OMCI_OLT_MODE=1 |
| 118 | +# {{ include.flash }} set OMCI_OLT_MODE 2 |
| 119 | +``` |
| 120 | + |
| 121 | +| Value | Note | OMCI Information | |
| 122 | +| ----- | --------------- | ---------------------------------------------- | |
| 123 | +| 0 | Default Mode | Stock, some value are cannot be change | |
| 124 | +| 1 | Huawei OLT Mode | Huawei MA5671a | |
| 125 | +| 2 | ZTE OLT Mode | ZTE | |
| 126 | +| 3 | Customized Mode | Custom Software/Hardware Version, OMCC, etc... | |
| 127 | + |
| 128 | +Some Fiber Vendor/Wholesale/ISP have explicit LAN Port Number provisioning or proprietary OMCI that ONT Stick cant not understand, this will make ONT Stick reply OK whatever OMCI OLT throw at. |
| 129 | + |
| 130 | +`0` = Disable, `1` = Enable, Default is 0 |
| 131 | + |
| 132 | +```sh |
| 133 | +# {{ include.flash }} get OMCI_FAKE_OK |
| 134 | +OMCI_FAKE_OK=0 |
| 135 | +# {{ include.flash }} set OMCI_FAKE_OK 1 |
| 136 | +``` |
| 137 | +{% if include.speedLan %} |
| 138 | + |
| 139 | +## Getting/Setting Speed LAN Mode |
| 140 | +{% assign customSpeedLanAlert = include.customSpeedLanAlert | default: "Before editing the speed make sure your hardware supports it." %} |
| 141 | +{% include alert.html content=customSpeedLanAlert alert="Note" icon="svg-info" color="blue" %} |
| 142 | + |
| 143 | +To change the link mode use this command: |
| 144 | + |
| 145 | +```sh |
| 146 | +# {{ include.flash }} get LAN_SDS_MODE |
| 147 | +LAN_SDS_MODE=0 |
| 148 | +# {{ include.flash }} set LAN_SDS_MODE 1 |
| 149 | +``` |
| 150 | + |
| 151 | +| Value | `cat /proc/kmsg` | Mode | Behavior | |
| 152 | +| ----- | ------------------------------------ | -------- | --------------------------- |{% if include.speedLan contains '0' %} |
| 153 | +| 0 | `<4>change mode to 0(GE/FE PHY)` | `TP` | 1GbaseT/100baseT |{% endif %}{% if include.speedLan contains '1' %} |
| 154 | +| 1 | `<4>change mode to 1(Fiber 1G)` | `FIBER` | 1GbaseX with auto-neg on |{% endif %}{% if include.speedLan contains '2' %} |
| 155 | +| 2 | `<4>change mode to 2(SGMII PHY)` | `TP MII` | 1Gb PHY |{% endif %}{% if include.speedLan contains '3' %} |
| 156 | +| 3 | `<4>change mode to 3(SGMII MAC)` | `MII` | 1Gb MAC |{% endif %}{% if include.speedLan contains '4' %} |
| 157 | +| 4 | `<4>change mode to 4(HiSGMII PHY)` | `TP MII` | 2.5Gb PHY |{% endif %}{% if include.speedLan contains '5' %} |
| 158 | +| 5 | `<4>change mode to 5(HiSGMII MAC)` | `MII` | 2.5Gb MAC |{% endif %}{% if include.speedLan contains '6' %} |
| 159 | +| 6 | `<4>change mode to 6(2500BaseX)` | `FIBER` | 2500baseX with auto-neg on |{% endif %}{% if include.speedLan contains '7' %} |
| 160 | +| 7 | `<4>change mode to 7(SGMII Force)` | `TP` | 1GbaseT with auto-neg off |{% endif %}{% if include.speedLan contains '8' %} |
| 161 | +| 8 | `<4>change mode to 8(HISGMII Force)` | `TP` | 2500baseT with auto-neg off |{% endif %} |
| 162 | + |
| 163 | +{% endif %} |
| 164 | + |
| 165 | +## Change IP address |
| 166 | + |
| 167 | +```sh |
| 168 | +# {{ flash }} get LAN_IP_ADDR |
| 169 | +LAN_IP_ADDR=192.168.2.1 |
| 170 | +# {{ flash }} set LAN_IP_ADDR 192.168.1.1 |
| 171 | +``` |
| 172 | + |
| 173 | +## Checking whether the connection with the OLT was successful (O5 state) |
| 174 | + |
| 175 | +```sh |
| 176 | +diag gpon get onu-state |
| 177 | +``` |
| 178 | + |
| 179 | +## Querying a particular OMCI ME |
| 180 | +```sh |
| 181 | +# omcicli mib get MIB_IDX |
| 182 | +``` |
| 183 | + |
| 184 | +## Getting/Setting the L2 Bridge MTU |
| 185 | +{% include alert.html content="Settings given via diag are not permanent after reboot" alert="Note" icon="svg-info" color="blue" %} |
| 186 | + |
| 187 | +Getting/Setting the MTU of the L2 bridge |
| 188 | +```sh |
| 189 | +# diag switch get max-pkt-len port all |
| 190 | +Port Speed |
| 191 | +---------- |
| 192 | +0 1538 |
| 193 | +2 2031 |
| 194 | +# diag switch set max-pkt-len port all length 2000 |
| 195 | +``` |
0 commit comments