Coder Social home page Coder Social logo

fritz's Introduction

Nuget version Nuget downloads CI Actions Status

Fritz#

The FRITZ!Box is a popular device that provides internet access, telephony, and home networking services. It supports a protocol called TR064, which allows remote management and configuration of the device. However, the official TR064 implementation is proprietary and closed-source, which limits the users' freedom and control over their own devices. That's why we have developed a free and open-source TR064 implementation for the FRITZ!Box, which aims to provide a more transparent, secure, and customizable alternative. Our implementation is based on the TR064 specification and compatible with the existing FRITZ!Box features. With our free and open-source TR064 implementation, you can take full advantage of your FRITZ!Box and enjoy a better internet experience.

Installing

To use the package in your project, you need to edit your csproj file and insert the following line, where x.x.x is the latest version number (you can check it at the beginning of this file):

<PackageReference Include="Fritz" Version="x.x.x" />

You can also install via the Package Manager Console in Visual Studio with the following command:

PM> Install-Package Fritz -Version 1.1.0

If you're using Visual Studio you can also install via the built in NuGet package manager.

Another option to install is using the .NET CLI tool. Just run this command in your terminal:

dotnet add package Fritz

Example

Write phonebook to csv file

To write a phonebook to a csv file, you need to follow these steps:

  1. Open Visual Studio
  2. Create a new Console App
  3. Add the Fritz NuGet package to your project.
PM> Install-Package Fritz -Version 1.1.0
  1. Add the following code to the main method:
namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var fritzBox = new FritzClient()
            {
                UserName = "{YOUR_USERNAME}",
                Password = "{YOUR_PASSWORD}"
            };
                    
            // Write csv file to the application folder
            fritzBox.WritePhonebookCsv(name: "Test Phonebook", folder: AppDomain.CurrentDomain.BaseDirectory, separator: ";");
        }
    }
}
  1. Run the program

Testing

You can find the project Fritz.Test with many unit tests in this repository. These tests are useful for learning how to write your own code using Fritz#. You can see how they are structured, what they test, and how they report the results.

[TestMethod]
public void TestTamGetInfo()
{
    Tam service = new Tam(_fb.Url);
    service.SoapHttpClientProtocol.Credentials = new NetworkCredential(userName: _fb.UserName, password: _fb.Password);

    ushort index = 0;
    bool enable;
    string name;
    bool tamRunning;
    ushort stick;
    ushort status;

    service.GetInfo(index, out enable, out name, out tamRunning, out stick, out status);
}

License

Fritz# is licensed under the MIT license.

External links

fritz's People

Contributors

chstorb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

techosrx

fritz's Issues

Wanpppconn1 not working

Hi,
I got a SocketException (Unable to connect because the destination computer refused to connection) wenn I try this:

Dim service As New Wanpppconn1("https://fritz.box")
service.SoapHttpClientProtocol.Credentials = New NetworkCredential("User", "Password")
service.GetExternalIPAddress(ip)

What could be wrong???

{"Fehler bei der Anforderung mit HTTP-Status 401: Unauthorized."}

Hallo,

leider bekomme ich bei der Nutzung des Beispielcodes (CallList) den Fehler:
{"Fehler bei der Anforderung mit HTTP-Status 401: Unauthorized."}

Bei der Zeile:

ushort onTelNumberOfEntries;
service.GetNumberOfEntries(out onTelNumberOfEntries);

Es ist eine Fritzbox 7390 mit OS 6.86

Gruß

incorrect type for GetPhonebookEntryUID

When running the Test: TestPhonebook() with my FritzBox 7590 using the current firmware, the test crashes inside the following function GetPhonebookEntryUID while deserealizing the XML PhoneBookEntry.
In contacts.cs the variable uniqueidField is defined as a byte.

In my case the value of the uniqueid was 41418, so trying to store that value in a byte caused the error. After changing the type to uint everything worked as expected.
The current AVM document (https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/x_contactSCPD.pdf) Page 18 shows that the variable "PhonebookEntryUniqueID" should be defined as ui4.

Anwering Machine / TAM

Hi,

Thanks for your work.

Is there any way to already retrieve the answering machine/TAM? I would like to check whether a new call was recorded in the last x hours.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.