Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oldrev/sandwych-smartconfig
Pure C# Implementation of Various WiFi SmartConfig Protocols: AirKiss and ESPTouch
https://github.com/oldrev/sandwych-smartconfig
airkiss csharp dotnet esp32 esp8266 espressif smartconfig wechat xamarin
Last synced: 2 months ago
JSON representation
Pure C# Implementation of Various WiFi SmartConfig Protocols: AirKiss and ESPTouch
- Host: GitHub
- URL: https://github.com/oldrev/sandwych-smartconfig
- Owner: oldrev
- License: mit
- Created: 2020-04-07T06:15:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T18:29:39.000Z (about 2 years ago)
- Last Synced: 2024-10-12T03:27:32.624Z (4 months ago)
- Topics: airkiss, csharp, dotnet, esp32, esp8266, espressif, smartconfig, wechat, xamarin
- Language: C#
- Homepage:
- Size: 247 KB
- Stars: 22
- Watchers: 4
- Forks: 10
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
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",// Your local IP address of WiFi network. It's important for using multiple network interfaces
// See CliDemoApp for details.
LocalAddress = IPAddress.Parse("192.168.1.10")
};// Do the SmartConfig job
using (var job = new SmartConfigJob(TimeSpan.FromSeconds(100))) // Set the timeout to 100 seconds
{
await job.ExecuteAsync(ctx, scArgs);
}```
Or much simpler if you perfer the callback style:
```csharp
await SmartConfigStarter.StartAsync(args,
onDeviceDiscovered: (s, e) => Console.WriteLine("Found device: IP={0} MAC={1}", e.Device.IPAddress, e.Device.MacAddress));```
### 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