diff options
author | Simone <26844016+simonebortolin@users.noreply.github.com> | 2023-04-24 21:05:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 21:05:51 +0200 |
commit | 3249248e754bcb7c6d94f352a21309503615344c (patch) | |
tree | 51af3a3c19f6dfb0c337df24c80aee64f8ec9f46 /_ont/ont-luna-sdk-useful-commands.md | |
parent | Fix issue: tw236h-cdel-serial.jpg points to the wrong file (#177) (diff) | |
download | hack-gpon.github.io-3249248e754bcb7c6d94f352a21309503615344c.tar hack-gpon.github.io-3249248e754bcb7c6d94f352a21309503615344c.tar.gz hack-gpon.github.io-3249248e754bcb7c6d94f352a21309503615344c.tar.bz2 hack-gpon.github.io-3249248e754bcb7c6d94f352a21309503615344c.tar.lz hack-gpon.github.io-3249248e754bcb7c6d94f352a21309503615344c.tar.xz hack-gpon.github.io-3249248e754bcb7c6d94f352a21309503615344c.tar.zst hack-gpon.github.io-3249248e754bcb7c6d94f352a21309503615344c.zip |
Diffstat (limited to '')
-rw-r--r-- | _ont/ont-luna-sdk-useful-commands.md | 146 |
1 files changed, 77 insertions, 69 deletions
diff --git a/_ont/ont-luna-sdk-useful-commands.md b/_ont/ont-luna-sdk-useful-commands.md index 535d62a..a1d5269 100644 --- a/_ont/ont-luna-sdk-useful-commands.md +++ b/_ont/ont-luna-sdk-useful-commands.md @@ -1,4 +1,4 @@ -# General Settings and Useful Commands +# Userful files and binaries ## Useful files - `/var/config/lastgood.xml` - Contains the user portion of the configuration @@ -15,15 +15,58 @@ - `omci_app` - The OMCI daemon - `diag` - Used to run low-level diagnostics commands on the stick +# GPON ONU status + +## Get the operational status of the ONU + +```sh +diag gpon get onu-state +``` + +## Querying a particular OMCI ME +```sh +# omcicli mib get MIB_IDX +``` + + +{% if include.speedLan %} + +## Getting/Setting Speed LAN Mode +{% assign customSpeedLanAlert = include.customSpeedLanAlert | default: "Before editing the speed make sure your hardware supports it." %} +{% include alert.html content=customSpeedLanAlert alert="Note" icon="svg-info" color="blue" %} + +To change the link mode use this command: -## Getting/Setting the ONT's S/N +```sh +# {{ include.flash }} get LAN_SDS_MODE +LAN_SDS_MODE=0 +# {{ include.flash }} set LAN_SDS_MODE 1 +``` + +| Value | `cat /proc/kmsg` | Mode | Behavior | +| ----- | ------------------------------------ | -------- | --------------------------- |{% if include.speedLan contains '0' %} +| 0 | `<4>change mode to 0(GE/FE PHY)` | `TP` | 1GbaseT/100baseT |{% endif %}{% if include.speedLan contains '1' %} +| 1 | `<4>change mode to 1(Fiber 1G)` | `FIBER` | 1GbaseX with auto-neg on |{% endif %}{% if include.speedLan contains '2' %} +| 2 | `<4>change mode to 2(SGMII PHY)` | `TP MII` | 1Gb PHY |{% endif %}{% if include.speedLan contains '3' %} +| 3 | `<4>change mode to 3(SGMII MAC)` | `MII` | 1Gb MAC |{% endif %}{% if include.speedLan contains '4' %} +| 4 | `<4>change mode to 4(HiSGMII PHY)` | `TP MII` | 2.5Gb PHY |{% endif %}{% if include.speedLan contains '5' %} +| 5 | `<4>change mode to 5(HiSGMII MAC)` | `MII` | 2.5Gb MAC |{% endif %}{% if include.speedLan contains '6' %} +| 6 | `<4>change mode to 6(2500BaseX)` | `FIBER` | 2500baseX with auto-neg on |{% endif %}{% if include.speedLan contains '7' %} +| 7 | `<4>change mode to 7(SGMII Force)` | `TP` | 1GbaseT with auto-neg off |{% endif %}{% if include.speedLan contains '8' %} +| 8 | `<4>change mode to 8(HISGMII Force)` | `TP` | 2500baseT with auto-neg off |{% endif %} + +{% endif %} + +# GPON/OMCI settings + +## Getting/Setting ONU GPON Serial Number ```sh # {{ include.flash }} get GPON_SN GPON_SN=TMBB00000000 # {{ include.flash }} set GPON_SN TMBB0A1B2C3D ``` -## Getting/Setting the ONT's PLOAM password +## Getting/Setting ONU GPON PLOAM password {% if include.ploam == 'asciiAndHex' %} {% 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" %} @@ -55,33 +98,8 @@ GPON_PLOAM_PASSWD=AAAAAAAAAA ``` {% endif %} -## Checking the currently active image -```sh -# nv getenv sw_active -sw_active=1 -# nv getenv sw_version0 -sw_version0=V1_7_8_210412 -# nv getenv sw_version1 -sw_version1=V1_7_8_210412 -``` - -## Booting to a different image -```sh -# nv setenv sw_commit 0|1 -# reboot -``` - -## Getting/Setting the ONT Vendor ID +## Getting/Setting OMCI software version (ME 7) -{% 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" %} - -```sh -# flash get PON_VENDOR_ID -PON_VENDOR_ID=ZTEG -# flash set PON_VENDOR_ID HWTC -``` - -## Getting/Settng the ONT Custom software version {% assign customSwVersionAlert = include.customSwVersionAlert | default: "This needs the OMCI_OLT_MODE value to be set to 3" %} {% include alert.html content=customSwVersionAlert alert="Note" icon="svg-info" color="blue" %} @@ -90,7 +108,7 @@ PON_VENDOR_ID=ZTEG # nv setenv sw_custom_version1 YOURSECONDSWVER ``` -## Getting/Setting a custom HW Version +## Getting/Setting OMCI hardware version (ME 256) {% 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" %} ```sh @@ -99,7 +117,17 @@ HW_HWVER=V2.0 # {{ include.flash }} set HW_HWVER MYHWVERSION ``` -## Getting/Setting a custom ONT Equipment ID +## Getting/Setting OMCI vendor ID (ME 256) + +{% 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" %} + +```sh +# flash get PON_VENDOR_ID +PON_VENDOR_ID=ZTEG +# flash set PON_VENDOR_ID HWTC +``` + +## Getting/Setting OMCI equipment ID (ME 257) {% 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" %} ```sh @@ -134,35 +162,10 @@ Some Fiber Vendor/Wholesale/ISP have explicit LAN Port Number provisioning or pr OMCI_FAKE_OK=0 # {{ include.flash }} set OMCI_FAKE_OK 1 ``` -{% if include.speedLan %} - -## Getting/Setting Speed LAN Mode -{% assign customSpeedLanAlert = include.customSpeedLanAlert | default: "Before editing the speed make sure your hardware supports it." %} -{% include alert.html content=customSpeedLanAlert alert="Note" icon="svg-info" color="blue" %} - -To change the link mode use this command: - -```sh -# {{ include.flash }} get LAN_SDS_MODE -LAN_SDS_MODE=0 -# {{ include.flash }} set LAN_SDS_MODE 1 -``` - -| Value | `cat /proc/kmsg` | Mode | Behavior | -| ----- | ------------------------------------ | -------- | --------------------------- |{% if include.speedLan contains '0' %} -| 0 | `<4>change mode to 0(GE/FE PHY)` | `TP` | 1GbaseT/100baseT |{% endif %}{% if include.speedLan contains '1' %} -| 1 | `<4>change mode to 1(Fiber 1G)` | `FIBER` | 1GbaseX with auto-neg on |{% endif %}{% if include.speedLan contains '2' %} -| 2 | `<4>change mode to 2(SGMII PHY)` | `TP MII` | 1Gb PHY |{% endif %}{% if include.speedLan contains '3' %} -| 3 | `<4>change mode to 3(SGMII MAC)` | `MII` | 1Gb MAC |{% endif %}{% if include.speedLan contains '4' %} -| 4 | `<4>change mode to 4(HiSGMII PHY)` | `TP MII` | 2.5Gb PHY |{% endif %}{% if include.speedLan contains '5' %} -| 5 | `<4>change mode to 5(HiSGMII MAC)` | `MII` | 2.5Gb MAC |{% endif %}{% if include.speedLan contains '6' %} -| 6 | `<4>change mode to 6(2500BaseX)` | `FIBER` | 2500baseX with auto-neg on |{% endif %}{% if include.speedLan contains '7' %} -| 7 | `<4>change mode to 7(SGMII Force)` | `TP` | 1GbaseT with auto-neg off |{% endif %}{% if include.speedLan contains '8' %} -| 8 | `<4>change mode to 8(HISGMII Force)` | `TP` | 2500baseT with auto-neg off |{% endif %} -{% endif %} +# Advanced settings -## Change IP address +## Setting management IP ```sh # {{ flash }} get LAN_IP_ADDR @@ -170,17 +173,6 @@ LAN_IP_ADDR=192.168.2.1 # {{ flash }} set LAN_IP_ADDR 192.168.1.1 ``` -## Checking whether the connection with the OLT was successful (O5 state) - -```sh -diag gpon get onu-state -``` - -## Querying a particular OMCI ME -```sh -# omcicli mib get MIB_IDX -``` - ## Getting/Setting the L2 Bridge MTU {% include alert.html content="Settings given via diag are not permanent after reboot" alert="Note" icon="svg-info" color="blue" %} @@ -192,4 +184,20 @@ Port Speed 0 1538 2 2031 # diag switch set max-pkt-len port all length 2000 +``` + +## Checking the currently active image +```sh +# nv getenv sw_active +sw_active=1 +# nv getenv sw_version0 +sw_version0=V1_7_8_210412 +# nv getenv sw_version1 +sw_version1=V1_7_8_210412 +``` + +## Booting to a different image +```sh +# nv setenv sw_commit 0|1 +# reboot ```
\ No newline at end of file |