Skip to content

Commit 7e287a7

Browse files
committed
readme: improve documentation for both primary usecases
install: provide example overrideslot command when unnecessary install is attempted
1 parent e7296e6 commit 7e287a7

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,38 @@ This utility is built on:
2323
## Features
2424
- Ethernet UNI can be moved from slot 10 to slot 1 in MIB entities, thus becoming compatible with AT&T and Orange services
2525
- Disables traffic filtering when the Dot1X Port Extension Package (ME 290) is configured to filter all traffic
26-
- Uses serial provided to mod instead of the serial in EEPROM to allow the device to revert cleanly to stock config if the fail-safe triggers
26+
- Uses serial provided to mod instead of the serial in EEPROM to allow the device to revert cleanly to stock config if the failsafe triggers
2727
- Sets appropriate equipment ID/hwver/swver automatically if it can be determined from the ISP/serial combo provided as arguments
2828
- Starts `dropbear` sshd 2 minutes or so after device boot for more convenient administration (no idle timeout)
2929
- Limited ability to modify/suppress Received Frame VLAN Tagging Operations Table rules found in Extended VLAN Tagging Operation Configuration Data (ME 171) (needed for Orange support)
30+
- Limited installation mode not subject to failsafe for ISPs that support bring-your-own-ONT (such as many ISPs in the Netherlands)
3031

31-
## Usage
32+
## Usage - Full Installation Mode (ATT, Frontier, Telus, Orange, etc.)
33+
34+
Full installation is intended for ISPs where it is necessary to change the serial, account for 802.1x configuration issues, or account for VLAN configuration issues.
3235

