diff --git a/.gitignore b/.gitignore
index 5af8aec..a3448a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,11 +2,8 @@
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################
-/.vs/IoTSharp.Gateway.Modbus
-/bin/Debug/net6.0
/obj
/SQlLiteDatabase.db
-/IoTSharp.Gateway.Modbus.csproj.user
-/.vs/ProjectEvaluation
-/.vs/IoTSharp.Gateways
-/bin/Debug/net7.0
+/*.user
+/.vs
+/bin
diff --git a/.gitmodules b/.gitmodules
index 40335f6..b13bb26 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,4 @@
[submodule "IoTSharpSdk"]
path = IoTSharpSdk
- url = https://github.com/IoTSharp/GatewaySdks.MQTT.git
+ url = https://github.com/IoTSharp/MQTTSdk.git
branch = main
diff --git a/IoTSharp.Gateways.csproj b/IoTSharp.Gateways.csproj
index 67a3df0..bb99859 100644
--- a/IoTSharp.Gateways.csproj
+++ b/IoTSharp.Gateways.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net7.0
annotations
enable
aspnet-IoTSharp.Gateways-554A6128-AB47-40BC-8BC3-40D3123C6BFF
@@ -13,6 +13,13 @@
+
+
+
+
+
+
+
@@ -23,21 +30,24 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
-
+
+
+
+
+
diff --git a/IoTSharp.Gateways.sln b/IoTSharp.Gateways.sln
index 9219afc..44fcbe0 100644
--- a/IoTSharp.Gateways.sln
+++ b/IoTSharp.Gateways.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTSharp.Gateways", "IoTSharp.Gateways.csproj", "{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTSharp.MQTTSdk", "IoTSharpSdk\IoTSharp.MQTTSdk.csproj", "{F488E869-5EE4-4B3E-A27B-2D997D674473}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Debug|Any CPU.Build.0 = Debug|Any CPU
{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Release|Any CPU.ActiveCfg = Release|Any CPU
{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F488E869-5EE4-4B3E-A27B-2D997D674473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F488E869-5EE4-4B3E-A27B-2D997D674473}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F488E869-5EE4-4B3E-A27B-2D997D674473}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F488E869-5EE4-4B3E-A27B-2D997D674473}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/IoTSharpSdk b/IoTSharpSdk
index 1b7b998..a7554f0 160000
--- a/IoTSharpSdk
+++ b/IoTSharpSdk
@@ -1 +1 @@
-Subproject commit 1b7b998787c980939ecacad1d5ae8687680c3aa3
+Subproject commit a7554f00f6e6d68823b2d1db5624946c2110ba96
diff --git a/Program.cs b/Program.cs
index 0aafe8d..f97d309 100644
--- a/Program.cs
+++ b/Program.cs
@@ -1,8 +1,10 @@
using IoTSharp.Gateways.Data;
using IoTSharp.Gateways.Jobs;
+using IoTSharp.MqttSdk;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Quartz;
+using System.Configuration;
namespace IoTSharp.Gateways
{
@@ -26,7 +28,9 @@ namespace IoTSharp.Gateways
builder.Services.AddRazorPages();
builder.Services.AddMemoryCache();
- builder.Services.AddIoTSharpMqttSdk(builder.Configuration);
+ builder.Services.AddSingleton()
+ .Configure(builder.Configuration)
+ .AddHostedService();
builder.Services.AddQuartz(q =>
{