Skip to content

Commit 1a7a31f

Browse files
author
Ernesto Castellotti
authored
Disable RX_LOS (#138)
1 parent 65ea7b0 commit 1a7a31f

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

_ont/ont-fs-com-gpon-onu-stick-with-mac.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,45 @@ reboot
266266
onu ploamsg
267267
```
268268

269+
## Disable RX_LOS status
270+
{% include alert.html content="The patch below is only compatible with the firmware version `6BA1896SPLQA42`" alert="Info" icon="svg-info" color="blue" %}
271+
272+
Some switches/routers (e.g. Mikrotik) do not allow access to the magament interface without the fiber connected because the SFP reports RX_LOS status, it's possible to modify the `mod_optic.ko` driver to spoof non RX_LOS status by setting PIN 8 (RX_LOS) to be always low.
273+
274+
This is the change to be made in hex format:
275+
276+
```
277+
< 00013740: 2404 0003 2405 0001 0c00 0000 ac43 0980 $...$........C..
278+
---
279+
> 00013740: 2404 0003 2405 0000 0c00 0000 ac43 0980 $...$........C..
280+
```
281+
282+
{% include alert.html content="Proceed only if your `md5sum /lib/modules/3.10.49/mod_optic.ko` has the correct checksum `7c718c3410c4120fe98fa7a9a5c6c407`" alert="Info" icon="svg-info" color="blue" %}
283+
284+
This is the patch, encoded in base64:
285+
```
286+
QlNESUZGNDA2AAAAAAAAADYAAAAAAAAAXEEFAAAAAABCWmg5MUFZJlNZ5TTrjgAAB+ZARjAEACAA
287+
AARAACAAMQZMQRppiFkgKGTeXi7kinChIcpp1xxCWmg5MUFZJlNZcaVLvQABOOCAwAAAAQAIAAig
288+
ACClRgZoMhUf9JKbgIk3hdyRThQkHGlS70BCWmg5F3JFOFCQAAAAAA==
289+
```
290+
291+
Save it on your computer (not on the stick) as `mod_optic.base64`, then run:
292+
```sh
293+
base64 -d mod_optic.base64 > mod_optic.bspatch
294+
bspatch <your_original_mod_optic.ko> mod_optic.ko mod_optic.bspatch
295+
```
296+
{% include alert.html content="if you don't have bspatch installed, most distributions includes it in bsdiff package" alert="Info" icon="svg-info" color="blue" %}
297+
298+
After patching the resulting patched `mod_optic.ko` should have an md5 checksum of `e14a5a70b023873853afe920870f076e`.
299+
If that also checks, go on making a backup copy of your original `mod_optic.ko` on the stick.
300+
301+
```sh
302+
cd /lib/modules/3.10.49/
303+
cp mod_optic.ko mod_optic.ko.original
304+
```
305+
306+
Now you have to use SCP to copy the modified `mod_optic.ko` kernel module in `/lib/modules/3.10.49/mod_optic.ko`.
307+
269308
## List of software versions
270309
- 6BA1896SPLQA13 (Dec 16 2016)
271310
- 6BA1896SPLQA41

0 commit comments

Comments
 (0)