First Commit
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
/.vs
|
||||||
|
/Lora-Wsen-Configtool/bin
|
||||||
|
/Lora-Wsen-Configtool/obj
|
||||||
25
Lora-Wsen-Configtool.sln
Normal file
25
Lora-Wsen-Configtool.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.29409.12
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lora-Wsen-Configtool", "Lora-Wsen-Configtool\Lora-Wsen-Configtool.csproj", "{9FE5DD3A-0C6A-4BDE-BEED-9B4AFAF691CB}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{9FE5DD3A-0C6A-4BDE-BEED-9B4AFAF691CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9FE5DD3A-0C6A-4BDE-BEED-9B4AFAF691CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9FE5DD3A-0C6A-4BDE-BEED-9B4AFAF691CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9FE5DD3A-0C6A-4BDE-BEED-9B4AFAF691CB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {F86BFF15-6A3C-4C13-9C71-7BB45E3A085F}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
6
Lora-Wsen-Configtool/App.config
Normal file
6
Lora-Wsen-Configtool/App.config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
26
Lora-Wsen-Configtool/CommandButton.cs
Normal file
26
Lora-Wsen-Configtool/CommandButton.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Lora_Credential_Setter
|
||||||
|
{
|
||||||
|
public class CommandButton : System.Windows.Forms.Button
|
||||||
|
{
|
||||||
|
//public CommandButton()
|
||||||
|
//{
|
||||||
|
// InitializeComponent();
|
||||||
|
//}
|
||||||
|
|
||||||
|
public void SetVisbleState(object sender, bool state)
|
||||||
|
{
|
||||||
|
this.Enabled = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public char SerialCommand { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
455
Lora-Wsen-Configtool/Form1.Designer.cs
generated
Normal file
455
Lora-Wsen-Configtool/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,455 @@
|
|||||||
|
namespace Lora_Credential_Setter
|
||||||
|
{
|
||||||
|
partial class Form1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.SerialConsole = new System.Windows.Forms.TextBox();
|
||||||
|
this.OpenSerialPort = new System.Windows.Forms.Button();
|
||||||
|
this.DevEUI = new System.Windows.Forms.TextBox();
|
||||||
|
this.DevUEIGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.DevEUISet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.DevEUIGet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.AppEUIGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.AppEUISet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.AppEUIGet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.AppEUI = new System.Windows.Forms.TextBox();
|
||||||
|
this.AppKeyGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.AppKeySet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.AppKeyGet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.AppKey = new System.Windows.Forms.TextBox();
|
||||||
|
this.DevAddrGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.DevAddrSet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.DevAddrGet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.DevAddr = new System.Windows.Forms.TextBox();
|
||||||
|
this.NwsKeyGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.NwsKeySet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.NwsKeyGet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.NwsKey = new System.Windows.Forms.TextBox();
|
||||||
|
this.AppsKeyGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.AppsKeySet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.AppsKeyGet = new Lora_Credential_Setter.CommandButton();
|
||||||
|
this.AppsKey = new System.Windows.Forms.TextBox();
|
||||||
|
this.OTAAGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.ABPGroupBox = new System.Windows.Forms.GroupBox();
|
||||||
|
this.ComPortSelection = new System.Windows.Forms.ComboBox();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
this.DevUEIGroupBox.SuspendLayout();
|
||||||
|
this.AppEUIGroupBox.SuspendLayout();
|
||||||
|
this.AppKeyGroupBox.SuspendLayout();
|
||||||
|
this.DevAddrGroupBox.SuspendLayout();
|
||||||
|
this.NwsKeyGroupBox.SuspendLayout();
|
||||||
|
this.AppsKeyGroupBox.SuspendLayout();
|
||||||
|
this.OTAAGroupBox.SuspendLayout();
|
||||||
|
this.ABPGroupBox.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.SerialConsole);
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(874, 12);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(510, 488);
|
||||||
|
this.groupBox1.TabIndex = 0;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "Serial Console";
|
||||||
|
//
|
||||||
|
// SerialConsole
|
||||||
|
//
|
||||||
|
this.SerialConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.SerialConsole.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.SerialConsole.Multiline = true;
|
||||||
|
this.SerialConsole.Name = "SerialConsole";
|
||||||
|
this.SerialConsole.Size = new System.Drawing.Size(498, 463);
|
||||||
|
this.SerialConsole.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// OpenSerialPort
|
||||||
|
//
|
||||||
|
this.OpenSerialPort.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.OpenSerialPort.Name = "OpenSerialPort";
|
||||||
|
this.OpenSerialPort.Size = new System.Drawing.Size(167, 53);
|
||||||
|
this.OpenSerialPort.TabIndex = 1;
|
||||||
|
this.OpenSerialPort.Text = "Open Serial Port";
|
||||||
|
this.OpenSerialPort.UseVisualStyleBackColor = true;
|
||||||
|
this.OpenSerialPort.Click += new System.EventHandler(this.OpenSerialPort_Click);
|
||||||
|
//
|
||||||
|
// DevEUI
|
||||||
|
//
|
||||||
|
this.DevEUI.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.DevEUI.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.DevEUI.Name = "DevEUI";
|
||||||
|
this.DevEUI.Size = new System.Drawing.Size(666, 26);
|
||||||
|
this.DevEUI.TabIndex = 3;
|
||||||
|
this.DevEUI.TextChanged += new System.EventHandler(this.DevEUI_TextChanged);
|
||||||
|
//
|
||||||
|
// DevUEIGroupBox
|
||||||
|
//
|
||||||
|
this.DevUEIGroupBox.Controls.Add(this.DevEUISet);
|
||||||
|
this.DevUEIGroupBox.Controls.Add(this.DevEUIGet);
|
||||||
|
this.DevUEIGroupBox.Controls.Add(this.DevEUI);
|
||||||
|
this.DevUEIGroupBox.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.DevUEIGroupBox.Name = "DevUEIGroupBox";
|
||||||
|
this.DevUEIGroupBox.Size = new System.Drawing.Size(844, 56);
|
||||||
|
this.DevUEIGroupBox.TabIndex = 4;
|
||||||
|
this.DevUEIGroupBox.TabStop = false;
|
||||||
|
this.DevUEIGroupBox.Text = "DevEUI";
|
||||||
|
//
|
||||||
|
// DevEUISet
|
||||||
|
//
|
||||||
|
this.DevEUISet.Location = new System.Drawing.Point(759, 19);
|
||||||
|
this.DevEUISet.Name = "DevEUISet";
|
||||||
|
this.DevEUISet.SerialCommand = 'A';
|
||||||
|
this.DevEUISet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.DevEUISet.TabIndex = 4;
|
||||||
|
this.DevEUISet.Text = "Set";
|
||||||
|
this.DevEUISet.UseVisualStyleBackColor = true;
|
||||||
|
this.DevEUISet.Click += new System.EventHandler(this.CommandButtonSet_Click);
|
||||||
|
//
|
||||||
|
// DevEUIGet
|
||||||
|
//
|
||||||
|
this.DevEUIGet.Location = new System.Drawing.Point(678, 19);
|
||||||
|
this.DevEUIGet.Name = "DevEUIGet";
|
||||||
|
this.DevEUIGet.SerialCommand = 'a';
|
||||||
|
this.DevEUIGet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.DevEUIGet.TabIndex = 4;
|
||||||
|
this.DevEUIGet.Text = "Get";
|
||||||
|
this.DevEUIGet.UseVisualStyleBackColor = true;
|
||||||
|
this.DevEUIGet.Click += new System.EventHandler(this.CommandButtonGet_Click);
|
||||||
|
//
|
||||||
|
// AppEUIGroupBox
|
||||||
|
//
|
||||||
|
this.AppEUIGroupBox.Controls.Add(this.AppEUISet);
|
||||||
|
this.AppEUIGroupBox.Controls.Add(this.AppEUIGet);
|
||||||
|
this.AppEUIGroupBox.Controls.Add(this.AppEUI);
|
||||||
|
this.AppEUIGroupBox.Location = new System.Drawing.Point(6, 81);
|
||||||
|
this.AppEUIGroupBox.Name = "AppEUIGroupBox";
|
||||||
|
this.AppEUIGroupBox.Size = new System.Drawing.Size(844, 56);
|
||||||
|
this.AppEUIGroupBox.TabIndex = 4;
|
||||||
|
this.AppEUIGroupBox.TabStop = false;
|
||||||
|
this.AppEUIGroupBox.Text = "AppEUI";
|
||||||
|
//
|
||||||
|
// AppEUISet
|
||||||
|
//
|
||||||
|
this.AppEUISet.Location = new System.Drawing.Point(759, 19);
|
||||||
|
this.AppEUISet.Name = "AppEUISet";
|
||||||
|
this.AppEUISet.SerialCommand = 'B';
|
||||||
|
this.AppEUISet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.AppEUISet.TabIndex = 4;
|
||||||
|
this.AppEUISet.Text = "Set";
|
||||||
|
this.AppEUISet.UseVisualStyleBackColor = true;
|
||||||
|
this.AppEUISet.Click += new System.EventHandler(this.CommandButtonSet_Click);
|
||||||
|
//
|
||||||
|
// AppEUIGet
|
||||||
|
//
|
||||||
|
this.AppEUIGet.Location = new System.Drawing.Point(678, 19);
|
||||||
|
this.AppEUIGet.Name = "AppEUIGet";
|
||||||
|
this.AppEUIGet.SerialCommand = 'b';
|
||||||
|
this.AppEUIGet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.AppEUIGet.TabIndex = 4;
|
||||||
|
this.AppEUIGet.Text = "Get";
|
||||||
|
this.AppEUIGet.UseVisualStyleBackColor = true;
|
||||||
|
this.AppEUIGet.Click += new System.EventHandler(this.CommandButtonGet_Click);
|
||||||
|
//
|
||||||
|
// AppEUI
|
||||||
|
//
|
||||||
|
this.AppEUI.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.AppEUI.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.AppEUI.Name = "AppEUI";
|
||||||
|
this.AppEUI.Size = new System.Drawing.Size(666, 26);
|
||||||
|
this.AppEUI.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// AppKeyGroupBox
|
||||||
|
//
|
||||||
|
this.AppKeyGroupBox.Controls.Add(this.AppKeySet);
|
||||||
|
this.AppKeyGroupBox.Controls.Add(this.AppKeyGet);
|
||||||
|
this.AppKeyGroupBox.Controls.Add(this.AppKey);
|
||||||
|
this.AppKeyGroupBox.Location = new System.Drawing.Point(6, 143);
|
||||||
|
this.AppKeyGroupBox.Name = "AppKeyGroupBox";
|
||||||
|
this.AppKeyGroupBox.Size = new System.Drawing.Size(844, 56);
|
||||||
|
this.AppKeyGroupBox.TabIndex = 4;
|
||||||
|
this.AppKeyGroupBox.TabStop = false;
|
||||||
|
this.AppKeyGroupBox.Text = "AppKey";
|
||||||
|
//
|
||||||
|
// AppKeySet
|
||||||
|
//
|
||||||
|
this.AppKeySet.Location = new System.Drawing.Point(759, 19);
|
||||||
|
this.AppKeySet.Name = "AppKeySet";
|
||||||
|
this.AppKeySet.SerialCommand = 'C';
|
||||||
|
this.AppKeySet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.AppKeySet.TabIndex = 4;
|
||||||
|
this.AppKeySet.Text = "Set";
|
||||||
|
this.AppKeySet.UseVisualStyleBackColor = true;
|
||||||
|
this.AppKeySet.Click += new System.EventHandler(this.CommandButtonSet_Click);
|
||||||
|
//
|
||||||
|
// AppKeyGet
|
||||||
|
//
|
||||||
|
this.AppKeyGet.Location = new System.Drawing.Point(678, 19);
|
||||||
|
this.AppKeyGet.Name = "AppKeyGet";
|
||||||
|
this.AppKeyGet.SerialCommand = 'c';
|
||||||
|
this.AppKeyGet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.AppKeyGet.TabIndex = 4;
|
||||||
|
this.AppKeyGet.Text = "Get";
|
||||||
|
this.AppKeyGet.UseVisualStyleBackColor = true;
|
||||||
|
this.AppKeyGet.Click += new System.EventHandler(this.CommandButtonGet_Click);
|
||||||
|
//
|
||||||
|
// AppKey
|
||||||
|
//
|
||||||
|
this.AppKey.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.AppKey.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.AppKey.Name = "AppKey";
|
||||||
|
this.AppKey.Size = new System.Drawing.Size(666, 26);
|
||||||
|
this.AppKey.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// DevAddrGroupBox
|
||||||
|
//
|
||||||
|
this.DevAddrGroupBox.Controls.Add(this.DevAddrSet);
|
||||||
|
this.DevAddrGroupBox.Controls.Add(this.DevAddrGet);
|
||||||
|
this.DevAddrGroupBox.Controls.Add(this.DevAddr);
|
||||||
|
this.DevAddrGroupBox.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.DevAddrGroupBox.Name = "DevAddrGroupBox";
|
||||||
|
this.DevAddrGroupBox.Size = new System.Drawing.Size(844, 56);
|
||||||
|
this.DevAddrGroupBox.TabIndex = 4;
|
||||||
|
this.DevAddrGroupBox.TabStop = false;
|
||||||
|
this.DevAddrGroupBox.Text = "DevAddr";
|
||||||
|
//
|
||||||
|
// DevAddrSet
|
||||||
|
//
|
||||||
|
this.DevAddrSet.Location = new System.Drawing.Point(759, 19);
|
||||||
|
this.DevAddrSet.Name = "DevAddrSet";
|
||||||
|
this.DevAddrSet.SerialCommand = 'D';
|
||||||
|
this.DevAddrSet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.DevAddrSet.TabIndex = 4;
|
||||||
|
this.DevAddrSet.Text = "Set";
|
||||||
|
this.DevAddrSet.UseVisualStyleBackColor = true;
|
||||||
|
this.DevAddrSet.Click += new System.EventHandler(this.CommandButtonSet_Click);
|
||||||
|
//
|
||||||
|
// DevAddrGet
|
||||||
|
//
|
||||||
|
this.DevAddrGet.Location = new System.Drawing.Point(678, 19);
|
||||||
|
this.DevAddrGet.Name = "DevAddrGet";
|
||||||
|
this.DevAddrGet.SerialCommand = 'd';
|
||||||
|
this.DevAddrGet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.DevAddrGet.TabIndex = 4;
|
||||||
|
this.DevAddrGet.Text = "Get";
|
||||||
|
this.DevAddrGet.UseVisualStyleBackColor = true;
|
||||||
|
this.DevAddrGet.Click += new System.EventHandler(this.CommandButtonGet_Click);
|
||||||
|
//
|
||||||
|
// DevAddr
|
||||||
|
//
|
||||||
|
this.DevAddr.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.DevAddr.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.DevAddr.Name = "DevAddr";
|
||||||
|
this.DevAddr.Size = new System.Drawing.Size(666, 26);
|
||||||
|
this.DevAddr.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// NwsKeyGroupBox
|
||||||
|
//
|
||||||
|
this.NwsKeyGroupBox.Controls.Add(this.NwsKeySet);
|
||||||
|
this.NwsKeyGroupBox.Controls.Add(this.NwsKeyGet);
|
||||||
|
this.NwsKeyGroupBox.Controls.Add(this.NwsKey);
|
||||||
|
this.NwsKeyGroupBox.Location = new System.Drawing.Point(6, 81);
|
||||||
|
this.NwsKeyGroupBox.Name = "NwsKeyGroupBox";
|
||||||
|
this.NwsKeyGroupBox.Size = new System.Drawing.Size(844, 56);
|
||||||
|
this.NwsKeyGroupBox.TabIndex = 4;
|
||||||
|
this.NwsKeyGroupBox.TabStop = false;
|
||||||
|
this.NwsKeyGroupBox.Text = "NwsKey";
|
||||||
|
//
|
||||||
|
// NwsKeySet
|
||||||
|
//
|
||||||
|
this.NwsKeySet.Location = new System.Drawing.Point(759, 19);
|
||||||
|
this.NwsKeySet.Name = "NwsKeySet";
|
||||||
|
this.NwsKeySet.SerialCommand = 'E';
|
||||||
|
this.NwsKeySet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.NwsKeySet.TabIndex = 4;
|
||||||
|
this.NwsKeySet.Text = "Set";
|
||||||
|
this.NwsKeySet.UseVisualStyleBackColor = true;
|
||||||
|
this.NwsKeySet.Click += new System.EventHandler(this.CommandButtonSet_Click);
|
||||||
|
//
|
||||||
|
// NwsKeyGet
|
||||||
|
//
|
||||||
|
this.NwsKeyGet.Location = new System.Drawing.Point(678, 19);
|
||||||
|
this.NwsKeyGet.Name = "NwsKeyGet";
|
||||||
|
this.NwsKeyGet.SerialCommand = 'e';
|
||||||
|
this.NwsKeyGet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.NwsKeyGet.TabIndex = 4;
|
||||||
|
this.NwsKeyGet.Text = "Get";
|
||||||
|
this.NwsKeyGet.UseVisualStyleBackColor = true;
|
||||||
|
this.NwsKeyGet.Click += new System.EventHandler(this.CommandButtonGet_Click);
|
||||||
|
//
|
||||||
|
// NwsKey
|
||||||
|
//
|
||||||
|
this.NwsKey.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.NwsKey.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.NwsKey.Name = "NwsKey";
|
||||||
|
this.NwsKey.Size = new System.Drawing.Size(666, 26);
|
||||||
|
this.NwsKey.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// AppsKeyGroupBox
|
||||||
|
//
|
||||||
|
this.AppsKeyGroupBox.Controls.Add(this.AppsKeySet);
|
||||||
|
this.AppsKeyGroupBox.Controls.Add(this.AppsKeyGet);
|
||||||
|
this.AppsKeyGroupBox.Controls.Add(this.AppsKey);
|
||||||
|
this.AppsKeyGroupBox.Location = new System.Drawing.Point(6, 143);
|
||||||
|
this.AppsKeyGroupBox.Name = "AppsKeyGroupBox";
|
||||||
|
this.AppsKeyGroupBox.Size = new System.Drawing.Size(844, 56);
|
||||||
|
this.AppsKeyGroupBox.TabIndex = 4;
|
||||||
|
this.AppsKeyGroupBox.TabStop = false;
|
||||||
|
this.AppsKeyGroupBox.Text = "AppsKey";
|
||||||
|
//
|
||||||
|
// AppsKeySet
|
||||||
|
//
|
||||||
|
this.AppsKeySet.Location = new System.Drawing.Point(759, 19);
|
||||||
|
this.AppsKeySet.Name = "AppsKeySet";
|
||||||
|
this.AppsKeySet.SerialCommand = 'F';
|
||||||
|
this.AppsKeySet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.AppsKeySet.TabIndex = 4;
|
||||||
|
this.AppsKeySet.Text = "Set";
|
||||||
|
this.AppsKeySet.UseVisualStyleBackColor = true;
|
||||||
|
this.AppsKeySet.Click += new System.EventHandler(this.CommandButtonSet_Click);
|
||||||
|
//
|
||||||
|
// AppsKeyGet
|
||||||
|
//
|
||||||
|
this.AppsKeyGet.Location = new System.Drawing.Point(678, 19);
|
||||||
|
this.AppsKeyGet.Name = "AppsKeyGet";
|
||||||
|
this.AppsKeyGet.SerialCommand = 'f';
|
||||||
|
this.AppsKeyGet.Size = new System.Drawing.Size(75, 26);
|
||||||
|
this.AppsKeyGet.TabIndex = 4;
|
||||||
|
this.AppsKeyGet.Text = "Get";
|
||||||
|
this.AppsKeyGet.UseVisualStyleBackColor = true;
|
||||||
|
this.AppsKeyGet.Click += new System.EventHandler(this.CommandButtonGet_Click);
|
||||||
|
//
|
||||||
|
// AppsKey
|
||||||
|
//
|
||||||
|
this.AppsKey.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.AppsKey.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.AppsKey.Name = "AppsKey";
|
||||||
|
this.AppsKey.Size = new System.Drawing.Size(666, 26);
|
||||||
|
this.AppsKey.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// OTAAGroupBox
|
||||||
|
//
|
||||||
|
this.OTAAGroupBox.Controls.Add(this.DevUEIGroupBox);
|
||||||
|
this.OTAAGroupBox.Controls.Add(this.AppKeyGroupBox);
|
||||||
|
this.OTAAGroupBox.Controls.Add(this.AppEUIGroupBox);
|
||||||
|
this.OTAAGroupBox.Location = new System.Drawing.Point(12, 71);
|
||||||
|
this.OTAAGroupBox.Name = "OTAAGroupBox";
|
||||||
|
this.OTAAGroupBox.Size = new System.Drawing.Size(856, 210);
|
||||||
|
this.OTAAGroupBox.TabIndex = 5;
|
||||||
|
this.OTAAGroupBox.TabStop = false;
|
||||||
|
this.OTAAGroupBox.Text = "OTAA";
|
||||||
|
//
|
||||||
|
// ABPGroupBox
|
||||||
|
//
|
||||||
|
this.ABPGroupBox.Controls.Add(this.DevAddrGroupBox);
|
||||||
|
this.ABPGroupBox.Controls.Add(this.NwsKeyGroupBox);
|
||||||
|
this.ABPGroupBox.Controls.Add(this.AppsKeyGroupBox);
|
||||||
|
this.ABPGroupBox.Location = new System.Drawing.Point(12, 287);
|
||||||
|
this.ABPGroupBox.Name = "ABPGroupBox";
|
||||||
|
this.ABPGroupBox.Size = new System.Drawing.Size(856, 213);
|
||||||
|
this.ABPGroupBox.TabIndex = 6;
|
||||||
|
this.ABPGroupBox.TabStop = false;
|
||||||
|
this.ABPGroupBox.Text = "ABP";
|
||||||
|
//
|
||||||
|
// ComPortSelection
|
||||||
|
//
|
||||||
|
this.ComPortSelection.FormattingEnabled = true;
|
||||||
|
this.ComPortSelection.Location = new System.Drawing.Point(185, 29);
|
||||||
|
this.ComPortSelection.Name = "ComPortSelection";
|
||||||
|
this.ComPortSelection.Size = new System.Drawing.Size(121, 21);
|
||||||
|
this.ComPortSelection.TabIndex = 8;
|
||||||
|
//
|
||||||
|
// Form1
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(1396, 507);
|
||||||
|
this.Controls.Add(this.ComPortSelection);
|
||||||
|
this.Controls.Add(this.ABPGroupBox);
|
||||||
|
this.Controls.Add(this.OTAAGroupBox);
|
||||||
|
this.Controls.Add(this.OpenSerialPort);
|
||||||
|
this.Controls.Add(this.groupBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
this.Name = "Form1";
|
||||||
|
this.Text = "Lora Credential Setter";
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
this.DevUEIGroupBox.ResumeLayout(false);
|
||||||
|
this.DevUEIGroupBox.PerformLayout();
|
||||||
|
this.AppEUIGroupBox.ResumeLayout(false);
|
||||||
|
this.AppEUIGroupBox.PerformLayout();
|
||||||
|
this.AppKeyGroupBox.ResumeLayout(false);
|
||||||
|
this.AppKeyGroupBox.PerformLayout();
|
||||||
|
this.DevAddrGroupBox.ResumeLayout(false);
|
||||||
|
this.DevAddrGroupBox.PerformLayout();
|
||||||
|
this.NwsKeyGroupBox.ResumeLayout(false);
|
||||||
|
this.NwsKeyGroupBox.PerformLayout();
|
||||||
|
this.AppsKeyGroupBox.ResumeLayout(false);
|
||||||
|
this.AppsKeyGroupBox.PerformLayout();
|
||||||
|
this.OTAAGroupBox.ResumeLayout(false);
|
||||||
|
this.ABPGroupBox.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.TextBox SerialConsole;
|
||||||
|
private System.Windows.Forms.Button OpenSerialPort;
|
||||||
|
private System.Windows.Forms.TextBox DevEUI;
|
||||||
|
private System.Windows.Forms.GroupBox DevUEIGroupBox;
|
||||||
|
private System.Windows.Forms.GroupBox AppEUIGroupBox;
|
||||||
|
private System.Windows.Forms.TextBox AppEUI;
|
||||||
|
private System.Windows.Forms.GroupBox AppKeyGroupBox;
|
||||||
|
private System.Windows.Forms.TextBox AppKey;
|
||||||
|
private System.Windows.Forms.GroupBox DevAddrGroupBox;
|
||||||
|
private System.Windows.Forms.TextBox DevAddr;
|
||||||
|
private System.Windows.Forms.GroupBox NwsKeyGroupBox;
|
||||||
|
private System.Windows.Forms.TextBox NwsKey;
|
||||||
|
private System.Windows.Forms.GroupBox AppsKeyGroupBox;
|
||||||
|
private System.Windows.Forms.TextBox AppsKey;
|
||||||
|
private System.Windows.Forms.GroupBox OTAAGroupBox;
|
||||||
|
private System.Windows.Forms.GroupBox ABPGroupBox;
|
||||||
|
private CommandButton DevEUISet;
|
||||||
|
private CommandButton DevEUIGet;
|
||||||
|
private CommandButton AppEUISet;
|
||||||
|
private CommandButton AppEUIGet;
|
||||||
|
private CommandButton AppKeySet;
|
||||||
|
private CommandButton AppKeyGet;
|
||||||
|
private CommandButton DevAddrSet;
|
||||||
|
private CommandButton DevAddrGet;
|
||||||
|
private CommandButton NwsKeySet;
|
||||||
|
private CommandButton NwsKeyGet;
|
||||||
|
private CommandButton AppsKeySet;
|
||||||
|
private CommandButton AppsKeyGet;
|
||||||
|
private System.Windows.Forms.ComboBox ComPortSelection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
458
Lora-Wsen-Configtool/Form1.cs
Normal file
458
Lora-Wsen-Configtool/Form1.cs
Normal file
@@ -0,0 +1,458 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO.Ports;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Lora_Credential_Setter
|
||||||
|
{
|
||||||
|
public partial class Form1 : Form
|
||||||
|
{
|
||||||
|
public Form1()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
SerialPortOpenEvent += OpenSerialPort_Color;
|
||||||
|
|
||||||
|
DevEUI.Validating += DevEUI_Validating;
|
||||||
|
DevEUI.KeyUp += DevEUI_KeyUp;
|
||||||
|
|
||||||
|
|
||||||
|
SerialPortOpenEvent += DevEUIGet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += DevEUISet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += AppEUIGet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += AppEUISet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += AppKeyGet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += AppKeySet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += DevAddrGet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += DevAddrSet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += NwsKeyGet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += NwsKeySet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += AppsKeyGet.SetVisbleState;
|
||||||
|
SerialPortOpenEvent += AppsKeySet.SetVisbleState;
|
||||||
|
|
||||||
|
SerialPortOpenEvent?.Invoke(this, false);
|
||||||
|
|
||||||
|
ComPortSelection.Items.AddRange(SerialPort.GetPortNames());
|
||||||
|
}
|
||||||
|
|
||||||
|
private SerialPort _SerialPort;
|
||||||
|
|
||||||
|
private const int BaudRate = 9600;
|
||||||
|
|
||||||
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
_SerialPort.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public string ByteArrayToString(byte[] ba)
|
||||||
|
{
|
||||||
|
return BitConverter.ToString(ba, 0).Replace("-", " ");
|
||||||
|
}
|
||||||
|
public string ByteArrayToString(string str)
|
||||||
|
{
|
||||||
|
return BitConverter.ToString(Encoding.ASCII.GetBytes(str), 0).Replace("-", " ");
|
||||||
|
}
|
||||||
|
|
||||||
|
//public delegate void InvokeTreatment(byte[] buffer);
|
||||||
|
|
||||||
|
char[] SerialBuffer = new char[256];
|
||||||
|
int idx = 0;
|
||||||
|
|
||||||
|
private void SerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
|
||||||
|
{
|
||||||
|
int byteCount = _SerialPort.BytesToRead;
|
||||||
|
byte[] buffer = new byte[byteCount];
|
||||||
|
_SerialPort.Read(buffer, 0, byteCount);
|
||||||
|
|
||||||
|
//Console.WriteLine(ByteArrayToString(buffer));
|
||||||
|
|
||||||
|
if (InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
SerialConsole.AppendText(Encoding.ASCII.GetString(buffer));
|
||||||
|
SerialConsole.AppendText(Environment.NewLine);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SerialConsole.AppendText(Encoding.ASCII.GetString(buffer));
|
||||||
|
SerialConsole.AppendText(Environment.NewLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Console.WriteLine("BYtesCount = " + byteCount);
|
||||||
|
|
||||||
|
if (buffer[0] == STX[0] && buffer[byteCount - 1] == ETX[0])
|
||||||
|
{
|
||||||
|
switch (buffer[1])
|
||||||
|
{
|
||||||
|
case 0x61: //get DevEUI
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
DevEUI.Text = ByteArrayToString(buffer.Skip(2).Take(8).ToArray());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 0x62: //get appEUI
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
AppEUI.Text = ByteArrayToString(buffer.Skip(2).Take(8).ToArray());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 0x63: //get appkey
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
AppKey.Text = ByteArrayToString(buffer.Skip(2).Take(16).ToArray());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 0x64: //get devaddr
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
DevAddr.Text = ByteArrayToString(buffer.Skip(2).Take(8).ToArray());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 0x65: //get nwkskey
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
NwsKey.Text = ByteArrayToString(buffer.Skip(2).Take(16).ToArray());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 0x66: //get appskey
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
AppsKey.Text = ByteArrayToString(buffer.Skip(2).Take(16).ToArray());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x41: //Set DevEUI
|
||||||
|
//Serial.println(F("set deveui"));
|
||||||
|
// Serial.println(&cmdline[1]);
|
||||||
|
// memcpy(configuration.DEVEUI, &cmdline[1], 8);
|
||||||
|
break;
|
||||||
|
case 0x42: //Set appEUI
|
||||||
|
//Serial.println(F("set appeui"));
|
||||||
|
// Serial.println(&cmdline[1]);
|
||||||
|
// memcpy(configuration.APPEUI, &cmdline[1], 8);
|
||||||
|
break;
|
||||||
|
case 0x43: //Set APPKEY
|
||||||
|
//Serial.println(F("set appkey"));
|
||||||
|
// Serial.println(&cmdline[1]);
|
||||||
|
// memcpy(configuration.APPKEY, &cmdline[1], 16);
|
||||||
|
break;
|
||||||
|
case 0x44: //Set devaddr
|
||||||
|
//Serial.println(F("set devaddr"));
|
||||||
|
// Serial.println(&cmdline[1]);
|
||||||
|
break;
|
||||||
|
case 0x45: //Set NwkSKey
|
||||||
|
//Serial.println(F("set nwkskey"));
|
||||||
|
// Serial.println(&cmdline[1]);
|
||||||
|
break;
|
||||||
|
case 0x46: //Set appskey
|
||||||
|
//Serial.println(F("set appskey"));
|
||||||
|
// Serial.println(&cmdline[1]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Console.WriteLine("Unknown command = " + buffer[1]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public EventHandler<Boolean> SerialPortOpenEvent;
|
||||||
|
|
||||||
|
private void OpenSerialPort_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (_SerialPort == null || _SerialPort.IsOpen == false)
|
||||||
|
{
|
||||||
|
if (ComPortSelection.SelectedItem == null)
|
||||||
|
{
|
||||||
|
SerialPortOpenEvent?.Invoke(this, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_SerialPort = new SerialPort(ComPortSelection.SelectedItem.ToString(), BaudRate, Parity.None, 8, StopBits.One);
|
||||||
|
_SerialPort.DataReceived += SerialPort_DataReceived;
|
||||||
|
_SerialPort.Open();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_SerialPort.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
SerialPortOpenEvent?.Invoke(this, _SerialPort.IsOpen);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenSerialPort_Color(object sender, bool state)
|
||||||
|
{
|
||||||
|
if (state == true)
|
||||||
|
{
|
||||||
|
this.OpenSerialPort.BackColor = Color.Green;
|
||||||
|
this.OpenSerialPort.Text = "Close Serial Port";
|
||||||
|
this.ComPortSelection.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.OpenSerialPort.BackColor = Color.Red;
|
||||||
|
this.OpenSerialPort.Text = "Open Serial Port";
|
||||||
|
this.ComPortSelection.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private byte[] STX = new byte[] { 0x02 };
|
||||||
|
private byte[] ETX = new byte[] { 0x03 };
|
||||||
|
|
||||||
|
private void SendSerial(String str)
|
||||||
|
{
|
||||||
|
_SerialPort.DiscardOutBuffer();
|
||||||
|
byte[] bytes = Encoding.ASCII.GetBytes(str);
|
||||||
|
_SerialPort.Write(STX, 0, 1);
|
||||||
|
_SerialPort.Write(bytes, 0, bytes.Length);
|
||||||
|
_SerialPort.Write(ETX, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CommandButtonGet_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CommandButton cmdbutton = (CommandButton)sender;
|
||||||
|
|
||||||
|
Console.WriteLine("Get = " + cmdbutton.SerialCommand);
|
||||||
|
|
||||||
|
SendSerial(cmdbutton.SerialCommand.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CommandButtonSet_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CommandButton cmdbutton = (CommandButton)sender;
|
||||||
|
|
||||||
|
Console.WriteLine("Set = " + cmdbutton.SerialCommand);
|
||||||
|
|
||||||
|
byte[] bytes = new byte[17];
|
||||||
|
|
||||||
|
switch (cmdbutton.SerialCommand)
|
||||||
|
{
|
||||||
|
case 'A':
|
||||||
|
if (string.IsNullOrEmpty(DevEUI.Text) == false && string.IsNullOrWhiteSpace(DevEUI.Text) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("-" + DevEUI.Text + "-");
|
||||||
|
bytes = DevEUI.Text.Split(' ').Select(h => byte.Parse(h, NumberStyles.AllowHexSpecifier)).ToArray();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'B':
|
||||||
|
if (string.IsNullOrEmpty(AppEUI.Text) == false && string.IsNullOrWhiteSpace(AppEUI.Text) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("-" + AppEUI.Text + "-");
|
||||||
|
bytes = AppEUI.Text.Split(' ').Select(h => byte.Parse(h, NumberStyles.AllowHexSpecifier)).ToArray();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'C':
|
||||||
|
if (string.IsNullOrEmpty(AppKey.Text) == false && string.IsNullOrWhiteSpace(AppKey.Text) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("-" + AppKey.Text + "-");
|
||||||
|
bytes = AppKey.Text.Split(' ').Select(h => byte.Parse(h, NumberStyles.AllowHexSpecifier)).ToArray();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'D':
|
||||||
|
if (string.IsNullOrEmpty(DevAddr.Text) == false && string.IsNullOrWhiteSpace(DevAddr.Text) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("-" + DevAddr.Text + "-");
|
||||||
|
bytes = DevAddr.Text.Split(' ').Select(h => byte.Parse(h, NumberStyles.AllowHexSpecifier)).ToArray();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'E':
|
||||||
|
if (string.IsNullOrEmpty(NwsKey.Text) == false && string.IsNullOrWhiteSpace(NwsKey.Text) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("-" + NwsKey.Text + "-");
|
||||||
|
bytes = NwsKey.Text.Split(' ').Select(h => byte.Parse(h, NumberStyles.AllowHexSpecifier)).ToArray();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'F':
|
||||||
|
if (string.IsNullOrEmpty(AppsKey.Text) == false && string.IsNullOrWhiteSpace(AppsKey.Text) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("-" + AppsKey.Text + "-");
|
||||||
|
bytes = AppsKey.Text.Split(' ').Select(h => byte.Parse(h, NumberStyles.AllowHexSpecifier)).ToArray();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Console.WriteLine(ByteArrayToString(bytes));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//SendSerial(cmdbutton.SerialCommand.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void DevEUI_Validating(object sender, CancelEventArgs e)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Validating");
|
||||||
|
|
||||||
|
//string HexValue = DevEUI.Text.ToUpper();
|
||||||
|
|
||||||
|
//char[] allowedChars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||||
|
|
||||||
|
//string newhexvalue = string.Empty;
|
||||||
|
|
||||||
|
//foreach (char character in HexValue)
|
||||||
|
//{
|
||||||
|
// if (allowedChars.Contains(character))
|
||||||
|
// {
|
||||||
|
// Console.WriteLine(character + " Allowed");
|
||||||
|
|
||||||
|
// newhexvalue.Append(character);
|
||||||
|
|
||||||
|
// // //MessageBox.Show(string.Format("'{0}' is not a hexadecimal character", character));
|
||||||
|
// // //e.Cancel = true;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// Console.WriteLine(character + " Not Allowed");
|
||||||
|
|
||||||
|
// // HexValue.Remove(character);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// char[] allowedChars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||||
|
|
||||||
|
// foreach (char character in DevEUI.Text.ToUpper().ToArray())
|
||||||
|
// {
|
||||||
|
// if (!allowedChars.Contains(character))
|
||||||
|
// {
|
||||||
|
// MessageBox.Show(string.Format("'{0}' is not a hexadecimal character", character));
|
||||||
|
// e.Cancel = true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void DevEUI_KeyUp(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Console.WriteLine("keyup");
|
||||||
|
|
||||||
|
string HexValue = DevEUI.Text.ToUpper();
|
||||||
|
|
||||||
|
char[] allowedChars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||||
|
|
||||||
|
string newhexvalue = string.Empty;
|
||||||
|
|
||||||
|
foreach (char character in HexValue)
|
||||||
|
{
|
||||||
|
if (allowedChars.Contains(character))
|
||||||
|
{
|
||||||
|
Console.WriteLine(character + " Allowed");
|
||||||
|
|
||||||
|
newhexvalue.Append(character);
|
||||||
|
|
||||||
|
// //MessageBox.Show(string.Format("'{0}' is not a hexadecimal character", character));
|
||||||
|
// //e.Cancel = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine(character + " Not Allowed");
|
||||||
|
|
||||||
|
// HexValue.Remove(character);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DevEUI.Text = newhexvalue;
|
||||||
|
|
||||||
|
//DevEUI.Select();
|
||||||
|
//DevEUI.Select(DevEUI.Text.Length, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DevEUI_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Console.WriteLine("textchanged");
|
||||||
|
|
||||||
|
//string HexValue = DevEUI.Text.ToUpper();
|
||||||
|
|
||||||
|
//char[] allowedChars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||||
|
|
||||||
|
|
||||||
|
////HexValue = Regex.Replace(HexValue, @"^[A-F][a-f][0-9]*$", string.Empty);
|
||||||
|
|
||||||
|
////string str = new string((from c in HexValue
|
||||||
|
//// where char.IsWhiteSpace(c) || char.IsLetterOrDigit(c)
|
||||||
|
//// select c
|
||||||
|
//// ).ToArray());
|
||||||
|
|
||||||
|
//string newhexvalue = string.Empty; // = new string() ;
|
||||||
|
|
||||||
|
//foreach (char character in HexValue)
|
||||||
|
//{
|
||||||
|
// if (allowedChars.Contains(character))
|
||||||
|
// {
|
||||||
|
// Console.WriteLine(character + " Allowed");
|
||||||
|
|
||||||
|
// newhexvalue.Append(character);
|
||||||
|
|
||||||
|
// // //MessageBox.Show(string.Format("'{0}' is not a hexadecimal character", character));
|
||||||
|
// // //e.Cancel = true;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// Console.WriteLine(character + " Not Allowed");
|
||||||
|
|
||||||
|
// // HexValue.Remove(character);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//DevEUI.Text = newhexvalue;
|
||||||
|
|
||||||
|
//DevEUI.Select();
|
||||||
|
//DevEUI.Select(DevEUI.Text.Length, 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//if (!int.TryParse(item, NumberStyles.HexNumber, NumberFormatInfo.CurrentInfo, out _) && item != String.Empty)
|
||||||
|
//{
|
||||||
|
// Console.WriteLine("1");
|
||||||
|
|
||||||
|
// //DevEUI.Text = item.Remove(item.Length - 1, 1);
|
||||||
|
// //DevEUI.SelectionStart = DevEUI.Text.Length;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// Console.WriteLine("Else");
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//private void DevEUI_TextChanged(object sender, EventArgs e)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// string item = DevEUI.Text;
|
||||||
|
// if (!int.TryParse(item, System.Globalization.NumberStyles.HexNumber, System.Globalization.NumberFormatInfo.CurrentInfo, out int n) && item != String.Empty)
|
||||||
|
// {
|
||||||
|
// DevEUI.Text = item.Remove(item.Length - 1, 1);
|
||||||
|
// DevEUI.SelectionStart = DevEUI.Text.Length;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Lora-Wsen-Configtool/Form1.resx
Normal file
120
Lora-Wsen-Configtool/Form1.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
87
Lora-Wsen-Configtool/Lora-Wsen-Configtool.csproj
Normal file
87
Lora-Wsen-Configtool/Lora-Wsen-Configtool.csproj
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{9FE5DD3A-0C6A-4BDE-BEED-9B4AFAF691CB}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>Lora_Wsen_Configtool</RootNamespace>
|
||||||
|
<AssemblyName>Lora Wsen Configtool</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="CommandButton.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.Designer.cs">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
22
Lora-Wsen-Configtool/Program.cs
Normal file
22
Lora-Wsen-Configtool/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Lora_Credential_Setter
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new Form1());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
Lora-Wsen-Configtool/Properties/AssemblyInfo.cs
Normal file
36
Lora-Wsen-Configtool/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("Lora Credential Setter")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Lora Credential Setter")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("9fe5dd3a-0c6a-4bde-beed-9b4afaf691cb")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
63
Lora-Wsen-Configtool/Properties/Resources.Designer.cs
generated
Normal file
63
Lora-Wsen-Configtool/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Lora_Wsen_Configtool.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lora_Wsen_Configtool.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
Lora-Wsen-Configtool/Properties/Resources.resx
Normal file
117
Lora-Wsen-Configtool/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
26
Lora-Wsen-Configtool/Properties/Settings.Designer.cs
generated
Normal file
26
Lora-Wsen-Configtool/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Lora_Wsen_Configtool.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
Lora-Wsen-Configtool/Properties/Settings.settings
Normal file
7
Lora-Wsen-Configtool/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
Reference in New Issue
Block a user