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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The Sagemcom F@st series is used by multiple cable companies, where some cable c
| Sagemcom F@st 3865b | Proximus (b-box3) | md5 | |
| Sagemcom F@st 3890V3 | Delta / Zeelandnet | sha512 | |
| Sagemcom F@st 3890V3 | DNA (DNA Mesh Wifi F-3890) | sha512 | username: admin |
| Sagemcom F@st 3896 | Ziggo<sup>*</sup> | sha512 | username: admin |
| Sagemcom F@st 3896 | Ziggo<sup>1</sup> | sha512 | username: admin |
| Sagemcom F@st 4360Air | KPN | md5 | |
| Sagemcom F@st 4353 | Belong Gateway | md5 | username: admin, password: "" |
| Sagemcom F@st 5250 | Bell (Home Hub 2000) | md5 | username: guest, password: "" |
Expand All @@ -39,9 +39,12 @@ The Sagemcom F@st series is used by multiple cable companies, where some cable c
| Sagemcom F@st 5690 | Bell (Giga Hub) | sha512 | username: admin, password: "" |
| Sagemcom F@st 5655V2 | MásMóvil | md5 | |
| Sagemcom F@st 5657IL | | md5 | |
| Sagemcom F@st 5360 | Sunrise Internet Box<sup>2</sup> | md5 | username: admin |
| Speedport Pro | Telekom | md5 | username: admin |

<sup>*</sup> The firmware provided on the Sagemcom F@st 3896 router from Ziggo does not support the endpoint used in this library. [sagemcom-f3896lg-zg-api](https://github.com/mgyucht/sagemcom-f3896lg-zg-api) provides an API client suitable for Ziggo's firmware.
<sup>1</sup> The firmware provided on the Sagemcom F@st 3896 router from Ziggo does not support the endpoint used in this library. [sagemcom-f3896lg-zg-api](https://github.com/mgyucht/sagemcom-f3896lg-zg-api) provides an API client suitable for Ziggo's firmware.

<sup>2</sup> If you run into `SSLV3_ALERT_HANDSHAKE_FAILURE` errors, see [here](docs/ssl-error.md) for a workaround.

> Contributions welcome. If you router model is supported by this package, but not in the list above, please create [an issue](https://github.com/iMicknl/python-sagemcom-api/issues/new) or pull request.

Expand Down
22 changes: 22 additions & 0 deletions docs/ssl-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Troubleshooting `SSLV3_ALERT_HANDSHAKE_FAILURE`

A `SSLV3_ALERT_HANDSHAKE_FAILURE` error when connecting to the router indicates that there is a mismatch with the cipher being used in the SSL connection (see [here](https://stackoverflow.com/a/73254780/487356)).

Running `openssl s_client -connect <router-ip>:<ssl-port>` on the router shows what cipher can be used. In the case of a "Sunrise Internet Box" it was `AES256-GCM-SHA384`.

The following code snippet shows how to set up a `SagemcomClient` configured to use that specific cipher (and not validating the router's certificate):

```
async def main() -> None:
sslcontext = ssl._create_unverified_context()
sslcontext.set_ciphers("AES256-GCM-SHA384")

session = ClientSession(
headers={"User-Agent": f"{DEFAULT_USER_AGENT}"},
timeout=ClientTimeout(DEFAULT_TIMEOUT),
connector=TCPConnector(
ssl_context=sslcontext
)
)
async with SagemcomClient(HOST, USERNAME, PASSWORD, ENCRYPTION_METHOD, session=session) as client:
```