Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions .vitepress/theme/components/LantiqEeprom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
</tbody>
</table>
</div>
<p v-if="eeprom_decode">
<button type="button" class="btn btn-primary" @click="copyMarkdown">{{ copied ? 'Copied!' : 'Copy as Markdown' }}</button>
</p>
<div class="info custom-block" v-if="revision">
<p class="custom-block-title">Info</p>
<p>For more information, see the {{ revision }} specification.</p>
Expand Down Expand Up @@ -79,6 +82,9 @@
</tbody>
</table>
</div>
<p v-if="eeprom_decode">
<button type="button" class="btn btn-primary" @click="copyMarkdown">{{ copied ? 'Copied!' : 'Copy as Markdown' }}</button>
</p>
<div class="info custom-block" v-if="revision">
<p class="custom-block-title">Info</p>
<p>For more information, see the {{ revision }} specification.</p>
Expand Down Expand Up @@ -857,7 +863,8 @@ export default {
}
]
},
eeprom_switch: "A0"
eeprom_switch: "A0",
copied: false
}
},
props: ['type'],
Expand Down Expand Up @@ -1099,6 +1106,35 @@ export default {
}
},
methods: {
eepromMarkdown: function () {
const cell = (str) => (str ?? '').toString().replaceAll('**', '').replaceAll('|', '\\|').replace(/\s+/g, ' ').trim();
const rows = this.eeprom_json.map(it => {
const hex = it.value ? `\`${this.chunk(it.value)?.map(b => `0x${b}`)?.join(' ')}\`` : '';
return `| ${cell(it.address)} | ${cell(it.size)} | ${cell(it.name)} | ${hex} | ${cell(it.human)} | ${cell(it.description)} |`;
});
return [
`EEPROM ${this.eeprom_switch} (${this.revision})`,
'',
'| address | size | name | hex value | decoded value | description |',
'| ------- | ---- | ---- | --------- | ------------- | ----------- |',
...rows
].join('\n');
},
copyMarkdown: async function () {
const markdown = this.eepromMarkdown();
try {
await navigator.clipboard.writeText(markdown);
} catch (e) {
const textarea = document.createElement('textarea');
textarea.value = markdown;
document.body.appendChild(textarea);
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
}
this.copied = true;
setTimeout(() => this.copied = false, 2000);
},
getPart: function (startIndex, endIndex) {
return this.eeprom_decode?.slice(startIndex * 2, (endIndex + 1) * 2)?.join('');
},
Expand Down Expand Up @@ -1423,4 +1459,4 @@ table td {
word-wrap: break-word;
word-break: break-word;
}
</style>
</style>
4 changes: 4 additions & 0 deletions router/sagemcom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Sagemcom
has_children: true
---
78 changes: 78 additions & 0 deletions router/sagemcom_fast_5655v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Sagemcom F@st 5655v2
has_children: false
parent: Sagemcom
---

# Hardware Specifications

| | |
| ------------ | ------------------------------------- |
| Vendor/Brand | Sagemcom |
| Model | F@st 5655v2 |
| ODM | ✅ |
| CPU | |
| CPU Clock | |
| Chipset | |
| Flash | |
| RAM | |
| System | |
| Optics | GPON |
| IP address | 192.168.1.1 |
| Web Gui | ✅ user `1234`, password `1234` |
| SSH | ✅ user `1234` (see [Enable SSH and Telnet](#enable-ssh-and-telnet)), `su` password `root` |
| Telnet | ✅ (see [Enable SSH and Telnet](#enable-ssh-and-telnet)) |
| Serial | |
| Form Factor | CPE with ONT |

The F@st 5655v2 is the GPON modem of the Spanish ISPs MásMóvil, Pepephone and Yoigo.

# Usage

## Enable SSH and Telnet

1. Log in to the web interface (`http://192.168.1.1`, user `1234`, password `1234`).
2. Open the developer console of the browser and run the commands one by one: they enable SSH (port 22) and Telnet (port 23) for the user with `uid` 3.

```js
$.xmo.getValuesTree("Device");
$.xmo.getValuesTree("Device/UserAccounts/Users");
$.xmo.getValuesTree("Device/UserAccounts/Users/User[@uid='3']");
$.xmo.getValuesTree("Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses");
$.xmo.getValuesTree("Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='3']/Enabled");
$.xmo.getValuesTree("Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='4']/Enabled");
$.xmo.setValuesTree("ACCESS_ENABLE_ALL", "Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='3']/LANRestriction");
$.xmo.setValuesTree("ACCESS_ENABLE_ALL", "Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='4']/LANRestriction");
$.xmo.setValuesTree(22, "Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='3']/Port");
$.xmo.setValuesTree(23, "Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='4']/Port");
$.xmo.setValuesTree(true, "Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='3']/Enabled");
$.xmo.setValuesTree(true, "Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='4']/Enabled");
```

3. Reboot the modem from the maintenance page.
4. Connect with `ssh 1234@192.168.1.1` and run `su` (password `root`).

::: info Note
If a command returns `null` or the SSH connection times out, retry with the fiber disconnected.
:::

# GPON/OMCI settings

## Getting ONU GPON PLOAM password

```sh
cat /opt/filesystem2/data/optical_conf.txt
```

Alternatively, copy the configuration on a USB stick and search the `RegId` tag (the PLOAM password, in hex) in `cfg.xml`:

```sh
cp /tmp/cfg.xml /mnt/sda1
```

The mount point can also be `/mnt/sda`. The same file also contains the SIP credentials of the VoIP line. The PLOAM password can be converted from hex to ASCII with the [ASCII/HEX converter](/ascii-hex).

# Miscellaneous Links

- [Naseros: GPON and SIP key of the Sagemcom F@st 5655v2](https://naseros.com/2020/07/14/como-extraer-clave-gpon-y-sip-del-sagemcom-fast-5655v2-de-masmovil-pepephone-y-yoigo/)
- [Sagemcom F@st 5684S](/router/sagemcom_fast_5684s)
74 changes: 74 additions & 0 deletions router/sagemcom_fast_5684s.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: Sagemcom F@st 5684S
has_children: false
alias: TIM Sagemcom 10 Gb
parent: Sagemcom
---

# Hardware Specifications

| | |
| ------------ | ----------------------------------------------------------------------- |
| Vendor/Brand | Sagemcom |
| Model | F@st 5684S (F5684S_v1, F5684S_v2) |
| ODM | ✅ |
| CPU | 4x ARMv8 (Broadcom) |
| CPU Clock | |
| Chipset | Broadcom |
| Flash | |
| RAM | |
| System | Linux 4.1.52 (Broadcom SDK 5.02L.07) |
| Ethernet | 4x 1GbE LAN, 1x 10GbE (LAN or WAN for an external ONT) |
| SFP | 1x SFP+ (XGS-PON stick Sagemcom CS50001) |
| Wi-Fi | Wi-Fi 6 (802.11ax) 2.4 GHz and 5 GHz, 4x4 |
| USB | 2x USB (1x USB 3.0) |
| Phone | 2x FXS (Phone1, Phone2) |
| IP address | |
| Web Gui | ✅ user `admin` |
| SSH | ✅ (see [Enable SSH](#enable-ssh)) |
| Telnet | |
| Serial | |
| Form Factor | CPE with SFP |

The F@st 5684S is the modem of the TIM FTTH offers up to 10 Gbps (TIM Sagemcom 10 Gb). The XGS-PON line is terminated by the Sagemcom CS50001 SFP+ stick installed in the SFP+ cage of the modem; on the 2.5 Gbps lines TIM can install an external ONT connected to the 10GbE port.

::: info Note
The CS50001 stick does not bring up the connection with the OLT by itself when used on other hardware (e.g. MikroTik): it is recognized and shows its parameters, but it needs the configuration of the modem.
:::

## List of software versions

- AGGHX_1.2.0 (GUI 5.92.3)
- AGGHX_1.3.3

# Usage

## Enable SSH

The web interface of the Sagemcom F@st modems exposes the `$.xmo` JavaScript object, which reads and writes the internal data model. From the browser developer console of the logged in web interface, the remote accesses of the internal user can be enabled from the LAN:

```js
var x = $.xmo;
x.init();
x.login("internal", "");
$.xmo.setValuesTree("ACCESS_ENABLE_ALL","Device/UserAccounts/Users/User[@uid='3']/RemoteAccesses/RemoteAccess[@uid='1']/LANRestriction");
```

The same data model is used by the other F@st modems, see the [F@st 5655v2](/router/sagemcom_fast_5655v2) for the full procedure.

## Updating the firmware

To force the update: back up the settings and keep the reset button pressed for about 30 seconds.

# Known Bugs

- The DNS servers cannot be changed (the manual settings go back to automatic).
- The port forwarding rules are applied only after a reboot.
- Random Wi-Fi shutdown (disabling Band Steering reduces it) and full freezes that require a power cycle.

# Miscellaneous Links

- [TIM - Sagemcom 10 Gb guides](https://www.tim.it/assistenza/assistenza-tecnica/guide-manuali/sagemcom-10gb)
- [TIM - Sagemcom 10 Gb Quick Guide](https://www.tim.it/content/dam/flytoco-areapubblica-aemfe/tim_it/pdf/assistenza-tecnica/guide-manuali/tim-sagemcom-10gb/qg-sagemcom-10gb.pdf)
- [HWUpgrade forum](https://www.hwupgrade.it/forum/archive/index.php/t-2970213.html)
- [OpenWrt forum: OpenWrt for Sagemcom F@5684](https://forum.openwrt.org/t/openwrt-for-sagemcom-f-5684/143254)
98 changes: 98 additions & 0 deletions tools/omci-wireshark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: OMCI Wireshark and PCAP tools
has_children: false
description: Capture the OMCI messages of an ONT and analyze them with Wireshark
---

# OMCI Wireshark and PCAP tools

The OMCI (ONT Management and Control Interface, ITU-T G.984.4 / G.988) messages exchanged between the OLT and the ONT contain the whole provisioning of the line: managed entities, VLAN rules, T-CONTs, GEM ports and the values the OLT expects from the ONT. Capturing them is the best way to understand why an ONT does not work, or to clone the configuration of the ISP ONT.

The workflow is:

1. enable the OMCI log on the ONT and copy the log to the PC;
2. convert the log to a `.pcap` file with [omcilog2pcap](https://github.com/hack-gpon/omcilog2pcap);
3. open the `.pcap` file in Wireshark with the [OMCI Wireshark dissector](https://github.com/hack-gpon/omci-wireshark-dissector);
4. optionally, analyze large captures with [omcipcap](#omcipcap).

## omcilog2pcap

[omcilog2pcap](https://github.com/hack-gpon/omcilog2pcap) converts the OMCI logs of the ONTs into `.pcap` files. The format of the log is detected automatically:

| Log | Detected by |
| ------------------------------------------------------------------------------------- | -------------------------- |
| Lantiq based chips (e.g. [Huawei MA5671A](/ont-huawei-ma5671a)), `omcid` log | `[omcid]` lines |
| Sagemcom devices (e.g. the TIM [F@st 5684S](/router/sagemcom_fast_5684s)) | `:omci capture:` lines |
| Cortina Access devices: merge the `pkt_rx` and `pkt_tx` logs into a single file, the packets are re-ordered automatically | ` debug: ` lines |
| Huawei devices (e.g. [OptiXstar S800E](/xgs/ont-huawei-optixstar-s800e), B450) | `OLT->ONT` / `ONT->OLT` blocks |
| Realtek based chips (e.g. [Technicolor AFM0002TIM](/ont-technicolor-afm0002)): one OMCI message in hex per line | any other text log |

The default version is the .NET one (native AOT), in the [`C#` branch](https://github.com/hack-gpon/omcilog2pcap/tree/C%23). Download the executable for your OS from the [releases](https://github.com/hack-gpon/omcilog2pcap/releases), or build it from `src/` with the .NET SDK.

To convert a log, drag and drop it on the executable, or pass it as argument:

```sh
omcilog2pcap omci_log.txt
```

The `.pcap` file is written in the current directory with the same name as the log (`omci_log.pcap`). Each OMCI message is wrapped in a fake Ethernet frame with EtherType `0x88B5` (OLT MAC `08:87:01:70:17:01`, ONT MAC `08:87:88:00:00:00`), which is the EtherType the dissector is registered on.

::: warning
The [`js` branch](https://github.com/hack-gpon/omcilog2pcap/tree/js) contains an experimental JavaScript port (ALPHA) that has never been tested: use the `C#` version.
:::

### Getting the OMCI log on Realtek based sticks

On the Realtek (Luna SDK) based sticks the OMCI daemon can write a binary log to `/tmp/omcilog`:

```sh
/etc/scripts/flash set OMCI_DBGLVL 1
/etc/scripts/flash set OMCI_DBGLOGFILE 1
reboot
/bin/omcicli set logfile 1 ffffffff
```

Then copy the log to the PC, for example:

```sh
ssh admin@192.168.2.1 "cat /tmp/omcilog" > omcilog.log
```

To log the messages since the boot of the stick, add the last command at the end of `etc/runomci.sh` in a custom rootfs. See the [Technicolor AFM0002](/ont-technicolor-afm0002#enabling-ploam-logging) page for the details.

## OMCI Wireshark dissector

The [OMCI Wireshark dissector](https://github.com/hack-gpon/omci-wireshark-dissector) is a Lua plugin that decodes the OMCI messages in Wireshark. It requires Wireshark 1.4.3 or newer with Lua 5.1 or newer (check it in *Help > About*).

To install it, copy both `omci.lua` and `BinDecHex.lua` in the Wireshark personal plugins folder:

| OS | Folder |
| ------------- | ----------------------------------------- |
| Linux/\*nix | `$HOME/.config/wireshark/plugins` |
| Windows | `%APPDATA%\Wireshark\plugins` |
| macOS | `$HOME/.config/wireshark/plugins` |

Restart Wireshark and open `omci-example.pcap` from the repository to check that the dissector works. Use the `omci` display filter to show only the OMCI messages.

The dissector is a fork of [0liv1er/omci-wireshark-dissector](https://github.com/0liv1er/omci-wireshark-dissector), originally published on Google Code.

## omcipcap

[omcipcap](https://github.com/RainbowCloudLabs/omcipcap) is an open-source GPON/XGS-PON OMCI semantic analysis framework for `.pcap` and `.pcapng` files. It complements packet-level inspection tools such as Wireshark by reconstructing protocol-level engineering information from OMCI traffic:

- Detect OMCI provisioning failures and error responses
- Build and compare MIB snapshots
- Analyze Extended VLAN Tagging Operation Configuration Data (ME 171)
- Reconstruct T-CONT, GEM Port and Priority Queue relationships
- Generate OMCI topology information
- Produce structured JSON and Markdown output for automation and AI-assisted analysis
- Support vendor-specific Managed Entity definitions and semantic extensions

It is available on [GitHub](https://github.com/RainbowCloudLabs/omcipcap) and [PyPI](https://pypi.org/project/omcipcap/).

# Miscellaneous Links

- [omcilog2pcap](https://github.com/hack-gpon/omcilog2pcap)
- [OMCI Wireshark dissector](https://github.com/hack-gpon/omci-wireshark-dissector)
- [omcipcap](https://github.com/RainbowCloudLabs/omcipcap)
- [GPON OMCI VLAN parser](/gpon-omci-vlan-parser)
23 changes: 2 additions & 21 deletions tools/omcipcap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@
title: OMCI PCAP Analyzer
has_children: false
description: Tool for semantic analysis of GPON/XGS-PON OMCI PCAP files
redirect_to: /omci-wireshark#omcipcap
nav_exclude: true
---

# omcipcap

[omcipcap](https://github.com/RainbowCloudLabs/omcipcap) is an open-source GPON/XGS-PON OMCI semantic analysis framework for `.pcap` and `.pcapng` files.

It complements packet-level inspection tools such as Wireshark by reconstructing protocol-level engineering information from OMCI traffic.

Main features include:

- Detect OMCI provisioning failures and error responses
- Build and compare MIB snapshots
- Analyze Extended VLAN Tagging Operation Configuration Data (ME 171)
- Reconstruct T-CONT, GEM Port and Priority Queue relationships
- Generate OMCI topology information
- Produce structured JSON and Markdown output for automation and AI-assisted analysis
- Support vendor-specific Managed Entity definitions and semantic extensions

Project:

- [GitHub](https://github.com/RainbowCloudLabs/omcipcap)
- [PyPI](https://pypi.org/project/omcipcap/)
Loading