summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_layouts/default.html16
-rw-r--r--_ont/ont-huawei-ma5671a-root-web.md331
-rw-r--r--_ont/ont-huawei-ma5671a-root.md166
-rw-r--r--_sass/custom/custom.scss147
-rw-r--r--assets/img/web-root-procedure/sfp-sfp.jpgbin0 -> 198218 bytes
-rw-r--r--assets/img/web-root-procedure/ttl-sfp.jpgbin0 -> 183990 bytes
-rw-r--r--assets/js/modal.js6
7 files changed, 637 insertions, 29 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index fe0aa0a..15482bb 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -270,10 +270,11 @@ layout: table_wrappers
if (document.getElementById('last-modified')) {
listOfScannedFilename.push("{{ page.path }}");
fetch("https://api.github.com/repos/{{ site.gh_owner_name }}/{{ site.gh_repository_name }}/commits?path={{ page.path }}")
- .then((response) => {
- return response.json();
- })
- .then(async function (commits) {
+ .then((response) => {
+ return response.json();
+ })
+ .then(async function (commits) {
+ try{
var date = new Date(commits[0]['commit']['committer']['date']);
var modified = date.toLocaleDateString(undefined);
@@ -283,7 +284,12 @@ layout: table_wrappers
document.getElementById('contributors').textContent = authors.length + " " + (authors.length == 1 ? "Contributor" : "Contributors");
document.getElementById('contributors-modal-list').innerHTML = authors.map(x => "<li><a href='" + x.html_url + "'><img class='avatar' src='" + x.avatar_url + "'><span>" + x.name + "</span<</a></li>").join('');
- });
+ } catch (err) {
+ document.getElementById('last-modified').textContent = "Sorry, last modified not currently available";
+ document.getElementById('contributors').textContent = "Contributors";
+ document.getElementById('contributors-modal-list').innerHTML = "<li>Sorry, list not currently available</li>";
+ }
+ });
}
}
diff --git a/_ont/ont-huawei-ma5671a-root-web.md b/_ont/ont-huawei-ma5671a-root-web.md
new file mode 100644
index 0000000..ddc0b77
--- /dev/null
+++ b/_ont/ont-huawei-ma5671a-root-web.md
@@ -0,0 +1,331 @@
+---
+title: Root Procedure for Huawei MA5671A (V3)
+has_children: false
+parent: Huawei MA5671A
+layout: default
+---
+
+# Root the stick
+
+Connect the SFP adapter to the TTL adapter according to the following diagram:
+
+| USB TTL (UART) Adapter | wire colour in picture | SFP 20pins Molex connector |
+| ---------------------- | ---------------------- | -------------------------- |
+| 3.3V | red | 3.3 (pin #15 and #16) |
+| TX | green | RX (pin #2) |
+| RX | blue | TX (pin #7) |
+| GND | black | GND (pin #14) |
+
+{% include image.html file="web-root-procedure\ttl-sfp.jpg" alt="Example of how the molex SFP - TTL connection should look like" caption="Example of how the molex SFP - TTL connection should look like" %}
+
+{% include image.html file="web-root-procedure\sfp-sfp.jpg" alt="Example of how the SFP - molex SFP connection should look like" caption="Example of how the SFP - molex SFP connection should look like" %}
+
+{% include alert.html content="Try PIN 10 or other GND PINs if the connection doesn't work with PIN 14." alert="Note" icon="svg-warning" color="yellow" %}
+
+{% include alert.html content="Some USB TTL adapters label TX and RX pins the other way around: try to swap them if the connection doesn't work." alert="Note" icon="svg-warning" color="yellow" %}
+
+Connect the TTL adapter to the computer, once done press the following button. A window will open that will execute the root.
+
+{: .text-center .fs-6 }
+<button id="start-button" class="btn btn-blue" data-toogle="modal" data-target="#root-modal" disabled>Start root!</button>
+
+<div id="browser-error" style="display:none">{% include alert.html content="This browser is not compatible with the web-root procedure. See the <a href='https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API#browser_compatibility'>Browser compatibility</a>" alert="Note" icon="svg-warning" color="red" %}</div>
+<noscript>
+{% include alert.html content="Your browser does not support JavaScript!" alert="Note" icon="svg-warning" color="red" %}
+</noscript>
+
+
+# Connect to the stick via SSH
+
+After this is done, reboot the stick, after connecting it to the router via an ethernet mediaconverter or directly plug it in an SFP port, with the port's IP set to whatever IP of the `192.168.1.0/24` subnet (the stick has the IP `192.168.1.10`)
+
+{% include alert.html content="If your subnet is `192.168.1.0/24` make sure you have no ip conflicts." alert="Note" icon="svg-warning" color="yellow" %}
+
+{% include alert.html content="Make sure to disable SFP TX fault detection, otherwise the RX loss will prevent you from connecting to the mini SFP ONT at this point. Don't simply attach the fiber cable to work around this issue as the OLT may ban you." alert="Note" icon="svg-warning" color="yellow" %}
+
+{% include alert.html content="In media converters and on MikroTik it is not necessary to disable TX fault." alert="Info" icon="svg-info" color="blue" %}
+
+Run the terminal and login to the stick with ssh
+
+```shell
+ssh root@192.168.1.10
+```
+
+The password is `admin123`.
+
+{% include alert.html content="If you use a modern OpenSSH version (e.g. >= 8.8) you will have to enable some deprecated algorithms: `ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-dss root@192.168.1.10`" alert="Info" icon="svg-info" color="blue" %}
+
+# Disable serial output
+
+If there is a need to not have the problem of SFP TX fault detection, it is possible to lock the serial (as the TX fault pin is used for serial and would be in a perpetual high state):
+
+```sh
+fw_setenv asc0 1
+fw_setenv preboot "gpio set 3;gpio input 100;gpio input 105;gpio input 106;gpio input 107;gpio input 108"
+```
+
+<div class="modal" data-modal="root-modal" data-modal-backdrop="static" id="root-modal">
+ <div class="modal-content">
+ <div class="modal-header">
+ <span class="close">&times;</span>
+ <h2>Root status</h2>
+ </div>
+ <div class="modal-body" style="display:flex">
+ <div class="animated" id="root-step-1" style="width:50%" >
+ <p>Step 1</p>
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
+ <circle class="path circle" fill="none" stroke="currentColor" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/>
+ <polyline class="path check success" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/>
+ <line class="path line error" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/>
+ <line class="path line error" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/>
+ <line class="path line pause" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/>
+ <line class="path line pause" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/>
+ </svg>
+ <p id="root-text-step-1"></p>
+ </div>
+ <div class="animated" id="root-step-2" style="width:50%" >
+ <p>Step 2</p>
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
+ <circle class="path circle" fill="none" stroke="currentColor" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/>
+ <polyline class="path check success" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/>
+ <line class="path line error" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/>
+ <line class="path line error" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/>
+ <line class="path line pause" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="49.4" y1="37.9" x2="49.4" y2="92.3"/>
+ <line class="path line pause" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="80.8" y1="38" x2="80.8" y2="92.2"/>
+ </svg>
+ <p id="root-text-step-2"></p>
+ </div>
+ </div>
+ </div>
+</div>
+<script>
+ if ('serial' in navigator) {
+ document.getElementById('start-button').disabled = false;
+ } else {
+ document.getElementById('browser-error').style.display = 'block';
+ }
+ const acontroller = new AbortController();
+ const cs = acontroller.signal;
+ class LineBreakTransformer {
+ constructor() {
+ this.chunks = "";
+ }
+ transform(chunk, controller) {
+ this.chunks += chunk;
+ const lines = this.chunks.split("\n");
+ this.chunks = lines.pop();
+ lines.forEach((line) => controller.enqueue(line));
+ }
+ flush(controller) {
+ controller.enqueue(this.chunks);
+ }
+ }
+ let rootModal = document.getElementById("root-modal");
+ let rootStep = [document.getElementById('root-step-1'),document.getElementById('root-step-2')];
+ let rootStepText = [document.getElementById('root-text-step-1'), document.getElementById('root-text-step-2')];
+ rootModal.addEventListener('modal-close', async function(event) {
+ acontroller.abort();
+ });
+ rootModal.addEventListener('modal-open', async function(event) {
+ root({signal: cs});
+ });
+ function pause(message, i) {
+ rootStep[i].classList.add('pause');
+ rootStep[i].classList.remove('complete');
+ rootStep[i].classList.remove('loading');
+ rootStep[i].classList.remove('error');
+ rootStep[i].classList.remove('success');
+ rootStepText[i].textContent = message;
+ }
+ function loading(message, i) {
+ rootStep[i].classList.remove('pause');
+ rootStep[i].classList.remove('complete');
+ rootStep[i].classList.add('loading');
+ rootStep[i].classList.remove('error');
+ rootStep[i].classList.remove('success');
+ rootStepText[i].textContent = message;
+ }
+ function showError(message, i) {
+ rootStep[i].classList.remove('pause');
+ rootStep[i].classList.remove('complete');
+ rootStep[i].classList.remove('success');
+ rootStep[i].classList.remove('loading');
+ rootStep[i].classList.add('error');
+ rootStepText[i].textContent = message;
+ }
+ function showSuccess(message, i) {
+ rootStep[i].classList.remove('pause');
+ rootStep[i].classList.remove('error');
+ rootStep[i].classList.remove('loading');
+ rootStep[i].classList.remove('complete');
+ rootStep[i].classList.add('success');
+ rootStepText[i].textContent = message;
+ }
+ function delay(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+ }
+ async function waitUbootStop(writer, reader) {
+ const interval = setInterval(function() {
+ writer.write(String.fromCharCode(3));
+ }, 10);
+
+ while (true) {
+ const { value, done } = await reader.read();
+
+ if (value.startsWith('U-Boot')) {
+ loading("Root in progress: Trigger characters received. DO NOT TOUCH THE HUAWEI MA5671A UNTIL THE PROCEDURE IS COMPLETED!",0);
+ await delay(5000);
+ clearInterval(interval);
+ break;
+ }
+ }
+ }
+ async function checkUbootUnlocked(reader) {
+ while (true) {
+ try {
+ const { value, done } = await Promise.race([
+ reader.read(),
+ new Promise((_, reject) => setTimeout(reject, 2000, new Error("timeout")))
+ ]);
+
+ if (value.startsWith('Press SPACE to delay and Ctrl-C to abort autoboot')) {
+ return true;
+ }
+ } catch (err) {
+ return false;
+ }
+ }
+ }
+ async function waitFailbackShell(writer, reader) {
+ while (true) {
+ const { value, done } = await reader.read();
+
+ if (value.startsWith('Press the [f] key and hit [enter] to enter failsafe mode')) {
+ const interval = setInterval(function() {
+ writer.write('f\n');
+ }, 10);
+
+ loading("Root in progress: Trigger characters received. Waiting for boot to end...",1);
+ await delay(3000);
+ clearInterval(interval);
+ break;
+ }
+ }
+
+ const interval = setInterval(function() {
+ writer.write(String.fromCharCode(10));
+ }, 10);
+
+ while (true) {
+ const { value, done } = await reader.read();
+
+ if (value.includes('root@(none)')) {
+ await delay(1000);
+ clearInterval(interval);
+ break;
+ }
+ }
+ }
+ async function root({ signal } = {}) {
+ loading("Waiting for the user to choose the port",0);
+ pause("",1);
+ let port;
+ try {
+ port = await navigator.serial.requestPort();
+ } catch (err) {
+ showError(`Error: ${err.message}`,0);
+ console.log(`Error: ${err.message}\n`);
+ return;
+ }
+ if (!port) {
+ showError('Error: port not open',0);
+ console.log('Error: port not open\n');
+ return;
+ }
+ loading("Please disconnect the Huawei MA5671A from the SFP adapter if it is currently plugged in!",0);
+ try {
+ await port.open({ baudRate: 115200 });
+ } catch (err) {
+ showError(`Error: ${err.message}`,0);
+ console.log(`Error: ${err.message}\n`);
+ return;
+ }
+ const textDecoder = new TextDecoderStream();
+ const readableStreamClosed = port.readable.pipeTo(textDecoder.writable);
+ const reader = textDecoder.readable.pipeThrough(new TransformStream(new LineBreakTransformer())).getReader();
+ const textEncoderStream = new TextEncoderStream();
+ const writerStreamClosed = textEncoderStream.readable.pipeTo(port.writable);
+ const writer = textEncoderStream.writable.getWriter();
+ try {
+ await delay(10000);
+ loading("Now you need to insert the Huawei MA5671A into the SFP adapter, if the procedure does not go ahead, check the connections and then remove and reconnect the Huawei MA5671A again",0);
+ while(true) {
+ await waitUbootStop(writer, reader);
+ const ubootUnlocked = await checkUbootUnlocked(reader);
+
+ if (ubootUnlocked == true) {
+ break;
+ }
+
+ loading("Root in progress: Set U-Boot bootdelay to 5...",0);
+ writer.write('setenv bootdelay 5\n');
+ await delay(1000);
+ loading("Root in progress: Enable ASC serial...",0);
+ writer.write('setenv asc0 0\n');
+ await delay(1000);
+ loading("Root in progress: Set GPIO to unlock serial...",0);
+ writer.write('setenv preboot "gpio set 3;gpio input 2;gpio input 105;gpio input 106;gpio input 107;gpio input 108"\n');
+ await delay(1000);
+ loading("Root in progress: Save changes...",0);
+ writer.write('saveenv\n');
+ await delay(1000);
+ loading("Root in progress: Rebooting...",0);
+ writer.write('reset\n');
+ await delay(1000);
+ }
+
+ loading("Root in progress: Rebooting...",0);
+ writer.write('reset\n');
+ await delay(1000);
+ showSuccess("Congratulations! Step completed.",0);
+ } catch (err) {
+ showError(`Error: ${err.message}`,0);
+ console.log(`Error: ${err.message}\n`);
+ reader.cancel();
+ await readableStreamClosed.catch(() => { /* Ignore the error */ });
+ writer.close();
+ await writerStreamClosed;
+ await port.close();
+ return;
+ }
+ try {
+ loading("Waiting for reboot",1);
+ await waitFailbackShell(writer, reader);
+ loading("Root in progress: Enable full Linux shell...",1);
+ writer.write('mount_root && mkdir -p /overlay/etc && sed "s|/opt/lantiq/bin/minishell|/bin/ash|g" /rom/etc/passwd > /overlay/etc/passwd\n');
+ await delay(1000);
+ loading("Root in progress: Umount rootfs partitions...",1);
+ writer.write('umount /overlay && umount -a\n');
+ await delay(1000);
+ showSuccess("Congratulations! Step completed.",1);
+ } catch (err) {
+ showError(`Error: ${err.message}`,1);
+ console.log(`Error: ${err.message}\n`);
+ reader.cancel();
+ await readableStreamClosed.catch(() => { /* Ignore the error */ });
+ writer.close();
+ await writerStreamClosed;
+ await port.close();
+ return;
+ }
+
+ reader.cancel();
+ await readableStreamClosed.catch(() => { /* Ignore the error */ });
+ writer.close();
+ await writerStreamClosed;
+ await port.close();
+ }
+</script>
+
+# Miscellaneous Links
+- [List of root procedure for Huawei MA5671A](/ont-huawei-ma5671a-root)
diff --git a/_ont/ont-huawei-ma5671a-root.md b/_ont/ont-huawei-ma5671a-root.md
index 88bc6a7..fa6271f 100644
--- a/_ont/ont-huawei-ma5671a-root.md
+++ b/_ont/ont-huawei-ma5671a-root.md
@@ -1,24 +1,41 @@
---
-title: Root Procedure for Huawei MA5671A
+title: List of Root Procedure for Huawei MA5671A
+description: For documentation purposes only. This page contains the history of root procedures for the Huawei MA5671A stick.
has_children: false
parent: Huawei MA5671A
layout: default
+nav_exclude: true
+search_exclude: true
---
+{% include alert.html content="It is strongly recommended that you only ever use the latest version ([Web root procedure](/ont-huawei-ma5671a-root-web)).
+" alert="Info" icon="svg-info" color="blue" %}
+
+# Root Procedure for Huawei MA5671A (V3 - Web serial)
+
+Can be accessed via the link [Web root procedure](/ont-huawei-ma5671a-root-web)
+
+# Root Procedure for Huawei MA5671A (V2 - Python)
+
+{% include alert.html content="This version remains for documentation purposes only. Please use the latest procedure: [Web root procedure](/ont-huawei-ma5671a-root-web)" alert="Important" icon="svg-warning" color="red" %}
+
+{% include alert.html content="It is strongly recommended that you only ever use the latest version ([Web root procedure](/ont-huawei-ma5671a-root-web)).
+" alert="Info" icon="svg-info" color="blue" %}
+
1. Take the SFP molex and four coloured cables and solder them to the molex according to the following diagram:
-| USB TTL(UART) Adapter | wire colour in picture | SFP 20pins Molex connector |
-| --------------------- | ---------------------- | -------------------------- |
-| 3.3V | red | pin #15 and #16 |
-| TX | orange | pin #2 |
-| RX | yellow | pin #7 |
-| GND | green | pin #14 |
+| USB TTL (UART) Adapter | wire colour in picture | SFP 20pins Molex connector |
+| ---------------------- | ---------------------- | -------------------------- |
+| 3.3V | red | pin #15 and #16 |
+| TX | orange | pin #2 |
+| RX | yellow | pin #7 |
+| GND | green | pin #14 |
-{% include alert.html content="Use the GND wire as an ON/OFF switch, otherwise there will be a slight delay before data is displayed on the console (putty/TeraTerm)." alert="Important" icon="svg-warning" color="yellow" %}
+{% include alert.html content="Use the GND wire as an ON/OFF switch, otherwise there will be a slight delay before data is displayed on the console (putty/TeraTerm)." alert="Important" icon="svg-warning" color="yellow" %}
-{% include alert.html content="Try PIN 10 or other GND PINs if the connection doesn't work with PIN 14." alert="Note" icon="svg-warning" color="yellow" %}
+{% include alert.html content="Try PIN 10 or other GND PINs if the connection doesn't work with PIN 14." alert="Note" icon="svg-warning" color="yellow" %}
-{% include alert.html content="Some USB TTL adapters label TX and RX pins the other way around: try to swap them if the connection doesn't work." alert="Note" icon="svg-warning" color="yellow" %}
+{% include alert.html content="Some USB TTL adapters label TX and RX pins the other way around: try to swap them if the connection doesn't work." alert="Note" icon="svg-warning" color="yellow" %}
{:style="counter-reset:none"}
1. Install python and `pyserial` with `pip`
@@ -27,9 +44,9 @@ pip install pyserial
```
1. Make the connections as shown to a TTL adapter except for GND (which should remain detached as it is used as a switch)
-{% include image.html file="ma5671a-root-1.jpg" alt="Example of how the sfp-ttl connection should look like" caption="Example of how the sfp-ttl connection should look like" %}
-{% include image.html file="new-root-procedure\board-molex-arduino.jpg" alt="Example of how the sfp-ttl connection should look like with a custom board" caption="Example of how the sfp-ttl connection should look like with a custom board" %}
-{% include image.html file="ma5671a-root-2.jpg" alt="SFP Molex" caption="SFP Molex" %}
+{% include image.html file="ma5671a-root-1.jpg" alt="Example of how the sfp-ttl connection should look like" caption="Example of how the sfp-ttl connection should look like" %}
+{% include image.html file="new-root-procedure\board-molex-arduino.jpg" alt="Example of how the sfp-ttl connection should look like with a custom board" caption="Example of how the sfp-ttl connection should look like with a custom board" %}
+{% include image.html file="ma5671a-root-2.jpg" alt="SFP Molex" caption="SFP Molex" %}
{:style="counter-reset:none"}
1. Open Tera Term (or other serial terminal emulators), find the correct serial port of the TTL adapter, change the port on the script on line 7 instead of `COM8`.
@@ -89,12 +106,13 @@ except (KeyboardInterrupt, SystemExit):
ser.close()
sys.exit(1)
```
+{% include alert.html content="Originally, this other string was used for the `setenv preboot`: `gpio input 105;gpio input 106;gpio input 107;gpio input 108;gpio set 3;gpio set 109;gpio set 110;gpio clear 423;gpio clear 422;gpio clear 325;gpio clear 402;gpio clear 424`" alert="Info" icon="svg-info" color="blue" %}
{:style="counter-reset:none"}
1. Reboot the stick
1. Open Tera Term (or other serial terminal emulators), after it has loaded press `enter` to activate the console
-{% include image.html file="new-root-procedure\press-enter.jpg" alt="Press enter to activate the console" caption="Press enter to activate the console" %}
+{% include image.html file="new-root-procedure\press-enter.jpg" alt="Press enter to activate the console" caption="Press enter to activate the console" %}
{:style="counter-reset:none"}
1. With `sed` change the default shell from `/opt/lantiq/bin/minishell` to `/bin/ash` by editing the file `/etc/passwd`:
@@ -104,7 +122,7 @@ sed -i "s|/opt/lantiq/bin/minishell|/bin/ash|g" /etc/passwd
```
{% include alert.html content="Do not use `vim`!" alert="Important" icon="svg-warning" color="red" %}
-{% include alert.html content="Be aware that kernel panics happen often! If a kernel panic happens wait for the reboot and quickly try again." alert="Important" icon="svg-warning" color="yellow" %}
+{% include alert.html content="Be aware that kernel panics happen often! If a kernel panic happens wait for the reboot and quickly try again." alert="Important" icon="svg-warning" color="yellow" %}
```shell
@@ -112,14 +130,14 @@ sed -i "s|/opt/lantiq/bin/minishell|/bin/ash|g" /etc/passwd
[ 34.612000] Rebooting in 3 seconds..
```
-{% include alert.html content="The cause of these kernel panics could be insufficient supply of power." alert="Info" icon="svg-info" color="blue" %}
+{% include alert.html content="The cause of these kernel panics could be insufficient supply of power." alert="Info" icon="svg-info" color="blue" %}
{:style="counter-reset:none"}
1. After this is done, reboot the stick, after connecting it to the router via an ethernet mediaconverter or directly plug it in an SFP port, with the port's IP set to whatever IP of the 192.168.1.0/24 subnet (the stick has the IP 192.168.1.10)
-{% include alert.html content="If your subnet is 192.168.1.0/24 make sure you have no ip conflicts." alert="Note" icon="svg-warning" color="yellow" %}
+{% include alert.html content="If your subnet is 192.168.1.0/24 make sure you have no ip conflicts." alert="Note" icon="svg-warning" color="yellow" %}
-{% include alert.html content="Make sure to disable SFP TX fault detection, otherwise the RX loss will prevent you from connecting to the mini SFP ONT at this point. Don't simply attach the fiber cable to work around this issue as the OLT may ban you." alert="Note" icon="svg-warning" color="yellow" %}
+{% include alert.html content="Make sure to disable SFP TX fault detection, otherwise the RX loss will prevent you from connecting to the mini SFP ONT at this point. Don't simply attach the fiber cable to work around this issue as the OLT may ban you." alert="Note" icon="svg-warning" color="yellow" %}
{:style="counter-reset:none"}
1. Run the terminal and login to the stick with ssh
@@ -130,12 +148,116 @@ ssh root@192.168.1.10
The password is `admin123`.
-{% include alert.html content="If you use a modern OpenSSH version (e.g. >= 8.8) you will have to enable some deprecated algorithms: ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-dss [...]" alert="Info" icon="svg-info" color="blue" %}
+{% include alert.html content="If you use a modern OpenSSH version (e.g. >= 8.8) you will have to enable some deprecated algorithms: `ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-dss [...]`" alert="Info" icon="svg-info" color="blue" %}
+
+# Root Procedure for Huawei MA5671A (V1 - Tweezers)
+
+{% include alert.html content="This version remains for documentation purposes only. Please use the latest procedure: [Web root procedure](/ont-huawei-ma5671a-root-web)" alert="Important" icon="svg-warning" color="red" %}
+
+{% include alert.html content="This procedure requires the physical disassembly of the stick, and the use of tweezers that can burn the stick, it is highly recommended not to use it." alert="Important" icon="svg-warning" color="red" %}
+
+1. take the SFP molex and the 4 coloured cables and solder them to the molex according to the following diagram:
+
+| USB TTL (UART) Adapter | wire colour in picture | SFP 20pins Molex connector |
+| ---------------------- | ---------------------- | -------------------------- |
+| 3.3V | red | pin #15 and #16 |
+| TX | orange | pin #2 |
+| RX | yellow | pin #7 |
+| GND | green | pin #10 |
+
+{% include alert.html content="Use GND wire as ON/OFF switch, otherwise there will be a slight delay before data is displayed on the console (putty/TeraTerm)." alert="Important" icon="svg-warning" color="yellow" %}
+
+{% include image.html file="ma5671a-root-1.jpg" alt="Example of how the sfp-ttl connection should look like" caption="Example of how the sfp-ttl connection should look like" %}
+{% include image.html file="ma5671a-root-2.jpg" alt="Molex SFP" caption="Molex SFP" %}
+
+{:style="counter-reset:none"}
+1. Disassemble the stick by releasing the metal tabs that hold the cover in place. There are two tabs, one on each side, inside these holes:
+
+{% include image.html file="ma5671a-root-4.jpg" alt="Metal tabs that hold the cover in place" caption="Metal tabs that hold the cover in place" %}
+
+{:style="counter-reset:none"}
+1. Once you have removed the metal casing, you are left with the half-naked stick (note that the release mechanism also comes off easily and then you don't know how to put it back together, so take a photo and memorise the positioning well).
+
+1. Before shorting the stick, connect the previously soldered cables and molex to the USB serial (photo immediately below) and to the stick (the molex, of course) and check that the jumper on the usb key is set to 3.3V
+
+{% include image.html file="ma5671a-root-8.jpg" alt="TTL" caption="TTL" %}
+
+{:style="counter-reset:none"}
+1. The disassembled stick will appear as in the photo, in which I have highlighted in red the 2 pins to be shorted. Here they use wire, but a pair of tweezers is sufficient (I used those, in fact). Be careful not to make any other contacts by possibly covering everything else with electrical tape.
+
+{% include image.html file="ma5671a-root-4.jpg" alt="tweezers" caption="tweezers" %}
+{% include image.html file="ma5671a-root-6.jpg" alt="tweezers" caption="tweezers" %}
+{% include image.html file="ma5671a-root-5.jpg" alt="tweezers and eletrical tape" caption="tweezers and eletrical tape" %}
+{% include image.html file="ma5671a-root-6.jpg" alt="tweezers" caption="tweezers" %}
+
+{:style="counter-reset:none"}
+1. For the moment connect all cables to the usb key except the green (ground) or red (voltage), otherwise the stick will boot before you can do the following (N.B. for those who bought the uart above RX and TX are reversed). Open and configure Teratem for serial connection (select the correct com port, speed 115.200, english language, otherwise in japainise you can't read anything understandable) insert the key in the PC (I take it for granted that it has already been installed, drivers and all), short the 2 pins seen above and keeping the short connected the missing coloured cable
+
+1. If you have done everything correctly, you should see something similar to the picture below (if nothing happens, you have obviously done something wrong with cables, molexes, soldering irons, etc., so you will have to start from the beginning again and work out which step you did wrong):
+
+{% include image.html file="ma5671a-root-9.png" alt="serial shell" caption="serial shell" %}
+
+{:style="counter-reset:none"}
+1. Remove the short (tweezers or whatever you used), then type 7 and enter. You should see this:
+
+{% include image.html file="ma5671a-root-10.png" alt="serial shell 2" caption="serial shell 2" %}
+
+{:style="counter-reset:none"}
+1. From the Teraterm menu `FILE` → `TRANSFER` → `XMODEM` → `SEND` → `[1224abort.bin]` (which is the third of the files downloaded earlier):
+
+{% include image.html file="ma5671a-root-11.png" alt="1224abort.bin" caption="1224abort.bin" %}
+
+{:style="counter-reset:none"}
+1. As soon as the file transfer is complete, you have 2 seconds to press `CTRL+C`, if you have not done so, you can return to the step 6. Otherwise, you should see:
+
+{% include image.html file="ma5671a-root-12.png" alt="falcon shell" caption="falcon shell" %}
+
+{:style="counter-reset:none"}
+1. To permanently unlock the bootloader, without having to repeat the previous steps, you must give the following commands:
+```
+FALCON => setenv bootdelay 5
+FALCON => setenv asc0 0
+FALCON => setenv preboot "gpio set 3;gpio input 100;gpio input 105;gpio input 106;gpio input 107;gpio input 108"
+FALCON => saveenv
+```
+
+{% include alert.html content="Originally, this other string was used for the `setenv preboot`: `gpio input 105;gpio input 106;gpio input 107;gpio input 108;gpio set 3;gpio set 109;gpio set 110;gpio clear 423;gpio clear 422;gpio clear 325;gpio clear 402;gpio clear 424`" alert="Info" icon="svg-info" color="blue" %}
+
+{% include alert.html content="Instead of the nexts points, it is recommended to boot and run the `sed` command documented in V2" alert="Warning" icon="svg-warning" color="red" %}
+
+{:style="counter-reset:none"}
+1. If you have done everything correctly you can reboot the stick (actually if you are convinced that everything is ok you could also close it again), disconnecting and reconnecting one of the 2 cables from before (ground or voltage), then again from the terminal you will have 5 seconds to lock the bootloader by doing a simple CTRL+C. Now upload the firmware image of the first mtd2 partition to the stick with the command
+```
+FALCON => loadb 0x80800000
+```
+At this point it will appear:
+
+{% include image.html file="ma5671a-root-13.jpg" alt="shell requiring `mtd2` upload" caption="shell requiring `mtd2` upload" %}
+
+{:style="counter-reset:none"}
+1. From the teratem menu do `FILE` → `TRANSFER` → `KERMIT` → `SEND` → `[mtd2.bin]`.
+It will start uploading the file at a speed of about 3-4 KBbs. Now you will have to wait more than half an hour for the upload to complete.
+
+1. Once finished, the image loaded on the stick must also be saved to the corresponding system partition (the first of the 2) with the commands
+```
+FALCON => sf probe 0
+FALCON => sf erase C0000 740000
+FALCON => sf write 80800000 C0000 740000
+```
+
+1. check that the stick is configured to boot from partition 0 (yes I know mtd2 goes on 0 and mtd5 goes on 1, complain to Laniq) with the command
+```
+FALCON => printenv committed_image
+```
+1. If it is 0, fine, otherwise configure partition 0 with the commands, and check if are 0.
+```
+FALCON => setenv committed_image 0
+FALCON => saveenv
+FALCON => printenv committed_image
+```
# Miscellaneous Links
- [Come avere i 2.5 Gbps su un unico dispositivo senza il Fastgate](https://forum.fibra.click/d/17836-come-avere-i-25-gbps-su-un-unico-dispositivo-senza-il-fastgate)
- [Support MA5671A SFP GPON](https://forum.openwrt.org/t/support-ma5671a-sfp-gpon/48042)
- [La fibre Orange à 2Gbps, sur un routeur MikroTik 10Gbps CCR2004, via un ONT SFP+](https://lafibre.info/remplacer-livebox/guide-de-connexion-fibre-directement-sur-un-routeur-voire-meme-en-2gbps/msg832904/#msg832904)
-- [Bypassing the HH3K up to 2.5Gbps using a BCM57810S NIC](https://www.dslreports.com/forum/r32230041-Internet-Bypassing-the-HH3K-up-to-2-5Gbps-using-a-BCM57810S-NIC)
-- [Bypassing the HH3K up to 2.5Gbps using a BCM57810S NIC](https://www.dslreports.com/forum/r32230041-Internet-Bypassing-the-HH3K-up-to-2-5Gbps-using-a-BCM57810S-NIC)
-
+- [Bypassing the HH3K up to 2.5Gbps using a BCM57810S NIC](https://www.dslreports.com/forum/r32230041-Internet-Bypassing-the-HH3K-up-to-2-5Gbps-using-a-BCM57810S-NIC) \ No newline at end of file
diff --git a/_sass/custom/custom.scss b/_sass/custom/custom.scss
index 5a4c533..ec35a97 100644
--- a/_sass/custom/custom.scss
+++ b/_sass/custom/custom.scss
@@ -204,4 +204,151 @@ figure {
vertical-align: middle;
margin-left: 10px;
width: 20px;
+}
+
+
+.animated {
+ svg {
+ width: 100px;
+ display: block;
+ margin: 40px auto 0;
+ }
+ &.pause {
+ svg .success, svg .error, svg .loading {
+ display: none;
+ }
+ }
+ &.success {
+ color: $green-500;
+ fill: $green-500;
+ svg .error, svg .loading, svg .pause {
+ display: none;
+ }
+ }
+ &.error {
+ color: $red-500;
+ fill: $red-500;
+ svg .success, svg .loading, svg .pause {
+ display: none;
+ }
+ }
+ &.loading {
+ svg .success, svg .error, svg .pause {
+ display: none;
+ }
+ svg .path {
+ stroke-dasharray: 269%;
+ stroke-dashoffset: 0;
+ -webkit-animation: loading 1s cubic-bezier(1,1,1,1) 0s infinite;
+ animation: loading 1s cubic-bezier(1,1,1,1) 0s infinite;
+ transform-origin: 50% 50%;
+ -webkit-transform-origin: 50% 50%;
+ -moz-transform-origin: 50px 50px;
+ }
+ }
+ &.complete {
+ svg .path {
+ stroke-dasharray: 314%;
+ stroke-dashoffset: 0;
+ }
+ }
+
+ .path {
+ stroke-dasharray: 1000;
+ stroke-dashoffset: 0;
+ &.circle {
+ -webkit-animation: dash .9s ease-in-out;
+ animation: dash .9s ease-in-out;
+ }
+ &.line {
+ stroke-dashoffset: 1000;
+ -webkit-animation: dash .9s .35s ease-in-out forwards;
+ animation: dash .9s .35s ease-in-out forwards;
+ }
+ &.check {
+ stroke-dashoffset: -100;
+ -webkit-animation: dash-check .9s .35s ease-in-out forwards;
+ animation: dash-check .9s .35s ease-in-out forwards;
+ }
+ }
+
+ p {
+ text-align: center;
+ margin: 20px 0 60px;
+ font-size: 1.25em;
+ }
+
+ @keyframes rotate {
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
+
+ @keyframes loading {
+ 0% {
+ stroke-dasharray: 44% 269%;
+ stroke-dashoffset: 0%;
+ }
+ 50% {
+ stroke-dasharray: 156%;
+ stroke-dashoffset: 156%;
+ }
+ 100% {
+ stroke-dasharray: 44% 269%;
+ stroke-dashoffset: 314%;
+ }
+ }
+
+ @-webkit-keyframes dash {
+ 0% {
+ stroke-dashoffset: 1000;
+ }
+ 100% {
+ stroke-dashoffset: 0;
+ }
+ }
+
+ @keyframes dash {
+ 0% {
+ stroke-dashoffset: 1000;
+ }
+ 100% {
+ stroke-dashoffset: 0;
+ }
+ }
+
+ @-webkit-keyframes dash-check {
+ 0% {
+ stroke-dashoffset: -100;
+ }
+ 100% {
+ stroke-dashoffset: 900;
+ }
+ }
+
+ @keyframes dash-check {
+ 0% {
+ stroke-dashoffset: -100;
+ }
+ 100% {
+ stroke-dashoffset: 900;
+ }
+ }
+
+ @-webkit-keyframes check {
+ 0% {
+ stroke-dashoffset: -110;
+ }
+ 100% {
+ stroke-dashoffset: 0;
+ }
+ }
+ @keyframes check {
+ 0% {
+ stroke-dashoffset: -110;
+ }
+ 100% {
+ stroke-dashoffset: 0;
+ }
+ }
} \ No newline at end of file
diff --git a/assets/img/web-root-procedure/sfp-sfp.jpg b/assets/img/web-root-procedure/sfp-sfp.jpg
new file mode 100644
index 0000000..28ad636
--- /dev/null
+++ b/assets/img/web-root-procedure/sfp-sfp.jpg
Binary files differ
diff --git a/assets/img/web-root-procedure/ttl-sfp.jpg b/assets/img/web-root-procedure/ttl-sfp.jpg
new file mode 100644
index 0000000..74334e6
--- /dev/null
+++ b/assets/img/web-root-procedure/ttl-sfp.jpg
Binary files differ
diff --git a/assets/js/modal.js b/assets/js/modal.js
index 2cae945..c18d751 100644
--- a/assets/js/modal.js
+++ b/assets/js/modal.js
@@ -1,12 +1,12 @@
var modals = document.querySelectorAll("[data-modal]");
var modalToogles = document.querySelectorAll("[data-toogle=modal]");
-
[...modals].forEach(modal => {
var closeBtns = modal.getElementsByClassName("close");
[...closeBtns].forEach(closeBtn => {
closeBtn.addEventListener("click", (event) => {
modal.style.display = "none";
+ modal.dispatchEvent( new Event('modal-close'));
});
})
});
@@ -15,11 +15,13 @@ var modalToogles = document.querySelectorAll("[data-toogle=modal]");
toogle.addEventListener("click", (event) => {
var modal = document.querySelector(toogle.getAttribute('data-target'));
modal.style.display = "block";
+ modal.dispatchEvent(new Event('modal-open'));
});
});
window.addEventListener("click", function(event) {
- if ([...modals].includes(event.target)) {
+ if ([...modals].filter(modal => modal.getAttribute("data-modal-backdrop") !== "static").includes(event.target)) {
+ event.target.dispatchEvent( new Event('modal-close'));
event.target.style.display = "none";
}
});