summaryrefslogtreecommitdiffstats
path: root/_ont/luna-sdk-userful-commands.md
diff options
context:
space:
mode:
authorSimone Bortolin <simonebortolin@users.noreply.github.com>2023-01-19 00:58:31 +0100
committerSimone Bortolin <simonebortolin@users.noreply.github.com>2023-01-19 00:58:31 +0100
commit81f6b7ab91d908d9c5d97a903da15d7d68f37efb (patch)
tree6081d7c29b1aee5caa5182aafa99ef1635fae70f /_ont/luna-sdk-userful-commands.md
parentfix HiSense (#128) (diff)
downloadhack-gpon.github.io-81f6b7ab91d908d9c5d97a903da15d7d68f37efb.tar
hack-gpon.github.io-81f6b7ab91d908d9c5d97a903da15d7d68f37efb.tar.gz
hack-gpon.github.io-81f6b7ab91d908d9c5d97a903da15d7d68f37efb.tar.bz2
hack-gpon.github.io-81f6b7ab91d908d9c5d97a903da15d7d68f37efb.tar.lz
hack-gpon.github.io-81f6b7ab91d908d9c5d97a903da15d7d68f37efb.tar.xz
hack-gpon.github.io-81f6b7ab91d908d9c5d97a903da15d7d68f37efb.tar.zst
hack-gpon.github.io-81f6b7ab91d908d9c5d97a903da15d7d68f37efb.zip
Diffstat (limited to '_ont/luna-sdk-userful-commands.md')
-rw-r--r--_ont/luna-sdk-userful-commands.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/_ont/luna-sdk-userful-commands.md b/_ont/luna-sdk-userful-commands.md
index ee899d1..a4ac5f3 100644
--- a/_ont/luna-sdk-userful-commands.md
+++ b/_ont/luna-sdk-userful-commands.md
@@ -1,5 +1,21 @@
# General Settings and Useful Commands
+## Useful files
+- `/var/config/lastgood.xml` - Contains the user portion of the configuration
+{% if include.lastgoodHs %}
+- `/var/config/lastgood-hs.xml` - Contains the "hardware" configuration (which _should not_ be changed)
+{% endif %}
+- `/tmp/omcilog` - OMCI messages logs (must be enabeled, see below)
+
+## Useful binaries
+- `{{ include.flash }}` - Used to manipulate the config files in a somewhat safe manner
+- `xmlconfig` - Used for low-level manipulation of the XML config files. Called by `{{ include.flash }}`
+- `nv` - Used to manipulate nvram storage, including persistent config entries via `nv setenv`/`nv getenv`
+- `omcicli` - Used to interact with the running OMCI daemon
+- `omci_app` - The OMCI daemon
+- `diag` - Used to run low-level diagnostics commands on the stick
+
+
## Getting/Setting the ONT's S/N
```sh
# {{ include.flash }} get GPON_SN
@@ -44,6 +60,46 @@ sw_version1=V1_7_8_210412
# reboot
```
+## Getting/Setting the ONT Vendor ID
+
+{% 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
+{% if include.customSwVersionAlert %}
+ {% include alert.html content=include.customSwVersionAlert alert="Note" icon="svg-info" color="blue" %}
+{% else %}
+ {% include alert.html content="This needs the OMCI_OLT_MODE value to be set to 3" alert="Note" icon="svg-info" color="blue" %}
+{% endif %}
+
+```sh
+# nv setenv sw_custom_version0 YOURFIRSTSWVER
+# nv setenv sw_custom_version1 YOURSECONDSWVER
+```
+
+## Getting/Setting a custom HW Version
+{% 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
+# {{ include.flash }} get HW_HWVER
+HW_HWVER=V2.0
+# {{ include.flash }} set HW_HWVER MYHWVERSION
+```
+
+## Getting/Setting a custom ONT Equipment ID
+{% 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
+# {{ include.flash }} get GPON_ONU_MODEL
+GPON_ONU_MODEL=DFP-34X-2C2
+# {{ include.flash }} set GPON_ONU_MODEL DFP-34X-XXX
+```
+
## Querying a particular OMCI ME
```sh
# omcicli mib get MIB_IDX