Skip to content

Commit e7296e6

Browse files
committed
install: remove feature to change to overrideslot to avoid bricking
Fixes #6
1 parent d519fd4 commit e7296e6

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# FS.com XGS-ONU-25-20NI AT&T Modification Utility
2-
This utility makes the necessary changes to the FS.com XGS-PON ONU to allow it to operate on AT&T (USA), Orange (FR), and other XGS-PON fiber offerings. It attempts to do so as safely as possible, reverting automatically to a stock state if it is ever power cycled twice in quick succession.
3-
4-
This particular FS.com device is actually a CIG XG-99S which is available under a variety of different brands. There is an entire family of devices running very similar firmwares that can likely also be modified in roughly the same way, though modifications to this utility would be required to support them. Of particular interest are the CIG XG-99M devices (best known as the FOX-222) which can be found for $30-$50 online as of writing and which I plan to look at in the near future.
1+
# FS.com XGS-ONU-25-20NI / CIG XG-99S Modification Utility
2+
This utility makes the necessary changes to CIG XG-99S devices to allow them to operate on AT&T (USA), Orange (FR), KPN (NL), Telus (CA), Frontier (USA) and other XGS-PON fiber offerings. It attempts to do so as safely as possible, reverting automatically to a stock state if it is ever power cycled twice in quick succession.
53

64
While this modification attempts to be as safe _as possible_ it's much less safe than running an unmodified device. Although the device has two firmware slots they share the userdata partition that gets mounted to `/mnt/rwdir/`. During boot all CIG firmwares check for `/mnt/rwdir/setup.sh` and run it if it exists. This is done before the PON stack starts, so if anything goes wrong *it will never come online* and you will need UART access and micro-soldering skills to recover the device. For this reason, the modification disarms itself as the first action it takes during every boot -- that is the _only_ safety mechanism available.
75

@@ -45,6 +43,8 @@ By convention the documentation below uses `GPON227000fe` to refer to the serial
4543

4644
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:
4745

46+
NOTE: Certain ISPs can skip full installation and use only the [`overrideslot`](#override-eth-uni-slot) command.
47+
4848
```
4949
# ATT
5050
./fs_xgspon_mod.py install GPON227000fe att HUMA12ab34cd
@@ -55,9 +55,7 @@ Ensure that you're sitting adjacent to the stick on the network and that you hav
5555
# Telus
5656
./fs_xgspon_mod.py install GPON227000fe telus ARCB12ab34cd
5757
58-
# KPN, just changing the ethernet uni slot from 10 to 1 and keeping the rest as-is
59-
# you can register the serial number of the module through the self-service tool of your provider
60-
./fs_xgspon_mod.py install GPON227000fe kpn
58+
# KPN should not use this command, but overrideslot instead
6159
6260
# Any arbitrary ISP as long as you know the equipment id/hwver/swver and necessary ethernet uni slot
6361
./fs_xgspon_mod.py install GPON227000fe manual ALCL12ab34cd --hwver SOMETHING --swver ELSE --eqvid EQUIPMENT --eth_slot 10
@@ -228,6 +226,8 @@ If you run `/s/m/show 506` from telnet and see 17 or fewer rules, you almost cer
228226
- [YuukiJapanTech](https://github.com/YuukiJapanTech) - Assembling the spectacular resources at https://github.com/YuukiJapanTech/CA8271x/
229227
- SipWannabe - Testing
230228
- Mastah - Testing/Debugging Orange connectivity issues
229+
- [Arpie](https://github.com/arpiecodes) - KPN support and `overrideslot`
230+
- [up-n-atom](https://github.com/up-n-atom) - Telus support
231231

232232
## References
233233
- https://github.com/YuukiJapanTech/CA8271x

fs_xgspon_mod.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,6 @@ def __init__(self, args):
5656

5757
self.settings = []
5858

59-
if self.PREFER_SLOT_OVERRIDE is True:
60-
print("[!] To make the ONU work on this ISP's network, just an ETH UNI slot override is needed")
61-
print("[!] Performing a slot override does not require any dangerous payloads to be applied")
62-
print("[!] However, you can also choose to go ahead and install the full modification")
63-
print("[!] When in doubt, you should probably try the less invasive (o)verride option first")
64-
65-
answer = input("Choose either (o)verride or (i)nstall: ")
66-
67-
if "o" in answer:
68-
return overrideslot(args)
69-
elif not "i" in answer:
70-
raise ValueError(f"invalid choice: expected either o or i")
71-
7259
if self.KEEP_SERIAL is True and args.isp_ont_serial is None:
7360
# we prefer use the original serial, as there's no need to change it
7461
self.serial = args.fs_onu_serial[4:].lower()
@@ -570,6 +557,18 @@ def install(args):
570557
print(f"[-] {e}")
571558
return
572559

560+
if settings.PREFER_SLOT_OVERRIDE is True:
561+
print("[!] To make the ONU work on this ISP's network, just an ETH UNI slot override is needed")
562+
print("[!] Performing a slot override does not require any dangerous payloads to be applied")
563+
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+
566+
answer = input("Proceed with installation anyways? (y)es or (n)o").lower()
567+
568+
if answer not in ("y", "yes"):
569+
print("[-] Aborting")
570+
return
571+
573572
print("[+] Generated payload configuration:")
574573

575574
for line in settings.config.split("\n"):
@@ -704,6 +703,8 @@ def rearm(args):
704703
print("[-] Telnet timeout reached... make sure it's reachable")
705704

706705
def overrideslot(args):
706+
assert isinstance(args.eth_slot, int)
707+
707708
try:
708709
with CigTelnet(args.onu_ip, args.fs_onu_serial) as tn:
709710
print("[+] Telnet connection established, login successful")
@@ -817,7 +818,7 @@ def parse_vlan_filter(vf):
817818
parse_install.add_argument("--eqvid", type=parse_length(20))
818819
parse_install.add_argument("--hwver", type=parse_length(14))
819820
parse_install.add_argument("--swver", type=parse_length(14))
820-
parse_install.add_argument("--eth_slot", type=int, choices=(1, 10), metavar="[1,10]")
821+
parse_install.add_argument("--eth_slot", type=int, choices=(1, 10))
821822
parse_install.add_argument("--vlan_rules", type=parse_vlan_filter)
822823
parse_install.set_defaults(func=install)
823824

@@ -834,7 +835,7 @@ def parse_vlan_filter(vf):
834835
parse_overrideslot = s.add_parser("overrideslot")
835836
parse_overrideslot.add_argument("--onu_ip", default="192.168.100.1")
836837
parse_overrideslot.add_argument("fs_onu_serial", type=parse_serial)
837-
parse_overrideslot.add_argument("eth_slot", type=int, choices=(1, 10), metavar="[1,10]")
838+
parse_overrideslot.add_argument("eth_slot", type=int, choices=(1, 10))
838839
parse_overrideslot.set_defaults(func=overrideslot)
839840

840841
args = p.parse_args()

0 commit comments

Comments
 (0)