Skip to content

Add HTML fallback for SB8200 with broken HNAP firmware#312

Merged
itsDNNS merged 3 commits intomainfrom
feat/surfboard-html-fallback
Apr 3, 2026
Merged

Add HTML fallback for SB8200 with broken HNAP firmware#312
itsDNNS merged 3 commits intomainfrom
feat/surfboard-html-fallback

Conversation

@itsDNNS
Copy link
Copy Markdown
Owner

@itsDNNS itsDNNS commented Apr 3, 2026

Summary

  • Extracts shared Arris HTML channel-table parsing into arris_html.py (reused by CM8200A and SB8200)
  • Refactors CM8200 driver to use the shared parser (no behavior change, 196 lines removed)
  • Adds automatic HTML fallback in the SURFboard driver: when HNAP login exhausts all retries (legacy TLS, fresh sessions, HTTP fallback), tries the browser HTML login path before giving up
  • HTML mode validates response contains channel data before activating
  • Existing HNAP users (S33/S34/newer SB8200) are unaffected

How it works

The SB8200 on old ISP firmware (e.g. AB01.02.053.05) has a broken HNAP implementation that resets the TCP connection during POST body reads. The browser login path (GET /cmconnectionstatus.html?login_{base64}) works fine because it uses GET requests instead of POST.

When the driver detects that HNAP is completely non-functional (3+ transport failures), it attempts a single HTML login. If the response contains valid channel tables, the driver switches to HTML mode for subsequent polls. If not, the original HNAP error is raised.

Test plan

  • 192 tests pass (37 arris_html + 49 cm8200 + 93 surfboard + 13 html_fallback)
  • Existing HNAP path unchanged (verified by dedicated tests)
  • HTML login validates response body before activating
  • User testing on SB8200 with old firmware (@advaitkunte)

Refs: #309

itsDNNS added 3 commits April 3, 2026 06:28
Move HTML table parsing logic into a reusable module for both
CM8200A and SB8200 HTML fallback.

Refs: #309
No behavior change. Inline HTML table parsing replaced by the shared
parse_arris_channel_tables() function from arris_html module.

Refs: #309
When HNAP login exhausts all retries (legacy TLS, fresh sessions,
HTTP fallback), the driver now tries the browser HTML login path
(GET /cmconnectionstatus.html?login_{base64}) before giving up.
If HTML works, the driver switches to HTML mode permanently for
subsequent polls.

This allows SB8200 units on old ISP firmware where HNAP POST body
reads consistently fail to still function via HTML table scraping.

Existing HNAP users (S33/S34/newer SB8200) are unaffected - the
HTML fallback only activates after HNAP is completely exhausted.

Refs: #309
@itsDNNS itsDNNS merged commit 258fb16 into main Apr 3, 2026
8 checks passed
@itsDNNS itsDNNS deleted the feat/surfboard-html-fallback branch April 3, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant