Python library for AT&T Fiber Gateways (BGW210, BGW320, CGW452).
pip install att-gateway-apiOr install from source:
pip install -e .import asyncio
from att_gateway import ATTGatewayClient
async def main():
async with ATTGatewayClient(
host="192.168.1.254", # or your gateway IP
password="your-device-access-code",
) as client:
# Get broadband statistics
stats = await client.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 info
info = await client.get_device_info()
print(f"Model: {info.model}")
print(f"Firmware: {info.firmware_version}")
# Get NAT table
nat = await client.get_nat_table()
print(f"NAT entries: {nat.count} / {nat.max_entries}")
asyncio.run(main())# 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| 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).
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.
| Method | Description |
|---|---|
get_broadband_stats() |
WAN connection, IP addresses, traffic stats |
get_fiber_stats() |
SFP module, optical power levels |
get_device_info() |
Model, serial, firmware, MAC address |
get_lan_status() |
Ethernet ports, DHCP status |
get_device_list() |
Connected devices (wired + wireless) |
get_firewall_log() |
Blocked traffic entries |
get_firewall_status() |
Firewall settings |
get_voip_status() |
Voice line status |
get_home_status() |
Quick overview |
| Method | Description |
|---|---|
get_nat_table() |
Active NAT connections |
get_mobility_status() |
5G/LTE signal, cell info (CGW452 only) |
get_speed_test_history() |
Past speed test results |
| Method | Description |
|---|---|
get_wifi_config() |
SSID, security, channels |
get_dhcp_config() |
DHCP server settings |
get_ip_allocation() |
DHCP reservations |
get_ip_passthrough_config() |
IP passthrough settings |
get_port_forwarding() |
Port forwarding rules |
get_mac_filter_config() |
MAC filtering |
get_ethernet_lan_config() |
Port speed/duplex |
get_ipv6_lan_config() |
IPv6 settings |
get_broadband_config() |
WAN MTU, VLAN |
get_firewall_advanced() |
DoS protection |
get_syslog_config() |
Remote logging |
get_event_notifications() |
Email alerts |
get_remote_access() |
Remote management |
| Method | Description |
|---|---|
get_all_data() |
Fetch all status data in parallel |
get_all_config() |
Fetch all config data in parallel |
validate_connection() |
Test connectivity and auth |
| Method | Description |
|---|---|
ping(target) |
Ping from gateway |
traceroute(target) |
Traceroute from gateway |
nslookup(hostname) |
DNS lookup from gateway |
run_diagnostics() |
Full network diagnostics |
run_speed_test() |
Run speed test (impacts network) |
| Method | Description |
|---|---|
restart_device() |
Reboot gateway |
reset_connection() |
Reset WAN connection |
reset_ip() |
Release/renew DHCP |
MIT