# sandwych-smartconfig **Repository Path**: oldrev/sandwych-smartconfig ## Basic Information - **Project Name**: sandwych-smartconfig - **Description**: 纯 C# 实现的可用于 Xamarin 手机 App 的 WiFi Airkiss/ESPTouch 协议配网库。Gitee 只是镜像,以 GitHub 为准 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: https://github.com/oldrev/sandwych-smartconfig - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 2 - **Created**: 2020-04-08 - **Last Updated**: 2023-12-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![Build status](https://ci.appveyor.com/api/projects/status/y4vy6qr9k0xj8e7y/branch/master?svg=true)](https://ci.appveyor.com/project/oldrev/sandwych-smartconfig/branch/master) [![NuGet](https://img.shields.io/nuget/v/Sandwych.SmartConfig.svg)](https://www.nuget.org/packages/Sandwych.SmartConfig) # Sandwych.SmartConfig Sandwych.SmartConfig is a pure C# implementation of various WiFi SmartConfig protocols that build from scratch. TD;LR: If you working on a Xamarin mobile app to deal with WiFi-capability IoT devices, you may need this library. English | [简体中文](README.zh_cn.md) ## Getting Started ## Features * A .NET Standard class library, works on both Xamarin and desktop. * No third-party library referenced. * Supported protocols: WeChat's AirKiss and Espressif's ESPTouch. * Clean architecture, easy to learn and add your own protocol. * IoC container friendly. ## Getting Started ### Prerequisites * Microsoft Visual Studio 2019 * DocFX for API documents generation (Optional) ### Supported Platforms * .NET Standard 2.0+ ### Installation Install Sandwych.SmartConfig to your project by [NuGet](https://www.nuget.org/packages/Sandwych.SmartConfig) then you're good to go. ## Examples ### Usage ```csharp var provider = new EspSmartConfigProvider(); var ctx = provider.CreateContext(); ctx.DeviceDiscoveredEvent += (s, e) => { Console.WriteLine("Found device: IP={0} MAC={1}", e.Device.IPAddress, e.Device.MacAddress); }; var scArgs = new SmartConfigArguments() { Ssid = "YourWiFiSSID", Bssid = PhysicalAddress.Parse("10-10-10-10-10-10"), Password = "YourWiFiPassword", LocalAddress = IPAddress.Parse("192.168.1.10") }; // Do the SmartConfig job using (var job = new SmartConfigJob(TimeSpan.FromSeconds(20))) // Set the timeout to 20 seconds { await job.ExecuteAsync(ctx, scArgs); } ``` ### The Demo Android App APK Download: WIP ## Donation If this project is useful to you, you can buy me a beer: [![Support via PayPal.me](https://github.com/oldrev/sandwych-smartconfig/blob/master/assets/paypal_button.svg)](https://www.paypal.me/oldrev) ## Contributiors * **Li "oldrev" Wei** - *Init work and the main maintainer* - [oldrev](https://github.com/oldrev) ## License Licensed under the MIT License. Copyright © Sandwych.SmartConfig Contributors. See [LICENSE.md](LICENSE.md) for details. ## Credits * Espressif EsptouchForAndroid: https://github.com/EspressifApp/EsptouchForAndroid