summaryrefslogtreecommitdiffstats
path: root/_ont
diff options
context:
space:
mode:
authorSimone Bortolin <simonebortolin@users.noreply.github.com>2022-12-03 00:30:02 +0100
committerSimone Bortolin <simonebortolin@users.noreply.github.com>2022-12-19 23:09:24 +0100
commit15242cc18648c324619b7a3a78cce7e66daaeea7 (patch)
tree2e892ec026e04436c9d438d00abe7175f299a527 /_ont
parentUpdate LEOX lxt-010s-h wiki (#44) (diff)
downloadhack-gpon.github.io-15242cc18648c324619b7a3a78cce7e66daaeea7.tar
hack-gpon.github.io-15242cc18648c324619b7a3a78cce7e66daaeea7.tar.gz
hack-gpon.github.io-15242cc18648c324619b7a3a78cce7e66daaeea7.tar.bz2
hack-gpon.github.io-15242cc18648c324619b7a3a78cce7e66daaeea7.tar.lz
hack-gpon.github.io-15242cc18648c324619b7a3a78cce7e66daaeea7.tar.xz
hack-gpon.github.io-15242cc18648c324619b7a3a78cce7e66daaeea7.tar.zst
hack-gpon.github.io-15242cc18648c324619b7a3a78cce7e66daaeea7.zip
Diffstat (limited to '_ont')
-rw-r--r--_ont/ont-huawei-ma5671a-carlito.md2
-rw-r--r--_ont/ont-huawei-ma5671a-china.md30
-rw-r--r--_ont/ont-huawei-ma5671a-rooted.md172
-rw-r--r--_ont/ont-huawei-ma5671a-sf.md7
-rw-r--r--_ont/ont-huawei-ma5671a.md15
5 files changed, 217 insertions, 9 deletions
diff --git a/_ont/ont-huawei-ma5671a-carlito.md b/_ont/ont-huawei-ma5671a-carlito.md
index 218855f..8f0247b 100644
--- a/_ont/ont-huawei-ma5671a-carlito.md
+++ b/_ont/ont-huawei-ma5671a-carlito.md
@@ -7,6 +7,8 @@ layout: default
# General setting
+{% include alert.html content="Be careful, back up the goi_config from ubot before changing firmware." alert="Info" icon="svg-info" color="blue" %}
+
## Setting image version
```sh
fw_setenv image0_version V1.7.6-170626
diff --git a/_ont/ont-huawei-ma5671a-china.md b/_ont/ont-huawei-ma5671a-china.md
new file mode 100644
index 0000000..c00fb6d
--- /dev/null
+++ b/_ont/ont-huawei-ma5671a-china.md
@@ -0,0 +1,30 @@
+---
+title: right.com.cn Firmware for Huawei MA5671A
+has_children: false
+layout: default
+parent: Huawei MA5671A
+---
+
+# General setting
+
+{% include alert.html content="Be careful, use this firmware only if you have performance problems with all other firmware." alert="Info" icon="svg-info" color="blue" %}
+
+{% include alert.html content="Do not use translator on the browser, use a translation app on the phone through virtual reality." alert="Danger" icon="svg-warning" color="red" %}
+
+1. Flash on the 0 partition
+
+2. Run via ssh
+
+```sh
+jffs2reset
+```
+
+3. Reboot
+
+4. Fill in the data from left to right and from top to bottom, with save & apply on every page
+
+5. Reboot
+
+6. Edit the incorrect data and make save and apply from pending changes
+
+7. Reboot \ No newline at end of file
diff --git a/_ont/ont-huawei-ma5671a-rooted.md b/_ont/ont-huawei-ma5671a-rooted.md
index b4b3884..a4a6d14 100644
--- a/_ont/ont-huawei-ma5671a-rooted.md
+++ b/_ont/ont-huawei-ma5671a-rooted.md
@@ -7,10 +7,174 @@ layout: default
# General setting
-[Edit sfp_a2_info file](https://forum.openwrt.org/t/support-ma5671a-sfp-gpon/48042/24)
+
+{% include alert.html content="Unlike the other firmware in this firmware, the data must be modified in a base64-encoded file. To simplify this, you can use the following web application." alert="Info" icon="svg-info" color="blue" %}
+
+## Web procedure
+
+
+1. Get `sfp_a2_info` and paste into the form
+
+<form id="huawei-rooted">
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" placeholder="sfp_a2_info input" name="sfp-a2-info" id="sfp-a2-info" >
+ <label for="sfp-a2-info">sfp_a2_info input</label>
+ </div>
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" placeholder="GPON S/N" name="gpon-sn" id="gpon-sn" value="">
+ <label for="gpon-sn">GPON S/N in format GPON00001234or 47504F4E12345678, empty for not modify it</label>
+ </div>
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" placeholder="GPON Ploam Password" name="gpon-password" id="gpon-password" value="">
+ <label for="gpon-password">GPON S/N in format 1234567890, 31323334353637383930 or 0x31323334353637383930, empty for not modify it</label>
+ </div>
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" placeholder="MAC address" name="mac-addr" id="mac-addr" value="">
+ <label for="mac-addr">MAC Address in format 48:57:02:da:be:ef, 48-57-02-da-be-ef or 485702dabeef, empty for not modify it</label>
+ </div>
+ <div class="mb-3">
+ <input type="submit" class="btn btn-primary" value="Calculate!">
+ </div>
+ <div class="form-floating mb-3">
+ <input readonly class="form-control" type="text" id="result" placeholder="sfp_a2_info result">
+ <label for="result">sfp_a2_info result</label>
+ </div>
+</form>
+<script>
+ var form = document.getElementById('huawei-rooted');
+ form.addEventListener('submit',(event) => {
+ event.preventDefault();
+ var fomrdata = new FormData(form);
+ var sfp_a2_info = fomrdata.get('sfp-a2-info');
+ var sfp_a2_info_arr = sfp_a2_info.split('@');
+ if(sfp_a2_info_arr.length > 10 && sfp_a2_info_arr[0] === 'begin-base64 644 sfp_a2_info ') {
+ var gpon_sn = fomrdata.get('gpon-sn');
+ if(gpon_sn.length == 12) {
+ var vendor_id = gpon_sn.substring(0, 4);
+ var progressive = gpon_sn.substring(4);
+ var vendor_id_hex = ([...vendor_id].map((elem, n) => Number(vendor_id.charCodeAt(n)).toString(16)).join(''));
+ gpon_sn = vendor_id_hex+progressive;
+ }
+ if(gpon_sn.length == 16) {
+ var hex = base64ToHex(sfp_a2_info_arr[6]);
+ hex = hex.substring(0,16) + gpon_sn + hex.substring(32);
+ sfp_a2_info_arr[6] = hexToBase64(hex);
+ }
+ var gpon_password = fomrdata.get('gpon-password');
+ if(gpon_password.length > 0) {
+ if(gpon_password.length <= 10) {
+ gpon_password = ([...gpon_password].map((elem, n) => Number(gpon_password.charCodeAt(n)).toString(16)).join(''));
+ gpon_password += '0'.repeat(20-gpon_password.length);
+ }
+ else if(gpon_password.length == 22 && gpon_password.substring(0,2) === '0x') {
+ gpon_password = gpon_password.substring(3);
+ }
+ if(gpon_password.length == 20) {
+ var hex = base64ToHex(sfp_a2_info_arr[5]);
+ hex = hex.substring(0,22) + gpon_password + hex.substring(42);
+ sfp_a2_info_arr[5] = hexToBase64(hex);
+ }
+ }
+ var mac_addr = fomrdata.get('mac-addr');
+ if(mac_addr.length == 17) {
+ mac_addr = mac_addr.replace('-','');
+ mac_addr = mac_addr.replace(':','');
+ }
+ if(mac_addr.length == 12) {
+ var hex = base64ToHex(sfp_a2_info_arr[9]);
+ hex = hex.substring(0,48) + mac_addr + hex.substring(61);
+ sfp_a2_info_arr[9] = hexToBase64(hex);
+ }
+ document.getElementById('result').value = sfp_a2_info_arr.join('@');
+ } else {
+ document.getElementById('result').value = 'sfp_a2_info variable in wrong format!';
+ }
+ });
+ function hexToBase64(hexStr) {
+ return btoa([...hexStr].reduce((acc, _, i) => acc += !(i - 1 & 1) ? String.fromCharCode(parseInt(hexStr.substring(i - 1, i + 1), 16)) : '', ''));
+ }
+ function base64ToHex(base64Value) {
+ return [...atob(base64Value)].map(c=> c.charCodeAt(0).toString(16).padStart(2,0)).join('');
+ }
+</script>
+
+{:style="counter-reset:none"}
+2. Transfer modified file back into variable `sfp_a2_info`, replace `<output>` with the output of web form.
+
+```shell
+fw_setenv sfp_a2_info "<output>"
+```
+
+## Temporary file procedure
+
+1. Save `sfp_a2_info` in into temporary file
+
+```shell
+fw_printenv sfp_a2_info | sed "s/^sfp_a2_info=//" > /tmp/sfp_a2.txt
+```
+And print a pretty version:
+```shell
+fw_printenv sfp_a2_info | sed "s/^sfp_a2_info=//" | tr '@' '\n'
+```
+
+2. Setting S/N
+
+The S/N is stored on the 6th line, for sample `4857544311223344` (where `48575443` are hex encoding of `HWTC`) are stored:
+```
+AAAAAAAAAAJIV1RDESIzRP///////////////////wAAAAAAAAAAAAAAAAAA
+00000000000000024857544311223344ffffffffffffffffffffffffffffff0000000000000000000000000000
+```
+
+The entire S/N, including the PON ID, is encoded first in hex and then in base64
+
+3. Setting Ploam Password
+
+The Ploam Password is stored on the 5th line, for sample (`1234567890`) are stored:
+```
+ffffffffffffffff00021437d77db7df7e37e77eb7ef7f37f77d00000000000000000000000000000000000000
+//////////8AAhQ31323334353637383930AAAAAAAAAAAAAAAAAAAAAAAAA
+```
+
+The entire Ploam, is encoded first in hex and then in base64
+
+4. Setting MAC Address
+
+The Ploam Password is stored on the 9th line, for sample (`48:57:02:da:be:ef`) are stored:
+```
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASFcC2r7vAAAAAAAAAAAAAAAAAAAA
+000000000000000000000000000000000000000000000000485702dabeef000000000000000000000000000000
+```
+
+5. Transfer modified file back into variable `sfp_a2_info`
+
+```shell
+fw_setenv sfp_a2_info $(cat /tmp/sfp_a2.txt)
+```
+
+## Review and testing
+
+After reboot I check for new variables:
+
+```shell
+fw_printenv nPassword
+fw_printenv gSerial
+fw_printenv ethaddr
+```
+
+After reboot I check for new variables:
+
+## Check registration status for O5 (successful)
+
+```shell
+onu ploamsg
+```
# Disable dying gasp
-```sh
-# fw_setenv nDyingGaspEnable 0
-``` \ No newline at end of file
+```shell
+fw_setenv nDyingGaspEnable 0
+```
+
+# Miscellaneous Links
+
+- [Edit sfp_a2_info file](https://forum.openwrt.org/t/support-ma5671a-sfp-gpon/48042/25)
diff --git a/_ont/ont-huawei-ma5671a-sf.md b/_ont/ont-huawei-ma5671a-sf.md
new file mode 100644
index 0000000..026d980
--- /dev/null
+++ b/_ont/ont-huawei-ma5671a-sf.md
@@ -0,0 +1,7 @@
+---
+title: SourcePhotonics Firmware for Huawei MA5671A
+has_children: false
+redirect_to: /ont-fs-com-gpon-onu-stick-with-mac
+layout: default
+parent: Huawei MA5671A
+--- \ No newline at end of file
diff --git a/_ont/ont-huawei-ma5671a.md b/_ont/ont-huawei-ma5671a.md
index 312144d..30f0036 100644
--- a/_ont/ont-huawei-ma5671a.md
+++ b/_ont/ont-huawei-ma5671a.md
@@ -84,18 +84,23 @@ Configuration: asc0=0 115200 8-N-1
## List of firmwares and files
+{% include alert.html content="With the root procedure without tweezers, the firmware already on the Huawei Stick corresponds to rooted firmware in this list." alert="Info" icon="svg-info" color="blue" %}
+
- [Carlito MTD2](https://ma5671a.s3.nl-ams.scw.cloud/mtd2.bin){: .btn } md5hash: d3cb6f7efec201b37931139feb4bb23b
- [Huawei Rooted MTD2](https://ma5671a.s3.nl-ams.scw.cloud/mA5671a_root_mtd2.img){: .btn } md5hash: 3138d2dd06a32bb92bc63610fec6fcd6
-- [Carlito MTD5](https://ma5671a.s3.nl-ams.scw.cloud/mtd5.bin){: .btn } md5hash > 59d2dc15227d6f693a38131eca89b29e
+- [Carlito MTD5](https://ma5671a.s3.nl-ams.scw.cloud/mtd5.bin){: .btn } md5hash: 59d2dc15227d6f693a38131eca89b29e
- [Huawei Rooted MTD5](https://ma5671a.s3.nl-ams.scw.cloud/mA5671a_root_mtd5.img){: .btn } md5hash: 0e4cfdc1b96be6581869b26b48789556
- [1224abort.bin](https://ma5671a.s3.nl-ams.scw.cloud/1224ABORT.bin){: .btn } md5hash: 10e94a4b4acdc82dec20c7904b69e5c0
-- [right.com.cn 19 July 2022](https://mega.nz/file/9fpSkYTb#wNyjAj1kOLWC9HozX-gTQ-TS3VFqRYg--x1rm7RSuDg){: .btn } md5hash: 6b5e7e3c659fe3f0204340fa746ac4fc
-- [right.com.cn 29 Aug 2022](https://mega.nz/file/VHFFSBrT#2WhDPcdON5EHR01l6Ut35GC3sl55e4l09Z0NUo_7SWA){: .btn} md5hash: 3d357e2dc7b59c66fe61b4ddf1fb8dc0
+- [right.com.cn (China) 19 July 2022](https://mega.nz/file/9fpSkYTb#wNyjAj1kOLWC9HozX-gTQ-TS3VFqRYg--x1rm7RSuDg){: .btn } md5hash: 6b5e7e3c659fe3f0204340fa746ac4fc
+- [right.com.cn (China) 29 Aug 2022](https://mega.nz/file/VHFFSBrT#2WhDPcdON5EHR01l6Ut35GC3sl55e4l09Z0NUo_7SWA){: .btn} md5hash: 3d357e2dc7b59c66fe61b4ddf1fb8dc0
+- [ONT FS.com GPON ONU Stick with MAC firmware / SourcePhotonics SPS-34-24T-HP-TDFO firmware](/ont-fs-com-gpon-onu-stick-with-mac)
# General setting
-- [Carlito General Setting](/ont-huawei-ma5671a-carlito)
-- [Huawei Rooted General Setting](/ont-huawei-ma5671a-rooted)
+- [Huawei Rooted Firmware General Setting](/ont-huawei-ma5671a-rooted)
+- [Carlito Firmware General Setting](/ont-huawei-ma5671a-carlito)
+- [SourcePhotonics Firmware General Setting](/ont-huawei-ma5671a-sf)
+- [right.com.cn (China) Firmware General Setting](/ont--huawei-ma5671a-china)
# Useful commands