You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python library for AT&T Fiber Gateways (BGW210, BGW320, CGW452).
Installation
pip install att-gateway-api
Or install from source:
pip install -e .
Usage
As a library
importasynciofromatt_gatewayimportATTGatewayClientasyncdefmain():
asyncwithATTGatewayClient(
host="192.168.1.254", # or your gateway IPpassword="your-device-access-code",
) asclient:
# Get broadband statisticsstats=awaitclient.get_broadband_stats()
print(f"Downstream: {stats.downstream.rate_mbps} Mbps")
print(f"Upstream: {stats.upstream.rate_mbps} Mbps")
print(f"Uptime: {stats.uptime_str}")
# Get device infoinfo=awaitclient.get_device_info()
print(f"Model: {info.model}")
print(f"Firmware: {info.firmware_version}")
# Get NAT tablenat=awaitclient.get_nat_table()
print(f"NAT entries: {nat.count} / {nat.max_entries}")
asyncio.run(main())
CLI
# Test connection
att-gateway --host 192.168.1.254 test# Get broadband stats
att-gateway --host 192.168.1.254 stats
# Get device info
att-gateway --host 192.168.1.254 info
# Get NAT table
att-gateway --host 192.168.1.254 nat
# Get raw HTML from any endpoint
att-gateway --host 192.168.1.254 raw broadband
att-gateway --host 192.168.1.254 raw /cgi-bin/custom.ha
Supported Gateways
Model
Type
Tested
Notes
BGW210-700
Fiber
Expected to work
Same firmware base
BGW320-500
Fiber
Expected to work
Same firmware base
BGW320-505
Fiber
Expected to work
Nokia hardware, Arris firmware
CGW452-400
5G Fiber
✅ Tested
Includes cellular/mobility status
All gateways use the same Arris-based web interface. The only model-specific feature is get_mobility_status() which is only available on 5G gateways (CGW452).
Authentication
The gateway uses nonce-based MD5 authentication. The password is the Device Access Code found on the back of your gateway.
Many status endpoints (broadband, fiber, devices) work without authentication. Configuration endpoints require the device access code.