3336
1. Download the mod from [the Releases page](https://github.com/rssor/fs_xgspon_mod/releases) and extract it on a device with L2 connectivity to the module
34-
2. Obtain the serial for the FS.com ONU, either by emailing your FS.com rep, or using the [serial brute forcing](#serial-brute-forcing) functionality of this tool.
37+
2. Obtain the serial for the FS.com ONU, either by emailing your FS.com rep, or using the [serial brute forcing](#serial-brute-forcing) functionality of this tool
3538
3. Run the [install](#installation) command with the information required by your ISP (at minimum serial, possibly also hwver, swver, and equipment ID)
3639
4. Wait several minutes for device to reboot, ensure you have internet connectivity
3740
5. Run the [persist](#enabling-persistence) command
3841
6. (Optional) Add a cron job on your gateway/router (NOT THIS DEVICE) to run the [rearm](#rearm) command regularly to recover from the failsafe condition if it triggers due to poorly timed power interruptions
3942

4043
By convention the documentation below uses `GPON227000fe` to refer to the serial of the FS.com device and `HUMA12ab34cd` to refer to the serial of your ISP's ONT.
4144

45+
## Usage - Slot Override Only (KPN)
46+
47+
Slot override only mode is intended For ISPs that allow you to bring your own devices and register the serial, typically the only action necessary might be to move the Ethernet UNI slot.
48+
49+
1. Download the mod from [the Releases page](https://github.com/rssor/fs_xgspon_mod/releases) and extract it on a device with L2 connectivity to the module
50+
2. Obtain the serial for the FS.com ONU, either by emailing your FS.com rep, or using the [serial brute forcing](#serial-brute-forcing) functionality of this tool
51+
3. Run the [overrideslot](#override-eth-uni-slot) command with the information required by your ISP (almost certainly slot 1)
52+
4253
### Installation
4354

44-
Ensure that you're sitting adjacent to the stick on the network and that you have an address in the `192.168.100.0/24` subnet. The stick is at `192.168.100.1`. Ensure that your machine is configured to accept conncections on port `8172` (you may need to add a firewall allow rule for this!). Activating the mod for a single boot only requires one command:
55+
NOTE: Certain ISPs can skip full installation and use only the [overrideslot](#override-eth-uni-slot) command.
4556

46-
NOTE: Certain ISPs can skip full installation and use only the [`overrideslot`](#override-eth-uni-slot) command.
57+
Ensure that you're sitting adjacent to the stick on the network and that you have an address in the `192.168.100.0/24` subnet. The stick is at `192.168.100.1`. Ensure that your machine is configured to accept conncections on port `8172` (you may need to add a firewall allow rule for this!). Activating the mod for a single boot only requires one command:
4758

4859
```
4960
# ATT
@@ -55,7 +66,7 @@ NOTE: Certain ISPs can skip full installation and use only the [`overrideslot`](
5566
# Telus
5667
./fs_xgspon_mod.py install GPON227000fe telus ARCB12ab34cd
5768
58-
# KPN should not use this command, but overrideslot instead
69+
# KPN should not use this command, but overrideslot instead with slot 1!
5970
6071
# Any arbitrary ISP as long as you know the equipment id/hwver/swver and necessary ethernet uni slot
6172
./fs_xgspon_mod.py install GPON227000fe manual ALCL12ab34cd --hwver SOMETHING --swver ELSE --eqvid EQUIPMENT --eth_slot 10
@@ -106,7 +117,7 @@ Persistence allows the modification to automatically re-arm itself approximately
106117

107118
### Rearm
108119

109-
Rearm is used to either re-enable persistence after the fail-safe triggers, or to enable the mod for the next boot if it's in non-persistent mode. If it detects that the failsafe had been triggered it will automatically reboot.
120+
Rearm is used to either re-enable persistence after the failsafe triggers, or to enable the mod for the next boot if it's in non-persistent mode. If it detects that the failsafe had been triggered it will automatically reboot.
110121

111122
Recommended use is to set this up on an hourly or similar cron job on your gateway (using the original serial as an argument!) so that if the failsafe triggers it will be automatically re-enabled.
112123

@@ -179,13 +190,14 @@ Creds for FS.com XGS-PON stick with serial GPON227000fe:
179190
The HMAC key used to derive passwords appears to be different between the various OEM customers, so I don't think this works for anything except the FS.com sticks.
180191

181192

182-
### Override ETH UNI slot
193+
### Override ETH UNI Slot
183194

184-
If all you need is changing the ethernet UNI slot id, you can also use the `overrideslot` command which will place a config file on your module that overrides the slot number.
195+
If all you need is changing the ethernet UNI slot id, you can also use the `overrideslot` command which will place a config file on your module that overrides the slot number. KPN in the Netherlands is an example where this is all that is necessary to get the ONT online.
185196

186197
This can be used as a more simple alternative to the full install method, and will not require any further modifications to any libraries nor re-arming.
187198

188199
```
200+
# KPN, example showing sys.cfg already be present
189201
./fs_xgspon_mod.py overrideslot GPON227000fe 1
190202
[+] Telnet connection established, login successful
191203
[!] /mnt/rwdir/sys.cfg already exists - continuing will remove any previous changes
@@ -196,11 +208,11 @@ reboot
196208

197209
You can remove the override by deleting the `/mnt/rwdir/sys.cfg` file through the telnet shell.
198210

199-
If you are uncertain of the slot number to use, see the 'Finding right ETH10GESLOT' section below.
211+
If you are uncertain of the slot number to use, see the [Finding Right ETH10GESLOT](#finding-right-eth10geslot) section below.
200212

201213
## Troubleshooting / Advanced
202214

203-
### Finding right ETH10GESLOT
215+
### Finding Right ETH10GESLOT
204216

205217
If you appear to be in a real O5 state (VLAN rules populated by the OLT) but traffic isn't passing, check the bridgepack configuration to see how the OLT is configuring the bridge. If the wrong slot is in use, you'll see an error in the MEC log (`/system/log/show mec`) along the lines of the following:
206218

fs_xgspon_mod.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import socket
99
import hmac
1010
import time
11+
import sys
1112

1213
class ISP:
1314
REQUIRED_ITEMS = set()
@@ -561,7 +562,8 @@ def install(args):
561562
print("[!] To make the ONU work on this ISP's network, just an ETH UNI slot override is needed")
562563
print("[!] Performing a slot override does not require any dangerous payloads to be applied")
563564
print("[!] However, you can also choose to go ahead and install the full modification")
564-
print("[!] When in doubt, you should probably try the less invasive overrideslot command")
565+
print("[!] When in doubt, you should probably try the less invasive overrideslot command:")
566+
print(f" {sys.argv[0]} overrideslot {args.fs_onu_serial} {settings.eth_slot or 1}")
565567

566568
answer = input("Proceed with installation anyways? (y)es or (n)o").lower()
567569

@@ -714,8 +716,8 @@ def overrideslot(args):
714716
if "sys.cfg" in exists_check:
715717
print("[!] /mnt/rwdir/sys.cfg already exists - continuing will remove any previous changes")
716718

717-
answer = input("Continue? (y)es or (n)o: ")
718-
if not "y" in answer:
719+
answer = input("Continue? (y)es or (n)o: ").lower()
720+
if answer not in ("y", "yes"):
719721
return
720722

721723
tn.sh_cmd(f"echo ETH10GESLOT={args.eth_slot} > /mnt/rwdir/sys.cfg")
@@ -730,7 +732,6 @@ def overrideslot(args):
730732

731733
if __name__=="__main__":
732734
import argparse
733-
import sys
734735

735736
def parse_serial(serial):
736737
serial = serial.upper()
@@ -784,7 +785,7 @@ def parse_vlan_filter(vf):
784785
return rules
785786

786787
p = argparse.ArgumentParser()
787-
s = p.add_subparsers()
788+
s = p.add_subparsers(required=True)
788789

789790
parse_genpw = s.add_parser("genpw")
790791
parse_genpw.add_argument("--onu_ip", default="192.168.100.1")

0 commit comments

Comments
 (0)