A .NET library for FritzBox devices using WCF.
$ dotnet add package RS.Fritz.Manager.APIAllows FritzBox device detection, monitoring, configuring and network traffic capturing. The TR-064 implementation is using pure WCF Soap calls.
Available as a standalone Windows application (UI) and as a NuGet package (API).
For a list of implemented services check the Service implementation status
A Windows .NET WPF application for x64 and ARM64.

A NuGet package to manage FritzBox devices using pure WCF calls.
using System.Net;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using RS.Fritz.Manager.API;
// Register the Fritz services in the dependency container using AddFritzApi()
using IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices((_, services) => services.AddFritzApi())
.Build();
using IServiceScope serviceScope = host.Services.CreateScope();
// Search for routers and take the first one
IDeviceSearchService deviceSearchService = serviceScope.ServiceProvider.GetRequiredService<IDeviceSearchService>();
InternetGatewayDevice device = (await deviceSearchService.GetDevicesAsync()).First();
// Show the device model from UPnP data
Console.WriteLine($"Device model: {device.UPnPDescription.Value.Device.ModelDescription}");
// Initialize the device for TR-064, retrieves the security port and the users
await device.InitializeAsync();
// Provide the password for the last logged on user
string lastUsedUserName = device.Users.Single(q => q.LastUser).Name;
Console.WriteLine($"Enter password for {lastUsedUserName}:");
device.NetworkCredential = new NetworkCredential(lastUsedUserName, Console.ReadLine());
// TR-064 example; show the device uptime from the TR-064 DeviceInfo service
DeviceInfoGetInfoResponse deviceInfo = await device.DeviceInfoGetInfoAsync();
Console.WriteLine($"Device uptime: {TimeSpan.FromSeconds(deviceInfo.Uptime)}");
// Special services
// Retrieving the device users manually
IUsersService usersService = serviceScope.ServiceProvider.GetRequiredService<IUsersService>();
IEnumerable<User> users = await usersService.GetUsersAsync(device);
users.ToList().ForEach(q => Console.WriteLine($"User: {q.Name}"));
// Retrieving a list of device hosts in the network
IDeviceHostsService deviceHostsService = serviceScope.ServiceProvider.GetRequiredService<IDeviceHostsService>();
DeviceHostInfo deviceHostInfo = await deviceHostsService.GetDeviceHostsAsync(device);
deviceHostInfo.DeviceHosts.ToList().ForEach(q => Console.WriteLine($"Device host: {q.HostName}"));
// Retrieving a list of mesh hosts in the network
IDeviceMeshService deviceMeshService = serviceScope.ServiceProvider.GetRequiredService<IDeviceMeshService>();
DeviceMeshInfo deviceMeshInfo = await deviceMeshService.GetDeviceMeshAsync(device);
deviceMeshInfo.DeviceMesh.Nodes.ToList().ForEach(q => Console.WriteLine($"Mesh host: {q.DeviceName}"));
// Capture live network traffic from router to file
ICaptureControlService captureControlService = serviceScope.ServiceProvider.GetRequiredService<ICaptureControlService>();
Task.Run(() => StopCaptureAfter10SecondsAsync(device, captureControlService));
FileInfo fileInfo = await captureControlService.GetStartCaptureResponseAsync(device, "c:\\temp", "capturefile");
Console.WriteLine($"Network trace written to file: {fileInfo}");
await host.RunAsync();
static async Task StopCaptureAfter10SecondsAsync(InternetGatewayDevice device, ICaptureControlService captureControlService)
{
await Task.Delay(10000);
await captureControlService.GetStopCaptureResponseAsync(device);
}