summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Condello <nanomad@users.noreply.github.com>2023-05-28 16:37:43 +0200
committerGitHub <noreply@github.com>2023-05-28 16:37:43 +0200
commit85d9e18b2170526ba902e0affb1c9886f4c042bb (patch)
tree16256fad8bea15c3459c122e2a8234c1fd8f3142
parentUpdate ont-odi-realtek-dfp-34x-2c2.md (#203) (diff)
downloadhack-gpon.github.io-85d9e18b2170526ba902e0affb1c9886f4c042bb.tar
hack-gpon.github.io-85d9e18b2170526ba902e0affb1c9886f4c042bb.tar.gz
hack-gpon.github.io-85d9e18b2170526ba902e0affb1c9886f4c042bb.tar.bz2
hack-gpon.github.io-85d9e18b2170526ba902e0affb1c9886f4c042bb.tar.lz
hack-gpon.github.io-85d9e18b2170526ba902e0affb1c9886f4c042bb.tar.xz
hack-gpon.github.io-85d9e18b2170526ba902e0affb1c9886f4c042bb.tar.zst
hack-gpon.github.io-85d9e18b2170526ba902e0affb1c9886f4c042bb.zip
-rw-r--r--_ont_xgs/ont-hisense-ltf7267-bha+.md93
-rw-r--r--assets/js/LTF7267-BHA-ploam.js28
2 files changed, 118 insertions, 3 deletions
diff --git a/_ont_xgs/ont-hisense-ltf7267-bha+.md b/_ont_xgs/ont-hisense-ltf7267-bha+.md
index 1975930..7ac0311 100644
--- a/_ont_xgs/ont-hisense-ltf7267-bha+.md
+++ b/_ont_xgs/ont-hisense-ltf7267-bha+.md
@@ -307,6 +307,95 @@ INT CFG_ID_PON_VSSN = 0xAABBCCDD;
Reboot ONT to apply the change
+## Setting ONU GPON PLOAM password
+
+### Web procedure
+
+<form id="hisense-ploam" novalidate>
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" placeholder="PLOAM in ASCII" name="ploam" id="ploam" required>
+ <label for="ploam">PLOAM in ASCII</label>
+ <div class="invalid-feedback">
+ Please provide a valid PLOAM password.
+ </div>
+ </div>
+ <div class="mb-3">
+ <input type="submit" class="btn btn-primary" value="Encode!">
+ </div>
+ <div class="language-plaintext highlighter-rouge">
+ <div class="highlight">
+ <pre class="highlight" id="ploam-encoded">
+ </pre>
+ </div>
+ </div>
+</form>
+
+<script type="text/javascript" src="/assets/js/LTF7267-BHA-ploam.js"></script>
+<script type="text/javascript">
+ var hisensePloamForm = document.getElementById('hisense-ploam');
+ var hisenseResult = document.getElementById('ploam-encoded');
+ hisensePloamForm.addEventListener('submit', (event) => {
+ event.preventDefault();
+ if (!hisensePloamForm.checkValidity()) {
+ event.preventDefault();
+ } else {
+ const data = new URLSearchParams(new FormData(hisensePloamForm));
+ hisenseResult.innerHTML = hisensePloam(data.get('ploam'));
+ }
+ });
+</script>
+
+
+### Normal procedure
+
+This ONT seems to be supporting a PLOAM password up to 288 bits in lenghth (36 ASCII characters, 72 Hex digits).
+
+The PLOAM password is stored into 32 bit chunks (4 ASCII characters / 8 Hex digits), each byte swapped.
+
+So, starting from the following PLOAM in ASCII format
+
+```
+A1B2C3D4E5
+```
+
+It gets translated into the following HEX value:
+
+```
+0x41314232433344344535
+```
+
+Which is then split into the following blocks (the last block gets padded with 0 to reach 8 digits)
+
+```
+BLOCK 0: 0x41314232
+BLOCK 1: 0x43334434
+BLOCK 2: 0x45350000
+```
+
+Each block is then byte swapped (i.e. read each sequence of two digits from right to left)
+
+```
+BLOCK 0: 0x32423141
+BLOCK 1: 0x34443343
+BLOCK 2: 0x00003545
+```
+
+And then you can finally persist it by changing the configuration file
+
+```sh
+# vi /config/scfg.txt
+```
+
+Append lines below to the file and save it to change the PLOAM password
+
+```
+INT CFG_ID_PON_REGISTRATION_ID0 = 0x32423141;
+INT CFG_ID_PON_REGISTRATION_ID1 = 0x34443343;
+INT CFG_ID_PON_REGISTRATION_ID2 = 0x00003545;
+```
+
+Reboot the ONT to apply the change.
+
## Setting ONU GPON LOID and LOID password
@@ -330,7 +419,7 @@ Reboot ONT to apply the change
```sh
# fw_setenv img_version0 20220527052622
-# fw_setenv img_version0 20220527052622
+# fw_setenv img_version1 20220527052622
```
Reboot ONT to apply the change
@@ -381,8 +470,6 @@ Reboot ONT to apply the change
## Changing OMCC Version
-{% include alert.html content="In Italy, if you are under some Huawei OLT it's mandatory to use 0xA3, while on Alcatel 0xB4, otherwise you will get O5 status but no MIBs - Note that this can be quirk of TIM Italy" alert="Warning" icon="svg-warning" color="red" %}
-
```sh
# vi /config/scfg.txt
diff --git a/assets/js/LTF7267-BHA-ploam.js b/assets/js/LTF7267-BHA-ploam.js
new file mode 100644
index 0000000..57cd307
--- /dev/null
+++ b/assets/js/LTF7267-BHA-ploam.js
@@ -0,0 +1,28 @@
+function hexEncode(str){
+ var hex, i;
+
+ var result = "";
+ for (i=0; i<str.length; i++) {
+ hex = str.charCodeAt(i).toString(16);
+ result += hex.padStart(2, "0");
+ }
+
+ return result;
+}
+
+function hisensePloam(ascii_ploam) {
+ var hex_ploam = hexEncode(ascii_ploam);
+ var hex_padded_ploam = hex_ploam.padEnd(72, "0");
+ var array =[];
+ for (i = 0; i<9; i++) {
+ ploam_segment = hex_padded_ploam.slice(i*8, (i+1)*8);
+ new_ploam_segment = "";
+ for(j = 4; j>0; j--) {
+ new_ploam_segment = new_ploam_segment + ploam_segment.slice((j-1)*2, j*2);
+ }
+ if(new_ploam_segment !== "00000000") {
+ array.push("INT CFG_ID_PON_REGISTRATION_ID"+i+" = 0x"+new_ploam_segment+";");
+ }
+ }
+ return array.join("\n");
+} \ No newline at end of file