diff --git a/APK Release/CS710SCSDemo0.1.9-075.apk b/APK Release/CS710SCSDemo0.1.10-091.apk
similarity index 83%
rename from APK Release/CS710SCSDemo0.1.9-075.apk
rename to APK Release/CS710SCSDemo0.1.10-091.apk
index 6346246..dea634c 100644
Binary files a/APK Release/CS710SCSDemo0.1.9-075.apk and b/APK Release/CS710SCSDemo0.1.10-091.apk differ
diff --git a/APK Release/CS710SCSDemo0.1.8-073.apk b/APK Release/CS710SCSDemo0.1.10-092.apk
similarity index 82%
rename from APK Release/CS710SCSDemo0.1.8-073.apk
rename to APK Release/CS710SCSDemo0.1.10-092.apk
index ba4ca6e..b8d18a6 100644
Binary files a/APK Release/CS710SCSDemo0.1.8-073.apk and b/APK Release/CS710SCSDemo0.1.10-092.apk differ
diff --git a/APK Release/CS710SCSDemo0.1.8-072.apk b/APK Release/CS710SCSDemo0.1.10-093.apk
similarity index 83%
rename from APK Release/CS710SCSDemo0.1.8-072.apk
rename to APK Release/CS710SCSDemo0.1.10-093.apk
index a635d26..b249f14 100644
Binary files a/APK Release/CS710SCSDemo0.1.8-072.apk and b/APK Release/CS710SCSDemo0.1.10-093.apk differ
diff --git a/APK Release/CS710SCSDemo0.1.7-070.apk b/APK Release/CS710SCSDemo0.1.7-070.apk
deleted file mode 100644
index 0709b40..0000000
Binary files a/APK Release/CS710SCSDemo0.1.7-070.apk and /dev/null differ
diff --git a/APK Release/CS710SCSDemo0.1.8-074.aab b/APK Release/CS710SCSDemo0.1.8-074.aab
deleted file mode 100644
index 5eda5bc..0000000
Binary files a/APK Release/CS710SCSDemo0.1.8-074.aab and /dev/null differ
diff --git a/CS710S-C-Sharp-APP-for-UWP.sln b/CS710S-C-Sharp-APP-for-UWP.sln
new file mode 100644
index 0000000..63de3e0
--- /dev/null
+++ b/CS710S-C-Sharp-APP-for-UWP.sln
@@ -0,0 +1,224 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32427.441
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{129A7404-6BDF-4303-82F0-29AE7ED69903}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MobileMvxApp", "MobileMvxApp", "{704DE96C-C11F-455C-BB36-6EFBAC1C5F93}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLE.Client.UWP", "MobileMvxApp\BLE.Client.UWP\BLE.Client.UWP.csproj", "{25E04E05-F867-4F64-813D-AAFE0BA171B0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSLibrary2024-NETStandard", "Library\CSLibrary\CSLibrary2024-NETStandard.csproj", "{8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BLE.Client", "MobileMvxApp\BLE.Client\BLE.Client.csproj", "{1BB029E4-A2C7-46B4-9E8F-F356EC322125}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
+ Ad-Hoc|ARM = Ad-Hoc|ARM
+ Ad-Hoc|iPhone = Ad-Hoc|iPhone
+ Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
+ Ad-Hoc|x64 = Ad-Hoc|x64
+ Ad-Hoc|x86 = Ad-Hoc|x86
+ AppStore|Any CPU = AppStore|Any CPU
+ AppStore|ARM = AppStore|ARM
+ AppStore|iPhone = AppStore|iPhone
+ AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
+ AppStore|x64 = AppStore|x64
+ AppStore|x86 = AppStore|x86
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|iPhone = Debug|iPhone
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|Any CPU.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|Any CPU.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|Any CPU.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|ARM.ActiveCfg = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|ARM.Build.0 = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|ARM.Deploy.0 = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|iPhone.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|iPhone.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|iPhone.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|x64.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|x64.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|x64.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|x86.ActiveCfg = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|x86.Build.0 = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Ad-Hoc|x86.Deploy.0 = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|Any CPU.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|Any CPU.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|Any CPU.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|ARM.ActiveCfg = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|ARM.Build.0 = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|ARM.Deploy.0 = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|iPhone.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|iPhone.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|iPhone.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|iPhoneSimulator.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|iPhoneSimulator.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|iPhoneSimulator.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|x64.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|x64.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|x64.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|x86.ActiveCfg = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|x86.Build.0 = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.AppStore|x86.Deploy.0 = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|Any CPU.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|Any CPU.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|ARM.ActiveCfg = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|ARM.Build.0 = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|ARM.Deploy.0 = Debug|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|iPhone.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|iPhone.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|iPhone.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|iPhoneSimulator.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|iPhoneSimulator.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|iPhoneSimulator.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|x64.ActiveCfg = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|x64.Build.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|x64.Deploy.0 = Debug|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|x86.ActiveCfg = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|x86.Build.0 = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Debug|x86.Deploy.0 = Debug|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|Any CPU.ActiveCfg = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|Any CPU.Build.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|Any CPU.Deploy.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|ARM.ActiveCfg = Release|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|ARM.Build.0 = Release|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|ARM.Deploy.0 = Release|ARM
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|iPhone.ActiveCfg = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|iPhone.Build.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|iPhone.Deploy.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|iPhoneSimulator.ActiveCfg = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|iPhoneSimulator.Build.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|iPhoneSimulator.Deploy.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|x64.ActiveCfg = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|x64.Build.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|x64.Deploy.0 = Release|x64
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|x86.ActiveCfg = Release|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|x86.Build.0 = Release|x86
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0}.Release|x86.Deploy.0 = Release|x86
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|x64.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.AppStore|x86.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|ARM.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|x64.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Debug|x86.Build.0 = Debug|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|ARM.ActiveCfg = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|ARM.Build.0 = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|iPhone.Build.0 = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|x64.ActiveCfg = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|x64.Build.0 = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|x86.ActiveCfg = Release|Any CPU
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5}.Release|x86.Build.0 = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|x64.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.AppStore|x86.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|ARM.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|x64.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Debug|x86.Build.0 = Debug|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|ARM.ActiveCfg = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|ARM.Build.0 = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|iPhone.Build.0 = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|x64.ActiveCfg = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|x64.Build.0 = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|x86.ActiveCfg = Release|Any CPU
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {25E04E05-F867-4F64-813D-AAFE0BA171B0} = {704DE96C-C11F-455C-BB36-6EFBAC1C5F93}
+ {8FEEC5C7-01C6-46B3-80A2-E67BB69F58B5} = {129A7404-6BDF-4303-82F0-29AE7ED69903}
+ {1BB029E4-A2C7-46B4-9E8F-F356EC322125} = {704DE96C-C11F-455C-BB36-6EFBAC1C5F93}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {2C58ABE7-E52E-4DF2-88A9-85846F29FA62}
+ EndGlobalSection
+EndGlobal
diff --git a/CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP.sln b/CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP.sln.bak
similarity index 100%
rename from CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP.sln
rename to CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP.sln.bak
diff --git a/CS710S-C-Sharp-APP-for-iOS-ANDROID.sln b/CS710S-C-Sharp-APP-for-iOS-ANDROID.sln
new file mode 100644
index 0000000..8105c0b
--- /dev/null
+++ b/CS710S-C-Sharp-APP-for-iOS-ANDROID.sln
@@ -0,0 +1,268 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32427.441
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{129A7404-6BDF-4303-82F0-29AE7ED69903}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSLibrary2024-NETStandard", "Library\CSLibrary\CSLibrary2024-NETStandard.csproj", "{22CFB5A2-C51E-42BF-9394-3C4F2415E69C}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MobileMvxApp", "MobileMvxApp", "{704DE96C-C11F-455C-BB36-6EFBAC1C5F93}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BLE.Client", "MobileMvxApp\BLE.Client\BLE.Client.csproj", "{47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLE.Client.Droid", "MobileMvxApp\BLE.Client.Droid\BLE.Client.Droid.csproj", "{7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLE.Client.iOS", "MobileMvxApp\BLE.Client.iOS\BLE.Client.iOS.csproj", "{D0FBE2BA-799B-4071-A45D-8FB037006C9C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
+ Ad-Hoc|ARM = Ad-Hoc|ARM
+ Ad-Hoc|iPhone = Ad-Hoc|iPhone
+ Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
+ Ad-Hoc|x64 = Ad-Hoc|x64
+ Ad-Hoc|x86 = Ad-Hoc|x86
+ AppStore|Any CPU = AppStore|Any CPU
+ AppStore|ARM = AppStore|ARM
+ AppStore|iPhone = AppStore|iPhone
+ AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
+ AppStore|x64 = AppStore|x64
+ AppStore|x86 = AppStore|x86
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|iPhone = Debug|iPhone
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|Any CPU.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|x64.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.AppStore|x86.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|ARM.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|x64.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Debug|x86.Build.0 = Debug|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|ARM.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|ARM.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|iPhone.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|x64.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|x64.Build.0 = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|x86.ActiveCfg = Release|Any CPU
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C}.Release|x86.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|Any CPU.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|x64.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.AppStore|x86.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|ARM.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|x64.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Debug|x86.Build.0 = Debug|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|ARM.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|ARM.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|iPhone.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|x64.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|x64.Build.0 = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|x86.ActiveCfg = Release|Any CPU
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF}.Release|x86.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|ARM.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|x64.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Ad-Hoc|x86.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|Any CPU.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|ARM.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|x64.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|x64.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|x86.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.AppStore|x86.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|ARM.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|ARM.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|iPhone.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|x64.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|x64.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|x86.Build.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Debug|x86.Deploy.0 = Debug|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|ARM.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|ARM.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|ARM.Deploy.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|iPhone.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|x64.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|x64.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|x64.Deploy.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|x86.ActiveCfg = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|x86.Build.0 = Release|Any CPU
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7}.Release|x86.Deploy.0 = Release|Any CPU
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|ARM.Build.0 = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|x64.Build.0 = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Ad-Hoc|x86.Build.0 = Ad-Hoc|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|Any CPU.ActiveCfg = AppStore|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|ARM.ActiveCfg = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|ARM.Build.0 = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|iPhone.Build.0 = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|x64.ActiveCfg = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|x64.Build.0 = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|x86.ActiveCfg = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.AppStore|x86.Build.0 = AppStore|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|ARM.ActiveCfg = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|ARM.Build.0 = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|iPhone.Build.0 = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|iPhone.Deploy.0 = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|x64.ActiveCfg = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|x64.Build.0 = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|x86.ActiveCfg = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Debug|x86.Build.0 = Debug|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|ARM.ActiveCfg = Release|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|ARM.Build.0 = Release|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|iPhone.ActiveCfg = Release|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|iPhone.Build.0 = Release|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|x64.ActiveCfg = Release|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|x64.Build.0 = Release|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|x86.ActiveCfg = Release|iPhone
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C}.Release|x86.Build.0 = Release|iPhone
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {22CFB5A2-C51E-42BF-9394-3C4F2415E69C} = {129A7404-6BDF-4303-82F0-29AE7ED69903}
+ {47E1BEC1-4717-46F5-9E71-6F4CCB7B0EAF} = {704DE96C-C11F-455C-BB36-6EFBAC1C5F93}
+ {7B0E4EFD-EEB8-4CE9-9C8D-7A4BF734E9A7} = {704DE96C-C11F-455C-BB36-6EFBAC1C5F93}
+ {D0FBE2BA-799B-4071-A45D-8FB037006C9C} = {704DE96C-C11F-455C-BB36-6EFBAC1C5F93}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {2C58ABE7-E52E-4DF2-88A9-85846F29FA62}
+ EndGlobalSection
+EndGlobal
diff --git a/Library/CSLibrary/CSLibrary2024-NET4.csproj b/Library/CSLibrary/CSLibrary2024-NET4.csproj
new file mode 100644
index 0000000..67a258a
--- /dev/null
+++ b/Library/CSLibrary/CSLibrary2024-NET4.csproj
@@ -0,0 +1,171 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {B84B1CFC-D8C3-420C-9526-E604D2710959}
+ Library
+ Properties
+ CSLibrary
+ CSLibrary2024.NET4
+ v4.8
+ 512
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ Source\HAL\btframework\wclBluetoothFramework.dll
+
+
+ Source\HAL\btframework\wclCommon.dll
+
+
+ Source\HAL\btframework\wclCommunication.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Library/CSLibrary/CSLibrary2024-NET8-MAUI.csproj b/Library/CSLibrary/CSLibrary2024-NET8-MAUI.csproj
new file mode 100644
index 0000000..de3f48a
--- /dev/null
+++ b/Library/CSLibrary/CSLibrary2024-NET8-MAUI.csproj
@@ -0,0 +1,54 @@
+
+
+ net8.0
+ CSLibrary
+ CSLibrary2024.NET8.MAUI
+ 3.0.3
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Library/CSLibrary/CSLibrary2024-NETStandard.csproj b/Library/CSLibrary/CSLibrary2024-NETStandard.csproj
index f7cbb0d..e249560 100644
--- a/Library/CSLibrary/CSLibrary2024-NETStandard.csproj
+++ b/Library/CSLibrary/CSLibrary2024-NETStandard.csproj
@@ -14,18 +14,21 @@
+
+
+
diff --git a/Library/CSLibrary/Properties/AssemblyInfo.cs b/Library/CSLibrary/Properties/AssemblyInfo.cs
index ec6f08d..415bb3d 100644
--- a/Library/CSLibrary/Properties/AssemblyInfo.cs
+++ b/Library/CSLibrary/Properties/AssemblyInfo.cs
@@ -12,11 +12,19 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Convergence System Limited")]
[assembly: AssemblyProduct("CSLibrary")]
-[assembly: AssemblyCopyright("Copyright � 2014")]
+[assembly: AssemblyCopyright("Copyright � 2024")]
[assembly: AssemblyTrademark("CSL")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
+// 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("3f5d0d75-9455-4797-9f63-28be05221609")]
+
// Version information for an assembly consists of the following four values:
//
// Major Version
diff --git a/Library/CSLibrary/Readme.txt b/Library/CSLibrary/Readme.txt
index e73da2e..0f20077 100644
--- a/Library/CSLibrary/Readme.txt
+++ b/Library/CSLibrary/Readme.txt
@@ -21,13 +21,6 @@ SOFTWARE.
CSLibrary is CS108 RFID reader framework
-CSLibrary type
---------------
-1. CSLibrary-NETStandard is a .netstandard library for iOS and Android MVVM apps
-2. CSLibrary-DESKTOP is a DLL library for Widnows 10 Desktop apps (WINFORMS and WPF)
-3. CSLibrary-UWP is a link project for Widnows 10 UWP apps
-
-
CLibrary structure
------------------
CSLibrary : Main library
@@ -37,7 +30,7 @@ CSLibrary.rfid : RFID reader Class
CSLibrary.barcode : Barcode scan Class
CSLibrary.bluetoothIC : for internal uses
CSLibrary.siliconlabIC : for internal uses
-
+
API List
--------
diff --git a/Library/CSLibrary/Source/BluetoothProtocol/BTReceive.cs b/Library/CSLibrary/Source/BluetoothProtocol/BTReceive.cs
index b6d1c71..cf41a43 100644
--- a/Library/CSLibrary/Source/BluetoothProtocol/BTReceive.cs
+++ b/Library/CSLibrary/Source/BluetoothProtocol/BTReceive.cs
@@ -64,54 +64,70 @@ bool CheckAPIHeader(byte[] data)
bool CheckSingalPacket(byte[] data)
{
- if (!CheckAPIHeader(data) || data[2] != (data.Length - 8))
- return false;
+ try
+ {
+ if (!CheckAPIHeader(data) || data[2] != (data.Length - 8))
+ return false;
+
+ UInt16 recvCRC = (UInt16)(data[6] << 8 | data[7]);
+ if (recvCRC != Tools.Crc.ComputeChecksum(data))
+ return false;
- UInt16 recvCRC = (UInt16)(data[6] << 8 | data[7]);
- if (recvCRC != Tools.Crc.ComputeChecksum(data))
+ ProcessAPIPacket(data);
+ }
+ catch(Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("CheckSingalPacket error : " + ex.Message);
return false;
+ }
- ProcessAPIPacket(data);
return true;
}
bool FirstAssemblePacketMohod(byte[] recvData)
{
- if (CheckAPIHeader(recvData))
+ try
{
- if (_currentRecvBufferSize > 0)
+ if (CheckAPIHeader(recvData))
{
- CSLibrary.Debug.WriteLine("BT1 : Packet Too small, can not process");
- }
-
- Array.Copy(recvData, 0, _recvBuffer, 0, recvData.Length);
- _currentRecvBufferSize = recvData.Length;
- return false;
- }
-
- if ((_currentRecvBufferSize + recvData.Length) > _recvBuffer[2] + 8)
- {
- CSLibrary.Debug.WriteLine("BT1 : Current packet size too large");
- _currentRecvBufferSize = 0;
- return false;
- }
+ if (_currentRecvBufferSize > 0)
+ {
+ CSLibrary.Debug.WriteLine("BT1 : Packet Too small, can not process");
+ }
- Array.Copy(recvData, 0, _recvBuffer, _currentRecvBufferSize, recvData.Length);
- _currentRecvBufferSize += recvData.Length;
+ Array.Copy(recvData, 0, _recvBuffer, 0, recvData.Length);
+ _currentRecvBufferSize = recvData.Length;
+ return false;
+ }
- if (_currentRecvBufferSize == (_recvBuffer[2] + 8))
- {
- UInt16 recvCRC = (UInt16)(_recvBuffer[6] << 8 | _recvBuffer[7]);
- UInt16 calCRC = Tools.Crc.ComputeChecksum(_recvBuffer);
- if (recvCRC != calCRC)
+ if ((_currentRecvBufferSize + recvData.Length) > _recvBuffer[2] + 8)
{
- CSLibrary.Debug.WriteLine("BT1 : Checksum error " + recvCRC.ToString("X4") + " " + calCRC.ToString("X4"));
+ CSLibrary.Debug.WriteLine("BT1 : Current packet size too large");
_currentRecvBufferSize = 0;
return false;
}
- ProcessAPIPacket(_recvBuffer);
- return true;
+ Array.Copy(recvData, 0, _recvBuffer, _currentRecvBufferSize, recvData.Length);
+ _currentRecvBufferSize += recvData.Length;
+
+ if (_currentRecvBufferSize == (_recvBuffer[2] + 8))
+ {
+ UInt16 recvCRC = (UInt16)(_recvBuffer[6] << 8 | _recvBuffer[7]);
+ UInt16 calCRC = Tools.Crc.ComputeChecksum(_recvBuffer);
+ if (recvCRC != calCRC)
+ {
+ CSLibrary.Debug.WriteLine("BT1 : Checksum error " + recvCRC.ToString("X4") + " " + calCRC.ToString("X4"));
+ _currentRecvBufferSize = 0;
+ return false;
+ }
+
+ ProcessAPIPacket(_recvBuffer);
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("FirstAssemblePacketMohod Error : " + ex.Message);
}
return false;
@@ -119,6 +135,8 @@ bool FirstAssemblePacketMohod(byte[] recvData)
bool BackupAssemblePacketMohod(byte[] recvData)
{
+ try
+ {
if (_currentRecvBufferSizeBackup == 0)
{
if (!CheckAPIHeader(recvData))
@@ -153,6 +171,11 @@ bool BackupAssemblePacketMohod(byte[] recvData)
ProcessAPIPacket(_recvBufferBackup);
return true;
}
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("BackupAssemblePacketMohod Error : " + ex.Message);
+ }
return false;
}
diff --git a/Library/CSLibrary/Source/HAL/MvvmCross.Plugin.BLE/CodeFileBLE.cs b/Library/CSLibrary/Source/HAL/MvvmCross.Plugin.BLE/CodeFileBLE.cs
index 4013193..cac9f78 100644
--- a/Library/CSLibrary/Source/HAL/MvvmCross.Plugin.BLE/CodeFileBLE.cs
+++ b/Library/CSLibrary/Source/HAL/MvvmCross.Plugin.BLE/CodeFileBLE.cs
@@ -83,7 +83,7 @@ public async Task ConnectAsync(IAdapter adapter, IDevice device, MODEL dev
}
catch (Exception ex)
{
- Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ Debug.WriteLine("Program execption error, please check ConnectAsync!!! error message : " + ex.Message);
}
_readerState = READERSTATE.IDLE;
@@ -167,6 +167,7 @@ public async Task DisconnectAsync()
Debug.WriteLine("Disconnect error " + ex.Message.ToString());
}
+ _handlerRFIDReader.Disconnect();
return true;
}
@@ -192,7 +193,7 @@ private async void BLE_Recv(object sender, CharacteristicUpdatedEventArgs charac
}
catch (Exception ex)
{
- Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ Debug.WriteLine("Program execption error, please check BLE_Recv!!! error message : " + ex.Message);
}
}
@@ -235,7 +236,7 @@ public async void ConnectLostAsync()
}
catch (Exception ex)
{
- Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ Debug.WriteLine("Program execption error, please check ConnectLostAsync!!! error message : " + ex.Message);
}
_device = null;
@@ -266,12 +267,11 @@ async Task ClearConnection()
}
catch (Exception ex)
{
- Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ Debug.WriteLine("Program execption error, please check ClearConnection!!! error message : " + ex.Message);
}
_device = null;
_readerState = READERSTATE.DISCONNECT;
}
-
}
}
diff --git a/Library/CSLibrary/Source/HAL/Plugin.BLE/ClassDebug.cs b/Library/CSLibrary/Source/HAL/Plugin.BLE/ClassDebug.cs
new file mode 100644
index 0000000..4df8dd9
--- /dev/null
+++ b/Library/CSLibrary/Source/HAL/Plugin.BLE/ClassDebug.cs
@@ -0,0 +1,48 @@
+/*
+Copyright (c) 2018 Convergence Systems Limited
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+using System;
+
+namespace CSLibrary
+{
+ public static class Debug
+ {
+ public static void WriteBytes(string header, byte[] data)
+ {
+ string str = "";
+ for (int cnt = 0; cnt < data.Length; cnt++)
+ str += data[cnt].ToString("X2") + " ";
+ WriteLine ("CSLibrary : " + header + " {0}:{1}", data.Length, str);
+ }
+
+ public static void WriteLine(string format, params object[] args)
+ {
+ Console.WriteLine(string.Format(format, args));
+ //Plugin.BLE.Abstractions.Trace.Message(string.Format(format, args));
+ }
+
+ public static void Write(string format, params object[] args)
+ {
+ Console.Write(string.Format(format, args));
+ //Plugin.BLE.Abstractions.Trace.Message(string.Format(format, args));
+ }
+ }
+}
diff --git a/Library/CSLibrary/Source/HAL/Plugin.BLE/ClassDeviceFinder.cs b/Library/CSLibrary/Source/HAL/Plugin.BLE/ClassDeviceFinder.cs
new file mode 100644
index 0000000..3c26fd7
--- /dev/null
+++ b/Library/CSLibrary/Source/HAL/Plugin.BLE/ClassDeviceFinder.cs
@@ -0,0 +1,272 @@
+/*
+Copyright (c) 2018 Convergence Systems Limited
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+#if __MwwmCrossPluginBLE
+
+using System;
+using System.Collections.Generic;
+
+using Plugin.BLE.Abstractions;
+using Plugin.BLE.Abstractions.Contracts;
+using Plugin.BLE.Abstractions.EventArgs;
+
+namespace CSLibrary
+{
+ public partial class DeviceFinder
+ {
+ ///
+ /// DeviceFinder Argument
+ ///
+ public class DeviceFinderArgs : EventArgs
+ {
+ private DeviceInfomation _data;
+
+ ///
+ /// Device Finder
+ ///
+ ///
+ public DeviceFinderArgs(DeviceInfomation data)
+ {
+ _data = data;
+ }
+
+ ///
+ /// Device finder information
+ ///
+ public DeviceInfomation Found
+ {
+ get { return _data; }
+ set { _data = value; }
+ }
+ }
+
+ ///
+ /// Netfinder information return from device
+ ///
+ public class DeviceInfomation
+ {
+ public uint ID;
+
+ public string deviceName;
+
+ public object nativeDeviceInformation;
+
+ /*
+ ///
+ /// Reserved for future use
+ ///
+ public Mode Mode = Mode.Unknown;
+ ///
+ /// Total time on network
+ ///
+ public TimeEvent TimeElapsedNetwork = new TimeEvent();
+ ///
+ /// Total Power on time
+ ///
+ public TimeEvent TimeElapsedPowerOn = new TimeEvent();
+ ///
+ /// MAC address
+ ///
+ public MAC MACAddress = new MAC();//[6];
+ ///
+ /// IP address
+ ///
+ public IP IPAddress = new IP();
+ ///
+ /// Subnet Mask
+ ///
+ public IP SubnetMask = new IP();
+ ///
+ /// Gateway
+ ///
+ public IP Gateway = new IP();
+ ///
+ /// Trusted hist IP
+ ///
+ public IP TrustedServer = new IP();
+ ///
+ /// Inducated trusted server enable or not.
+ ///
+ public Boolean TrustedServerEnabled = false;
+ ///
+ /// UDP Port
+ ///
+ public ushort Port; // Get port from UDP header
+ ///
+ /// Reserved for future use, Server mode ip
+ ///
+ public byte[] serverip = new byte[4];
+ ///
+ /// enable or disable DHCP
+ ///
+ public bool DHCPEnabled;
+ ///
+ /// Reserved for future use, Server mode port
+ ///
+ public ushort serverport;
+ ///
+ /// DHCP retry
+ ///
+ public byte DHCPRetry;
+ ///
+ /// Device name, user can change it.
+ ///
+ public string DeviceName;
+ ///
+ /// Mode discription
+ ///
+ public string Description;
+ ///
+ /// Connect Mode
+ ///
+ public byte ConnectMode;
+ ///
+ /// Gateway check reset mode
+ ///
+ public int GatewayCheckResetMode;
+ */
+ }
+
+ static private Windows.Devices.Enumeration.DeviceWatcher deviceWatcher;
+ static List _deviceDB = new List();
+
+ static public event EventHandler OnSearchCompleted;
+
+ static public void SearchDevice()
+ {
+ // Additional properties we would like about the device.
+ // Property strings are documented here https://msdn.microsoft.com/en-us/library/windows/desktop/ff521659(v=vs.85).aspx
+ string[] requestedProperties = { "System.Devices.Aep.DeviceAddress", "System.Devices.Aep.IsConnected", "System.Devices.Aep.Bluetooth.Le.IsConnectable", "System.Devices.Aep.AepId", "System.Devices.Aep.Category" };
+
+ // BT_Code: Example showing paired and non-paired in a single query.
+ string aqsAllBluetoothLEDevices = "(System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\")";
+
+ deviceWatcher =
+ DeviceInformation.CreateWatcher(
+ aqsAllBluetoothLEDevices,
+ requestedProperties,
+ DeviceInformationKind.AssociationEndpoint);
+
+ // Register event handlers before starting the watcher.
+ deviceWatcher.Added += DeviceWatcher_Added;
+ deviceWatcher.Updated += DeviceWatcher_Updated;
+ deviceWatcher.Removed += DeviceWatcher_Removed;
+ deviceWatcher.EnumerationCompleted += DeviceWatcher_EnumerationCompleted;
+ deviceWatcher.Stopped += DeviceWatcher_Stopped;
+
+ // Start the watcher.
+ deviceWatcher.Start();
+ }
+
+
+ static public void Stop()
+ {
+ ///
+ /// Stops watching for all nearby Bluetooth devices.
+ ///
+ if (deviceWatcher != null)
+ {
+ // Unregister the event handlers.
+ deviceWatcher.Added -= DeviceWatcher_Added;
+
+ // Stop the watcher.
+ deviceWatcher.Stop();
+ deviceWatcher = null;
+ }
+ }
+
+ static public void ClearDeviceList()
+ {
+ _deviceDB.Clear ();
+ }
+
+ static public DeviceInformation GetDeviceInformation(int id)
+ {
+ if (id < _deviceDB.Count)
+ return _deviceDB[id];
+
+ return null;
+ }
+
+ static public DeviceInformation GetDeviceInformation (string readername)
+ {
+ foreach (DeviceInformation item in _deviceDB)
+ {
+ if (item.Id == readername)
+ return item;
+ }
+
+ return null;
+ }
+
+ static public List GetAllDeviceInformation ()
+ {
+ return _deviceDB;
+ }
+
+ static private async void DeviceWatcher_Added(DeviceWatcher sender, Windows.Devices.Enumeration.DeviceInformation deviceInfo)
+ {
+ Debug.WriteLine(String.Format("Added {0}{1}", deviceInfo.Id, deviceInfo.Name));
+
+ // Protect against race condition if the task runs after the app stopped the deviceWatcher.
+ if (sender == deviceWatcher)
+ {
+ CSLibrary.DeviceFinder.DeviceInfomation di = new CSLibrary.DeviceFinder.DeviceInfomation();
+ di.deviceName = deviceInfo.Name;
+ di.ID = (uint)_deviceDB.Count;
+ di.nativeDeviceInformation = (object)deviceInfo;
+
+ _deviceDB.Add(deviceInfo);
+
+ RaiseEvent(OnSearchCompleted, new DeviceFinderArgs(di));
+ }
+ }
+
+ static private async void DeviceWatcher_Updated(DeviceWatcher sender, DeviceInformationUpdate deviceInfoUpdate)
+ {
+ }
+
+ static private async void DeviceWatcher_Removed(DeviceWatcher sender, DeviceInformationUpdate deviceInfoUpdate)
+ {
+ }
+
+ static private async void DeviceWatcher_EnumerationCompleted(DeviceWatcher sender, object e)
+ {
+ }
+
+ static private async void DeviceWatcher_Stopped(DeviceWatcher sender, object e)
+ {
+ }
+
+ static private void RaiseEvent(EventHandler eventHandler, T e)
+ where T : EventArgs
+ {
+ if (eventHandler != null)
+ {
+ eventHandler(null, e);
+ }
+ return;
+ }
+ }
+
+}
+
+#endif
diff --git a/Library/CSLibrary/Source/HAL/Plugin.BLE/CodeFileBLE.cs b/Library/CSLibrary/Source/HAL/Plugin.BLE/CodeFileBLE.cs
new file mode 100644
index 0000000..339c88f
--- /dev/null
+++ b/Library/CSLibrary/Source/HAL/Plugin.BLE/CodeFileBLE.cs
@@ -0,0 +1,277 @@
+/*
+Copyright (c) 2018 Convergence Systems Limited
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Threading.Tasks;
+using Plugin.BLE.Abstractions;
+using Plugin.BLE.Abstractions.Contracts;
+using Plugin.BLE.Abstractions.EventArgs;
+
+namespace CSLibrary
+{
+ using static RFIDDEVICE;
+ using Constants;
+ using System.Linq;
+
+ public partial class HighLevelInterface
+ {
+ // for bluetooth Connection
+ // for bluetooth Connectiond
+ IAdapter _adapter;
+ IDevice _device;
+ IService _service;
+ IService _serviceDeviceInfo;
+ ICharacteristic _characteristicWrite;
+ ICharacteristic _characteristicUpdate;
+ ICharacteristic _characteristicDeviceInfoRead;
+ MODEL _deviceType = MODEL.UNKNOWN;
+
+ ///
+ /// return error code
+ ///
+ ///
+ int BLE_Init()
+ {
+ return 0;
+ }
+
+ public async Task ConnectAsync(IAdapter adapter, IDevice device, MODEL deviceType)
+ {
+ if (_readerState != READERSTATE.DISCONNECT)
+ return false; // reader can not reconnect
+
+ this._deviceType = deviceType;
+
+ try
+ {
+ switch (_deviceType)
+ {
+ case MODEL.CS108:
+ _service = await device.GetServiceAsync(Guid.Parse("00009800-0000-1000-8000-00805f9b34fb"));
+ break;
+
+ case MODEL.CS710S:
+ await device.RequestMtuAsync(255); // for BLE 5.0
+ _service = await device.GetServiceAsync(Guid.Parse("00009802-0000-1000-8000-00805f9b34fb"));
+ break;
+ }
+
+ if (_service == null)
+ return false;
+
+ _serviceDeviceInfo = await device.GetServiceAsync(Guid.Parse("0000180a-0000-1000-8000-00805f9b34fb"));
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ }
+
+ _readerState = READERSTATE.IDLE;
+
+ _adapter = adapter;
+ _device = device;
+
+ _adapter.DeviceConnectionLost -= OnDeviceConnectionLost;
+ _adapter.DeviceConnectionLost += OnDeviceConnectionLost;
+
+ try
+ {
+ _characteristicWrite = await _service.GetCharacteristicAsync(Guid.Parse("00009900-0000-1000-8000-00805f9b34fb"));
+ _characteristicUpdate = await _service.GetCharacteristicAsync(Guid.Parse("00009901-0000-1000-8000-00805f9b34fb"));
+ _characteristicWrite = await _service.GetCharacteristicAsync(Guid.Parse("00009900-0000-1000-8000-00805f9b34fb"));
+
+ if (_serviceDeviceInfo != null)
+ {
+ _characteristicDeviceInfoRead = await _serviceDeviceInfo.GetCharacteristicAsync(Guid.Parse("00002a23-0000-1000-8000-00805f9b34fb"));
+
+ await _characteristicDeviceInfoRead.ReadAsync();
+
+ if (_characteristicDeviceInfoRead?.Value.Count() == 8)
+ {
+ _MacAdd = _characteristicDeviceInfoRead?.Value[7].ToString("X2") +
+ _characteristicDeviceInfoRead?.Value[6].ToString("X2") +
+ _characteristicDeviceInfoRead?.Value[5].ToString("X2") +
+ _characteristicDeviceInfoRead?.Value[2].ToString("X2") +
+ _characteristicDeviceInfoRead?.Value[1].ToString("X2") +
+ _characteristicDeviceInfoRead?.Value[0].ToString("X2");
+ ;
+
+ //CSLibrary.Debug.WriteLine("BLE Mac Addres : " + _MacAdd);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("Can not set characters");
+ }
+
+ _characteristicUpdate.ValueUpdated -= BLE_Recv;
+ _characteristicUpdate.ValueUpdated += BLE_Recv;
+ // _characteristicWrite.ValueUpdated += CharacteristicOnWriteUpdated;
+
+ //CSLibraryv4: wait for new ble library compatibility
+ BTTimer = new Timer(TimerFunc, this, 0, 1000);
+
+ await _characteristicUpdate.StartUpdatesAsync();
+ // await _characteristicWrite.StartUpdatesAsync();
+
+ _readerState = READERSTATE.IDLE;
+ BTTimer = new Timer(TimerFunc, this, 0, 1000);
+
+ HardwareInit();
+
+ return true;
+ }
+
+ public async Task DisconnectAsync()
+ {
+ try
+ {
+ if (Status != READERSTATE.IDLE)
+ return false;
+
+ if (_readerState != READERSTATE.DISCONNECT)
+ {
+ BARCODEPowerOff();
+ //CSLibraryv4: clear connection without waiting for BLE readiness
+ //WhenBLEFinish(ClearConnection);
+ await ClearConnection();
+ }
+ else
+ {
+ await ClearConnection();
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("Disconnect error " + ex.Message.ToString());
+ }
+
+ return true;
+ }
+
+ ///
+ /// return error code
+ ///
+ ///
+ private async Task BLE_Send (byte[] data)
+ {
+ return await _characteristicWrite.WriteAsync(data);
+ }
+
+ private async void BLE_Recv(object sender, CharacteristicUpdatedEventArgs characteristicUpdatedEventArgs)
+ {
+ try
+ {
+ byte[] data = characteristicUpdatedEventArgs.Characteristic.Value;
+ if (data == null)
+ return;
+
+ CSLibrary.Debug.WriteBytes("BT data received", data);
+ CharacteristicOnValueUpdated(data);
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ }
+ }
+
+ private void CharacteristicOnWriteUpdated(object sender, CharacteristicUpdatedEventArgs characteristicUpdatedEventArgs)
+ {
+ CSLibrary.Debug.WriteBytes("BT: Write data success updated", characteristicUpdatedEventArgs.Characteristic.Value);
+ }
+
+ private void OnStateChanged(object sender, BluetoothStateChangedArgs e)
+ {
+ }
+
+ private void OnDeviceConnectionLost(object sender, DeviceErrorEventArgs e)
+ {
+ if (e.Device.Id == _device.Id)
+ {
+ //DisconnectAsync();
+ ConnectLostAsync();
+ }
+ }
+
+ public async void ConnectLostAsync()
+ {
+ _readerState = READERSTATE.READYFORDISCONNECT;
+
+ _characteristicUpdate.ValueUpdated -= BLE_Recv;
+ _adapter.DeviceConnectionLost -= OnDeviceConnectionLost;
+
+ _characteristicUpdate = null;
+ _characteristicWrite = null;
+ _service = null;
+
+ try
+ {
+
+ if (_device.State == DeviceState.Connected)
+ {
+ await _adapter.DisconnectDeviceAsync(_device);
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ }
+ _device = null;
+
+ _readerState = READERSTATE.DISCONNECT;
+
+ FireReaderStateChangedEvent(new Events.OnReaderStateChangedEventArgs(null, Constants.ReaderCallbackType.CONNECTION_LOST));
+ }
+
+ async Task ClearConnection()
+ {
+ _readerState = READERSTATE.READYFORDISCONNECT;
+ // Stop Timer;
+ await _characteristicUpdate.StopUpdatesAsync();
+
+ _characteristicUpdate.ValueUpdated -= BLE_Recv;
+ _adapter.DeviceConnectionLost -= OnDeviceConnectionLost;
+
+ _characteristicUpdate = null;
+ _characteristicWrite = null;
+ _service = null;
+
+ try
+ {
+ if (_device.State == DeviceState.Connected)
+ {
+ await _adapter.DisconnectDeviceAsync(_device);
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("Program execption error, please check!!! error message : " + ex.Message);
+ }
+ _device = null;
+
+ _readerState = READERSTATE.DISCONNECT;
+ }
+
+ }
+}
diff --git a/Library/CSLibrary/Source/HAL/btframework/ClassDeviceFinder.cs b/Library/CSLibrary/Source/HAL/btframework/ClassDeviceFinder.cs
index 9e9483e..e111b0a 100644
--- a/Library/CSLibrary/Source/HAL/btframework/ClassDeviceFinder.cs
+++ b/Library/CSLibrary/Source/HAL/btframework/ClassDeviceFinder.cs
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
-
+
using wclCommon;
using wclBluetooth;
@@ -124,10 +124,14 @@ public class DeviceInfomation
}
static List _deviceDB = new List();
+ static List _deviceTypeDB = new List();
static public event EventHandler OnSearchCompleted;
+ static bool _macAddressFiltering = true;
- static public void SearchDevice()
+ static public void SearchDevice(bool macAddressFiltering = true)
{
+ ClearDeviceList();
+ _macAddressFiltering = macAddressFiltering;
if (Manager == null)
{
Manager = new wclBluetoothManager();
@@ -147,7 +151,7 @@ static public void SearchDevice()
if (Radio != null)
{
- Int32 Res = Radio.Discover(3, wclBluetoothDiscoverKind.dkBle);
+ Int32 Res = Radio.Discover(6, wclBluetoothDiscoverKind.dkBle);
if (Res != wclErrors.WCL_E_SUCCESS)
CSLibrary.Debug.WriteLine ("Error starting discovering: 0x" + Res.ToString("X8"));
}
@@ -216,6 +220,7 @@ static public void Disconnect()
static public void ClearDeviceList()
{
_deviceDB.Clear ();
+ _deviceTypeDB.Clear ();
}
static public object GetDeviceInformation(int id)
@@ -226,6 +231,14 @@ static public object GetDeviceInformation(int id)
return null;
}
+ static public CSLibrary.RFIDDEVICE.MODEL GetDeviceModel(int id)
+ {
+ if (id < _deviceTypeDB.Count)
+ return _deviceTypeDB[id];
+
+ return CSLibrary.RFIDDEVICE.MODEL.UNKNOWN;
+ }
+
static public object GetDeviceInformation (string readername)
{
foreach (long item in _deviceDB)
@@ -264,25 +277,91 @@ static void Manager_OnDeviceFound(object Sender, wclBluetoothRadio Radio, long A
case wclBluetoothDeviceType.dtBle:
{
CSLibrary.DeviceFinder.DeviceInfomation di = new CSLibrary.DeviceFinder.DeviceInfomation();
- string DevName;
- sbyte RSSI;
-
- Res = Radio.GetRemoteRssi(Address, out RSSI);
- if (Res != wclErrors.WCL_E_SUCCESS)
- RSSI = 0;
- Res = Radio.GetRemoteName(Address, out DevName);
- if (Res != wclErrors.WCL_E_SUCCESS)
- di.deviceName = DevName = "Error: 0x" + Res.ToString("X8");
- else
- di.deviceName = DevName;
-
- di.ID = (uint)_deviceDB.Count;
- di.macAdd = Address;
- di.nativeDeviceInformation = null;
-
- _deviceDB.Add(Address);
- RaiseEvent(OnSearchCompleted, new DeviceFinderArgs(di));
+ long filtering = Address | 0xffffff;
+ bool isCS108 = ((filtering == 0x3ca308ffffff) ||
+ (filtering == 0x6c79b8ffffff) ||
+ (filtering == 0x7C010Affffff) ||
+ (filtering == 0xC8FD19ffffff));
+ bool isCS710S = (filtering == 0x84c692ffffff);
+
+ if (isCS108 || isCS710S)
+ {
+ string DevName;
+ Res = Radio.GetRemoteName(Address, out DevName);
+ if (Res == wclErrors.WCL_E_SUCCESS)
+ {
+ di.deviceName = DevName;
+
+ di.ID = (uint)_deviceDB.Count;
+ di.macAdd = Address;
+ di.nativeDeviceInformation = null;
+
+ _deviceDB.Add(Address);
+ if (isCS108)
+ {
+ _deviceTypeDB.Add(RFIDDEVICE.MODEL.CS108);
+ }
+ else if (isCS710S)
+ {
+ _deviceTypeDB.Add(RFIDDEVICE.MODEL.CS710S);
+ }
+
+ RaiseEvent(OnSearchCompleted, new DeviceFinderArgs(di));
+ }
+ }
+ else if (!_macAddressFiltering)
+ {
+ string DevName;
+ Res = Radio.GetRemoteName(Address, out DevName);
+
+ if (Res == wclErrors.WCL_E_SUCCESS &&
+ (!(DevName.Length > 10 && DevName.Substring(0, 10) == "Bluetooth ")))
+ {
+ di.deviceName = DevName;
+ di.ID = (uint)_deviceDB.Count;
+ di.macAdd = Address;
+ di.nativeDeviceInformation = null;
+
+ _deviceDB.Add(Address);
+ _deviceTypeDB.Add(RFIDDEVICE.MODEL.UNKNOWN);
+
+ RaiseEvent(OnSearchCompleted, new DeviceFinderArgs(di));
+ }
+ }
+
+ /*
+ case wclBluetoothDeviceType.dtBle:
+ {
+ CSLibrary.DeviceFinder.DeviceInfomation di = new CSLibrary.DeviceFinder.DeviceInfomation();
+ string DevName;
+ sbyte RSSI;
+
+ Res = Radio.GetRemoteRssi(Address, out RSSI);
+ if (Res != wclErrors.WCL_E_SUCCESS)
+ RSSI = 0;
+ Res = Radio.GetRemoteName(Address, out DevName);
+ if (Res != wclErrors.WCL_E_SUCCESS)
+ di.deviceName = DevName = "Error: 0x" + Res.ToString("X8");
+ else
+ {
+ if (!(DevName.Length > 10 && DevName.Substring(0, 10) == "Bluetooth "))
+ {
+ di.deviceName = DevName;
+
+ di.ID = (uint)_deviceDB.Count;
+ di.macAdd = Address;
+ di.nativeDeviceInformation = null;
+
+ _deviceDB.Add(Address);
+ //_deviceTypeDB.Add(RFIDDEVICE.MODEL.CS108);
+ _deviceTypeDB.Add(RFIDDEVICE.MODEL.CS710S);
+
+ RaiseEvent(OnSearchCompleted, new DeviceFinderArgs(di));
+ }
+ }
+ }
+ */
}
break;
}
diff --git a/Library/CSLibrary/Source/HAL/btframework/CodeFileBLE.cs b/Library/CSLibrary/Source/HAL/btframework/CodeFileBLE.cs
index c9392d4..79233bb 100644
--- a/Library/CSLibrary/Source/HAL/btframework/CodeFileBLE.cs
+++ b/Library/CSLibrary/Source/HAL/btframework/CodeFileBLE.cs
@@ -243,8 +243,9 @@ async Task ClearConnection()
while (Res != wclErrors.WCL_E_SUCCESS && errCnt++ < 20)
{
Res = Client.Disconnect();
- //if (Res != wclErrors.WCL_E_SUCCESS)
+ if (Res != wclErrors.WCL_E_SUCCESS)
CSLibrary.Debug.WriteLine("Disconnect Error: 0x" + Res.ToString("X8"));
+
}
_readerState = READERSTATE.DISCONNECT;
diff --git a/Library/CSLibrary/Source/Notification/ClassNotification.cs b/Library/CSLibrary/Source/Notification/ClassNotification.cs
index 4b4296e..c01aa87 100644
--- a/Library/CSLibrary/Source/Notification/ClassNotification.cs
+++ b/Library/CSLibrary/Source/Notification/ClassNotification.cs
@@ -145,53 +145,23 @@ internal void DeviceRecvState(int value)
if (OnKeyEvent == null)
return;
- switch (value)
+ try
{
- case 0: // button on
- OnKeyEvent(_deviceHandler, new Notification.HotKeyEventArgs(Key.BUTTON, true));
- break;
+ switch (value)
+ {
+ case 0: // button on
+ OnKeyEvent(_deviceHandler, new Notification.HotKeyEventArgs(Key.BUTTON, true));
+ break;
- case 1: // button off
- OnKeyEvent(_deviceHandler, new Notification.HotKeyEventArgs(Key.BUTTON, false));
- break;
+ case 1: // button off
+ OnKeyEvent(_deviceHandler, new Notification.HotKeyEventArgs(Key.BUTTON, false));
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("DeviceRecvState Error : " + ex.Message);
}
-
- /*
- switch (value)
- {
- case 0: // button on
- if (!_receiveOffWithin1s)
- {
- OnKeyEvent(_deviceHandler, new Notification.HotKeyEventArgs(Key.BUTTON, true));
- }
- else
- {
- _receiveOnWithinOffcycle = true;
- }
- break;
-
- case 1: // button off
- if (!_receiveOffWithin1s)
- {
- _receiveOffWithin1s = true;
- OnKeyEvent(_deviceHandler, new Notification.HotKeyEventArgs(Key.BUTTON, false));
-
- System.Threading.Tasks.Task.Run(async () =>
- {
- await System.Threading.Tasks.Task.Delay(1000);
- _receiveOffWithin1s = false;
- if (_receiveOnWithinOffcycle)
- {
- OnKeyEvent(_deviceHandler, new Notification.HotKeyEventArgs(Key.BUTTON, true));
- _receiveOnWithinOffcycle = false;
- }
- });
-
- }
- break;
- }
- */
-
}
public uint GetCurrentBatteryLevel()
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.Public.Operation.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.Public.Operation.cs
index 7174aa5..42cc921 100644
--- a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.Public.Operation.cs
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.Public.Operation.cs
@@ -59,6 +59,7 @@ internal Result StartOperation_CS108(Operation opertion)
InventoryDebug.Clear();
switch (opertion)
{
+ case Operation.Kiloway_RANGING:
case Operation.TAG_RANGING: // Enable get battery level by interrupt
_deviceHandler.battery.EnableAutoBatteryLevel();
TagRangingThreadProc_CS108();
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.cs
index 0be261f..7f17023 100644
--- a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.cs
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.cs
@@ -173,6 +173,8 @@ bool R2000Packet_NewInventory(byte[] recvData, int offset = 0)
bool R2000Packet_Inventory (byte [] recvData, int offset = 0)
{
+ try
+ {
if (OnAsyncCallback != null)
{
CSLibrary.Structures.TagCallbackInfo info = new CSLibrary.Structures.TagCallbackInfo();
@@ -313,6 +315,7 @@ bool R2000Packet_Inventory (byte [] recvData, int offset = 0)
switch (CurrentOperation)
{
+ case Operation.Kiloway_RANGING:
case Operation.TAG_RANGING:
{
CSLibrary.Constants.CallbackType type = CSLibrary.Constants.CallbackType.TAG_RANGING;
@@ -373,7 +376,12 @@ bool R2000Packet_Inventory (byte [] recvData, int offset = 0)
return false;
}
}
-
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("R2000Packet_Inventory Error : " + ex.Message);
+ return false;
+ }
return true;
}
@@ -587,13 +595,15 @@ public bool CheckValidRFIDPacket(ref byte [] packetHeader)
///
internal CSLibrary.HighLevelInterface.BTWAITCOMMANDRESPONSETYPE DeviceRecvData_CS108(byte[] recvData1, HighLevelInterface.BTWAITCOMMANDRESPONSETYPE currentCommandResponse)
{
+ CSLibrary.HighLevelInterface.BTWAITCOMMANDRESPONSETYPE result = HighLevelInterface.BTWAITCOMMANDRESPONSETYPE.NOWAIT;
+
+ try
+ {
CSLibrary.Debug.WriteLine("Routine : DeviceRecvData");
if (!_dataBuffer.DataIn(recvData1, 10, recvData1[2] - 2))
CSLibrary.Debug.WriteLine("RFID ring buffer FULL!!!!");
- CSLibrary.HighLevelInterface.BTWAITCOMMANDRESPONSETYPE result = HighLevelInterface.BTWAITCOMMANDRESPONSETYPE.NOWAIT;
-
while (_dataBuffer.length >= 8)
{
byte[] recvData = _dataBuffer.DataPreOut(8);
@@ -993,7 +1003,11 @@ internal CSLibrary.HighLevelInterface.BTWAITCOMMANDRESPONSETYPE DeviceRecvData_C
break;
}
}
-
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("DeviceRecvData_CS108 Error : " + ex.Message);
+ }
return result;
}
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.Public.Operation.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.Public.Operation.cs
index bea1e04..8c2f0d7 100644
--- a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.Public.Operation.cs
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.Public.Operation.cs
@@ -40,6 +40,41 @@ internal Result StartOperation_CS710S(Operation opertion)
InventoryDebug.Clear();
switch (opertion)
{
+ case Operation.Kiloway_RANGING: // Spical Kiloway LED Inventory
+ _deviceHandler.battery.EnableAutoBatteryLevel();
+
+ _currentTagRanging = Options.TagRanging.Clone();
+
+ RFIDRegister.AntennaPortConfig.FastIdEnable(Options.TagRanging.fastid);
+ RFIDRegister.AntennaPortConfig.TagFocusEnable(Options.TagRanging.focus);
+ if (m_rdr_opt_parms.TagRanging.multibanks == 0)
+ {
+ if ((Options.TagRanging.flags & SelectFlags.FILTER) == 0X00 && (Options.TagRanging.flags & SelectFlags.SELECT) == 0x00)
+ {
+ //RFIDRegister.AntennaPortConfig.TagGroup(0, 3, 0);
+ RFIDStartCompactInventory();
+ }
+ else
+ {
+ RFIDRegister.AntennaPortConfig.TagGroup(0, 3, 0, 0xffff);
+ RFIDStartSelectCompactInventory();
+ }
+ }
+ else
+ {
+ if ((Options.TagRanging.flags & SelectFlags.FILTER) == 0X00 && (Options.TagRanging.flags & SelectFlags.SELECT) == 0x00)
+ {
+ //RFIDRegister.AntennaPortConfig.TagGroup(0, 3, 0);
+ RFIDStartKilowayMBInventory();
+ }
+ else
+ {
+ RFIDRegister.AntennaPortConfig.TagGroup(0, 3, 0, 0xffff);
+ RFIDStartKilowaySelectMBInventory();
+ }
+ }
+ break;
+
case Operation.TAG_EXESEARCHING: // phase out for backward compatible
case Operation.TAG_EXERANGING: // phase out for backward compatible
case Operation.TAG_RANGING: // Enable get battery level by interrupt
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.UnifiedAPI.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.UnifiedAPI.cs
index 5a27ace..5a1f788 100644
--- a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.UnifiedAPI.cs
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.UnifiedAPI.cs
@@ -26,12 +26,12 @@ namespace CSLibrary
{
public partial class RFIDReader
{
- public void StopOperation_CS710S(bool value = true)
+ internal void StopOperation_CS710S(bool value = true)
{
RFIDStopOperation();
}
- public bool SetDuplicateEliminationRollingWindow_CS710S(uint s)
+ internal bool SetDuplicateEliminationRollingWindow_CS710S(uint s)
{
if (s > 255)
return false;
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.cs
index 97427d1..533ea65 100644
--- a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.cs
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.cs
@@ -82,7 +82,7 @@ void ReadRegister_packet_proc(byte[] data, int index)
int size = (data[15] << 8) + (data[16]);
- if (size > 0xa0)
+ if (size == 101) // OEM packet data len
SaveInitRegisters(index, data, size);
//else
// SaveRegister(17, data, size);
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.Public.InventoryOptions.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.Public.InventoryOptions.cs
new file mode 100644
index 0000000..4ad8eec
--- /dev/null
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.Public.InventoryOptions.cs
@@ -0,0 +1,56 @@
+/*
+Copyright (c) 2018 Convergence Systems Limited
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CSLibrary
+{
+ using static RFIDDEVICE;
+ using static FrequencyBand;
+ using Constants;
+
+ public partial class RFIDReader
+ {
+ /*
+ ///
+ /// Special function for set multi bank inventory without reply
+ ///
+ public Result SetMultiBankInventoryNoReply(int index)
+ {
+ switch (_deviceType)
+ {
+ case MODEL.CS710S:
+ if (index < 0 || index > 2)
+ return Result.NOT_SUPPORTED;
+
+ RFIDRegister.MultibankReadConfig.SetNoReply((byte)index);
+ return Result.OK;
+ }
+
+ return Result.NOT_SUPPORTED;
+ }
+ */
+ }
+}
\ No newline at end of file
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.cs
index 1553cc5..0cfcef3 100644
--- a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.cs
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.cs
@@ -168,8 +168,17 @@ public string GetCountryCode()
*/
public string GetPCBAssemblyCode()
- {
- return m_PCBAssemblyCode;
+ {
+ switch (_deviceType)
+ {
+ case MODEL.CS108:
+ return m_PCBAssemblyCode;
+
+ case MODEL.CS710S:
+ return RFIDRegister.EF9C.value;
+ }
+
+ return "";
}
internal static void ArrayCopy(byte[] src, int srcOffset, UInt16[] dest, int destOffset, int byteSize)
@@ -425,6 +434,11 @@ internal void Reconnect()
return;
}
+ internal void Disconnect()
+ {
+ _deviceType = MODEL.UNKNOWN;
+ }
+
public string GetFirmwareVersionString()
{
switch (_deviceType)
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/CSLibrary.Constants.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/CSLibrary.Constants.cs
index 60b163d..836a8dd 100644
--- a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/CSLibrary.Constants.cs
+++ b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/CSLibrary.Constants.cs
@@ -1250,6 +1250,11 @@ public enum Operation : int
FM13DT_OPMODECHK,
FM13DT_INITIALREGFILE,
FM13DT_LEDCTRL,
+
+ ///
+ /// for Kiloway Tag
+ ///
+ Kiloway_RANGING,
}
///
/// Memory bank
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/Intel.Constants.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/Intel.Constants.cs
index 7493754..ddc77b9 100644
Binary files a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/Intel.Constants.cs and b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Constants/Intel.Constants.cs differ
diff --git a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Structures/CSLibrary.Structures.cs b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Structures/CSLibrary.Structures.cs
index 725a18d..958c061 100644
Binary files a/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Structures/CSLibrary.Structures.cs and b/Library/CSLibrary/Source/RFIDReader/CSLUnifiedAPI/Basic_Structures/CSLibrary.Structures.cs differ
diff --git a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.OperationCommands.cs b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.OperationCommands.cs
index 9e57d4c..e86480d 100644
--- a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.OperationCommands.cs
+++ b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.OperationCommands.cs
@@ -114,6 +114,7 @@ internal void RFIDStartMBInventory()
{
int index = 0;
+ m_rdr_opt_parms.TagRanging.multibankswithreply = m_rdr_opt_parms.TagRanging.multibanks;
if (m_rdr_opt_parms.TagRanging.multibanks > 0)
{
RFIDRegister.MultibankReadConfig.Set(0, true, (int)m_rdr_opt_parms.TagRanging.bank1, m_rdr_opt_parms.TagRanging.offset1, m_rdr_opt_parms.TagRanging.count1);
@@ -134,6 +135,7 @@ internal void RFIDStartSelectMBInventory()
{
int index = 0;
+ m_rdr_opt_parms.TagRanging.multibankswithreply = m_rdr_opt_parms.TagRanging.multibanks;
if (m_rdr_opt_parms.TagRanging.multibanks > 0)
{
RFIDRegister.MultibankReadConfig.Set(0, true, (int)m_rdr_opt_parms.TagRanging.bank1, m_rdr_opt_parms.TagRanging.offset1, m_rdr_opt_parms.TagRanging.count1);
@@ -150,6 +152,92 @@ internal void RFIDStartSelectMBInventory()
RunShortOperation(SCSLRFIDCMD.SCSLRFIDStartSelectMBInventory);
}
+ internal void RFIDStartKilowayMBInventory()
+ {
+ int index = 0;
+
+ m_rdr_opt_parms.TagRanging.multibankswithreply = m_rdr_opt_parms.TagRanging.multibanks;
+ if (m_rdr_opt_parms.TagRanging.multibanks > 0)
+ {
+ RFIDRegister.MultibankReadConfig.Set(0, true, (int)m_rdr_opt_parms.TagRanging.bank1, m_rdr_opt_parms.TagRanging.offset1, m_rdr_opt_parms.TagRanging.count1);
+ if (m_rdr_opt_parms.TagRanging.bank1 == CSLibrary.Constants.MemoryBank.BANK0 && m_rdr_opt_parms.TagRanging.offset1 == 4 && m_rdr_opt_parms.TagRanging.count1 == 1)
+ {
+ RFIDRegister.MultibankReadConfig.SetNoReply(0);
+ m_rdr_opt_parms.TagRanging.multibankswithreply--;
+ }
+
+ if (m_rdr_opt_parms.TagRanging.multibanks > 1)
+ {
+ RFIDRegister.MultibankReadConfig.Set(1, true, (int)m_rdr_opt_parms.TagRanging.bank2, m_rdr_opt_parms.TagRanging.offset2, m_rdr_opt_parms.TagRanging.count2);
+ if (m_rdr_opt_parms.TagRanging.bank2 == CSLibrary.Constants.MemoryBank.BANK0 && m_rdr_opt_parms.TagRanging.offset2 == 4 && m_rdr_opt_parms.TagRanging.count2 == 1)
+ {
+ RFIDRegister.MultibankReadConfig.SetNoReply(1);
+ m_rdr_opt_parms.TagRanging.multibankswithreply--;
+ }
+ }
+
+
+ if (m_rdr_opt_parms.TagRanging.multibanks > 2)
+ {
+ RFIDRegister.MultibankReadConfig.Set(2, true, (int)m_rdr_opt_parms.TagRanging.bank3, m_rdr_opt_parms.TagRanging.offset3, m_rdr_opt_parms.TagRanging.count3);
+ if (m_rdr_opt_parms.TagRanging.bank3 == CSLibrary.Constants.MemoryBank.BANK0 && m_rdr_opt_parms.TagRanging.offset3 == 4 && m_rdr_opt_parms.TagRanging.count3 == 1)
+ {
+ RFIDRegister.MultibankReadConfig.SetNoReply(2);
+ m_rdr_opt_parms.TagRanging.multibankswithreply--;
+ }
+ }
+ index = (int)m_rdr_opt_parms.TagRanging.multibanks;
+ }
+
+ for (; index < 3; index++)
+ RFIDRegister.MultibankReadConfig.Enable((byte)index, false);
+
+ RunShortOperation(SCSLRFIDCMD.SCSLRFIDStartMBInventory);
+ }
+
+ internal void RFIDStartKilowaySelectMBInventory()
+ {
+ int index = 0;
+
+ m_rdr_opt_parms.TagRanging.multibankswithreply = m_rdr_opt_parms.TagRanging.multibanks;
+ if (m_rdr_opt_parms.TagRanging.multibanks > 0)
+ {
+ RFIDRegister.MultibankReadConfig.Set(0, true, (int)m_rdr_opt_parms.TagRanging.bank1, m_rdr_opt_parms.TagRanging.offset1, m_rdr_opt_parms.TagRanging.count1);
+ if (m_rdr_opt_parms.TagRanging.bank1 == CSLibrary.Constants.MemoryBank.BANK0 && m_rdr_opt_parms.TagRanging.offset1 == 4 && m_rdr_opt_parms.TagRanging.count1 == 1)
+ {
+ RFIDRegister.MultibankReadConfig.SetNoReply(0);
+ m_rdr_opt_parms.TagRanging.multibankswithreply--;
+ }
+
+ if (m_rdr_opt_parms.TagRanging.multibanks > 1)
+ {
+ RFIDRegister.MultibankReadConfig.Set(1, true, (int)m_rdr_opt_parms.TagRanging.bank2, m_rdr_opt_parms.TagRanging.offset2, m_rdr_opt_parms.TagRanging.count2);
+ if (m_rdr_opt_parms.TagRanging.bank2 == CSLibrary.Constants.MemoryBank.BANK0 && m_rdr_opt_parms.TagRanging.offset2 == 4 && m_rdr_opt_parms.TagRanging.count2 == 1)
+ {
+ RFIDRegister.MultibankReadConfig.SetNoReply(1);
+ m_rdr_opt_parms.TagRanging.multibankswithreply--;
+ }
+ }
+
+ if (m_rdr_opt_parms.TagRanging.multibanks > 2)
+ {
+ RFIDRegister.MultibankReadConfig.Set(2, true, (int)m_rdr_opt_parms.TagRanging.bank3, m_rdr_opt_parms.TagRanging.offset3, m_rdr_opt_parms.TagRanging.count3);
+ if (m_rdr_opt_parms.TagRanging.bank3 == CSLibrary.Constants.MemoryBank.BANK0 && m_rdr_opt_parms.TagRanging.offset3 == 4 && m_rdr_opt_parms.TagRanging.count3 == 1)
+ {
+ RFIDRegister.MultibankReadConfig.SetNoReply(2);
+ m_rdr_opt_parms.TagRanging.multibankswithreply--;
+ }
+ }
+
+ index = (int)m_rdr_opt_parms.TagRanging.multibanks;
+ }
+
+ for (; index < 3; index++)
+ RFIDRegister.MultibankReadConfig.Enable((byte)index, false);
+
+ RunShortOperation(SCSLRFIDCMD.SCSLRFIDStartSelectMBInventory);
+ }
+
internal void RFIDStartSelectCompactInventory()
{
RunShortOperation(SCSLRFIDCMD.SCSLRFIDStartSelectCompactInventory);
diff --git a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.Registers.cs b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.Registers.cs
index 1b000c8..93230e7 100644
--- a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.Registers.cs
+++ b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.Registers.cs
@@ -1115,7 +1115,7 @@ internal void Enable(byte index, bool enable)
if (data[add] == newValue)
return;
-
+
data[add] = newValue;
sendData[0] = data[add];
@@ -1151,8 +1151,26 @@ internal void Set(int index, bool enable, int bank, int address, int len)
}
}
- }
+ internal void SetNoReply(byte index)
+ {
+ if (Private == REGPRIVATE.READONLY)
+ return;
+
+ byte[] sendData = new byte[1];
+ int add = (index * 7);
+
+ byte newValue = 2;
+
+ if (data[add] == newValue)
+ return;
+
+ data[add] = newValue;
+
+ sendData[0] = data[add];
+ _handler.WriteRegister((UInt16)(regAdd + add), sendData);
+ }
+ }
internal class RegMultibankWriteConfig
{
internal RFIDReader _RFIDhandler;
@@ -1335,67 +1353,67 @@ internal class CSLRFIDREGISTER
{
internal RFIDReader _handler;
- internal RegUInt32 CommandResult;
- internal RegUInt16 ResetCause;
- internal RegUInt16 Status;
+ //internal RegUInt32 CommandResult;
+ //internal RegUInt16 ResetCause;
+ //internal RegUInt16 Status;
internal Regstring VersionString;
internal Regstring BuildNumber;
- internal RegUInt32 Githash;
- internal Regstring SerialNumber;
- internal RegUInt32 FrefFreq;
- internal RegUInt64 ProductSku;
- internal RegUInt32 DeviceInfo;
- internal RegUInt32 DeviceBuild;
- internal RegUInt32 RtlRevision;
- internal Regbyte InterruptMask;
- internal RegUInt32 InterruptMaskSet;
- internal RegUInt32 InterruptMaskClear;
- internal Regbyte InterruptStatus;
- internal RegUInt16 EventFifoNumBytes;
- internal RegUInt16 EventFifoIntLevel;
- internal RegUInt32 GpioOutputEnable;
- internal RegUInt32 GpioOutputLevel;
- internal Regbyte OpsControl;
- internal RegUInt32 OpsStatus;
- internal RegUInt32 HaltedControl;
- internal RegUInt32 HaltedStatus;
- internal RegUInt32 LogTestPeriod;
- internal RegUInt32 LogTestWordRepeat;
- internal RegUInt32 EventFifoTestPeriod;
- internal RegUInt32 EventFifoTestPayloadNumWords;
- internal RegUInt16 LogSpeed;
- internal RegUInt16 LogEnables;
- internal RegUInt32 BerControl;
- internal Regbyte BerMode;
- internal RegUInt16 AuxAdcControl;
- internal RegUInt16 AuxAdcResults;
- internal RegUInt32 RfSynthesizerControl;
- internal RegUInt32 TxFineGain;
- internal RegUInt32 RxGainControl;
- internal RegUInt32 TxCoarseGain;
+ //internal RegUInt32 Githash;
+ //internal Regstring SerialNumber;
+ //internal RegUInt32 FrefFreq;
+ //internal RegUInt64 ProductSku;
+ //internal RegUInt32 DeviceInfo;
+ //internal RegUInt32 DeviceBuild;
+ //internal RegUInt32 RtlRevision;
+ //internal Regbyte InterruptMask;
+ //internal RegUInt32 InterruptMaskSet;
+ //internal RegUInt32 InterruptMaskClear;
+ //internal Regbyte InterruptStatus;
+ //internal RegUInt16 EventFifoNumBytes;
+ //internal RegUInt16 EventFifoIntLevel;
+ //internal RegUInt32 GpioOutputEnable;
+ //internal RegUInt32 GpioOutputLevel;
+ //internal Regbyte OpsControl;
+ //internal RegUInt32 OpsStatus;
+ //internal RegUInt32 HaltedControl;
+ //internal RegUInt32 HaltedStatus;
+ //internal RegUInt32 LogTestPeriod;
+ //internal RegUInt32 LogTestWordRepeat;
+ //internal RegUInt32 EventFifoTestPeriod;
+ //internal RegUInt32 EventFifoTestPayloadNumWords;
+ //internal RegUInt16 LogSpeed;
+ //internal RegUInt16 LogEnables;
+ //internal RegUInt32 BerControl;
+ //internal Regbyte BerMode;
+ //internal RegUInt16 AuxAdcControl;
+ //internal RegUInt16 AuxAdcResults;
+ //internal RegUInt32 RfSynthesizerControl;
+ //internal RegUInt32 TxFineGain;
+ //internal RegUInt32 RxGainControl;
+ //internal RegUInt32 TxCoarseGain;
//internal RegUInt32 RfMode;
- internal RegUInt32 DcOffset;
- internal RegUInt32 CwOffTime;
- internal Regbyte SjcControl;
- internal RegUInt32 SjcGainControl;
- internal RegUInt32 SjcSettlingTime;
- internal RegUInt32 SjcCdacI;
- internal RegUInt32 SjcCdacQ;
- internal RegUInt32 SjcResultI;
- internal RegUInt32 SjcResultQ;
- internal RegUInt32 AnalogEnable;
+ //internal RegUInt32 DcOffset;
+ //internal RegUInt32 CwOffTime;
+ //internal Regbyte SjcControl;
+ //internal RegUInt32 SjcGainControl;
+ //internal RegUInt32 SjcSettlingTime;
+ //internal RegUInt32 SjcCdacI;
+ //internal RegUInt32 SjcCdacQ;
+ //internal RegUInt32 SjcResultI;
+ //internal RegUInt32 SjcResultQ;
+ //internal RegUInt32 AnalogEnable;
//internal RegInventoryRoundControl InventoryRoundControl;
//internal RegUInt32 InventoryRoundControl_2;
- internal RegUInt16 NominalStopTime;
- internal RegUInt16 ExtendedStopTime;
- internal RegUInt16 RegulatoryStopTime;
- internal RegUInt16 Gen2SelectEnable;
- internal RegUInt16 Gen2AccessEnable;
- internal Regbyte Gen2Offsets;
- internal RegUInt16 Gen2Lengths;
- internal Regbyte Gen2TransactionIds;
- internal RegUInt32 Gen2TxnControls;
- internal RegByteArray Gen2TxBuffer;
+ //internal RegUInt16 NominalStopTime;
+ //internal RegUInt16 ExtendedStopTime;
+ //internal RegUInt16 RegulatoryStopTime;
+ //internal RegUInt16 Gen2SelectEnable;
+ //internal RegUInt16 Gen2AccessEnable;
+ //internal Regbyte Gen2Offsets;
+ //internal RegUInt16 Gen2Lengths;
+ //internal Regbyte Gen2TransactionIds;
+ //internal RegUInt32 Gen2TxnControls;
+ //internal RegByteArray Gen2TxBuffer;
internal RegUInt32 LoopStyle;
internal Regbyte HopStyle;
internal RegUInt16 RegulatoryNoEmissionTime;
@@ -1419,10 +1437,13 @@ internal class CSLRFIDREGISTER
internal RegUInt24 AuthenticateConfig;
internal RegByteArray AuthenticateMessage;
internal RegUInt16 AuthenticateResponseLen;
+ internal RegUInt16 ReversePowerADC;
+ internal Regbyte CurrentPort;
internal Regstring ModelName;
internal Regstring SerialNumber_1;
internal RegUInt16 CountryEnum_1;
internal RegUInt32 EF98;
+ internal Regstring EF9C;
internal RegUInt32 EFAC;
internal RegUInt32 EFB0;
@@ -1431,67 +1452,67 @@ public CSLRFIDREGISTER(RFIDReader _deviceHandler)
this._handler = _deviceHandler;
- CommandResult = new RegUInt32(_deviceHandler, 0x0000, REGPRIVATE.READONLY);
- ResetCause = new RegUInt16(_deviceHandler, 0x0004, REGPRIVATE.READONLY);
- Status = new RegUInt16(_deviceHandler, 0x0006, REGPRIVATE.READONLY);
+ //CommandResult = new RegUInt32(_deviceHandler, 0x0000, REGPRIVATE.READONLY);
+ //ResetCause = new RegUInt16(_deviceHandler, 0x0004, REGPRIVATE.READONLY);
+ //Status = new RegUInt16(_deviceHandler, 0x0006, REGPRIVATE.READONLY);
VersionString = new Regstring(_deviceHandler, 0x0008, 32, REGPRIVATE.READONLY);
BuildNumber = new Regstring(_deviceHandler, 00028, 4, REGPRIVATE.READONLY);
- Githash = new RegUInt32(_deviceHandler, 0x002c, REGPRIVATE.READONLY);
- SerialNumber = new Regstring(_deviceHandler, 0x0070, 32, REGPRIVATE.READONLY);
- FrefFreq = new RegUInt32(_deviceHandler, 0x0034, REGPRIVATE.READONLY);
- ProductSku = new RegUInt64(_deviceHandler, 0x0068, REGPRIVATE.READONLY);
- DeviceInfo = new RegUInt32(_deviceHandler, 0x0090, REGPRIVATE.READONLY);
- DeviceBuild = new RegUInt32(_deviceHandler, 0x0094, REGPRIVATE.READONLY);
- RtlRevision = new RegUInt32(_deviceHandler, 0x0098, REGPRIVATE.READONLY);
- InterruptMask = new Regbyte(_deviceHandler, 0x00a0, REGPRIVATE.READWRITE);
- InterruptMaskSet = new RegUInt32(_deviceHandler, 0x00a4, REGPRIVATE.WRITEONLY);
- InterruptMaskClear = new RegUInt32(_deviceHandler, 0x00a8, REGPRIVATE.WRITEONLY);
- InterruptStatus = new Regbyte(_deviceHandler, 0x00ac, REGPRIVATE.READONLY);
- EventFifoNumBytes = new RegUInt16(_deviceHandler, 0x00b0, REGPRIVATE.READONLY);
- EventFifoIntLevel = new RegUInt16(_deviceHandler, 0x00b2, REGPRIVATE.READWRITE);
- GpioOutputEnable = new RegUInt32(_deviceHandler, 0x00b4, REGPRIVATE.READWRITE);
- GpioOutputLevel = new RegUInt32(_deviceHandler, 0x00b8, REGPRIVATE.READWRITE);
- OpsControl = new Regbyte(_deviceHandler, 0x0300, REGPRIVATE.READWRITE);
- OpsStatus = new RegUInt32(_deviceHandler, 0x0304, REGPRIVATE.READONLY);
- HaltedControl = new RegUInt32(_deviceHandler, 0x0308, REGPRIVATE.READWRITE);
- HaltedStatus = new RegUInt32(_deviceHandler, 0x030c, REGPRIVATE.READONLY);
- LogTestPeriod = new RegUInt32(_deviceHandler, 0x0320, REGPRIVATE.READWRITE);
- LogTestWordRepeat = new RegUInt32(_deviceHandler, 0x0324, REGPRIVATE.READWRITE);
- EventFifoTestPeriod = new RegUInt32(_deviceHandler, 0x0328, REGPRIVATE.READWRITE);
- EventFifoTestPayloadNumWords = new RegUInt32(_deviceHandler, 0x032c, REGPRIVATE.READWRITE);
- LogSpeed = new RegUInt16(_deviceHandler, 0x0330, REGPRIVATE.READWRITE);
- LogEnables = new RegUInt16(_deviceHandler, 0x0334, REGPRIVATE.READWRITE);
- BerControl = new RegUInt32(_deviceHandler, 0x0338, REGPRIVATE.READWRITE);
- BerMode = new Regbyte(_deviceHandler, 0x033c, REGPRIVATE.READWRITE);
- AuxAdcControl = new RegUInt16(_deviceHandler, 0x0400, REGPRIVATE.READWRITE);
- AuxAdcResults = new RegUInt16(_deviceHandler, 0x0404, REGPRIVATE.READONLY);
- RfSynthesizerControl = new RegUInt32(_deviceHandler, 0x0500, REGPRIVATE.READWRITE);
- TxFineGain = new RegUInt32(_deviceHandler, 0x504, REGPRIVATE.READWRITE);
- RxGainControl = new RegUInt32(_deviceHandler, 0x0508, REGPRIVATE.READWRITE);
- TxCoarseGain = new RegUInt32(_deviceHandler, 0x050c, REGPRIVATE.READWRITE);
+ //Githash = new RegUInt32(_deviceHandler, 0x002c, REGPRIVATE.READONLY);
+ //SerialNumber = new Regstring(_deviceHandler, 0x0070, 32, REGPRIVATE.READONLY);
+ //FrefFreq = new RegUInt32(_deviceHandler, 0x0034, REGPRIVATE.READONLY);
+ //ProductSku = new RegUInt64(_deviceHandler, 0x0068, REGPRIVATE.READONLY);
+ //DeviceInfo = new RegUInt32(_deviceHandler, 0x0090, REGPRIVATE.READONLY);
+ //DeviceBuild = new RegUInt32(_deviceHandler, 0x0094, REGPRIVATE.READONLY);
+ //RtlRevision = new RegUInt32(_deviceHandler, 0x0098, REGPRIVATE.READONLY);
+ //InterruptMask = new Regbyte(_deviceHandler, 0x00a0, REGPRIVATE.READWRITE);
+ //InterruptMaskSet = new RegUInt32(_deviceHandler, 0x00a4, REGPRIVATE.WRITEONLY);
+ //InterruptMaskClear = new RegUInt32(_deviceHandler, 0x00a8, REGPRIVATE.WRITEONLY);
+ //InterruptStatus = new Regbyte(_deviceHandler, 0x00ac, REGPRIVATE.READONLY);
+ //EventFifoNumBytes = new RegUInt16(_deviceHandler, 0x00b0, REGPRIVATE.READONLY);
+ //EventFifoIntLevel = new RegUInt16(_deviceHandler, 0x00b2, REGPRIVATE.READWRITE);
+ //GpioOutputEnable = new RegUInt32(_deviceHandler, 0x00b4, REGPRIVATE.READWRITE);
+ //GpioOutputLevel = new RegUInt32(_deviceHandler, 0x00b8, REGPRIVATE.READWRITE);
+ //OpsControl = new Regbyte(_deviceHandler, 0x0300, REGPRIVATE.READWRITE);
+ //OpsStatus = new RegUInt32(_deviceHandler, 0x0304, REGPRIVATE.READONLY);
+ //HaltedControl = new RegUInt32(_deviceHandler, 0x0308, REGPRIVATE.READWRITE);
+ //HaltedStatus = new RegUInt32(_deviceHandler, 0x030c, REGPRIVATE.READONLY);
+ //LogTestPeriod = new RegUInt32(_deviceHandler, 0x0320, REGPRIVATE.READWRITE);
+ //LogTestWordRepeat = new RegUInt32(_deviceHandler, 0x0324, REGPRIVATE.READWRITE);
+ //EventFifoTestPeriod = new RegUInt32(_deviceHandler, 0x0328, REGPRIVATE.READWRITE);
+ //EventFifoTestPayloadNumWords = new RegUInt32(_deviceHandler, 0x032c, REGPRIVATE.READWRITE);
+ //LogSpeed = new RegUInt16(_deviceHandler, 0x0330, REGPRIVATE.READWRITE);
+ //LogEnables = new RegUInt16(_deviceHandler, 0x0334, REGPRIVATE.READWRITE);
+ //BerControl = new RegUInt32(_deviceHandler, 0x0338, REGPRIVATE.READWRITE);
+ //BerMode = new Regbyte(_deviceHandler, 0x033c, REGPRIVATE.READWRITE);
+ //AuxAdcControl = new RegUInt16(_deviceHandler, 0x0400, REGPRIVATE.READWRITE);
+ //AuxAdcResults = new RegUInt16(_deviceHandler, 0x0404, REGPRIVATE.READONLY);
+ //RfSynthesizerControl = new RegUInt32(_deviceHandler, 0x0500, REGPRIVATE.READWRITE);
+ //TxFineGain = new RegUInt32(_deviceHandler, 0x504, REGPRIVATE.READWRITE);
+ //RxGainControl = new RegUInt32(_deviceHandler, 0x0508, REGPRIVATE.READWRITE);
+ //TxCoarseGain = new RegUInt32(_deviceHandler, 0x050c, REGPRIVATE.READWRITE);
//RfMode = new RegUInt32(_deviceHandler, 0x0514, REGPRIVATE.READWRITE);
- DcOffset = new RegUInt32(_deviceHandler, 0x0518, REGPRIVATE.READWRITE);
- CwOffTime = new RegUInt32(_deviceHandler, 0x051c, REGPRIVATE.READWRITE);
- SjcControl = new Regbyte(_deviceHandler, 0x0600, REGPRIVATE.READWRITE);
- SjcGainControl = new RegUInt32(_deviceHandler, 0x0604, REGPRIVATE.READWRITE);
- SjcSettlingTime = new RegUInt32(_deviceHandler, 0x0608, REGPRIVATE.READWRITE);
- SjcCdacI = new RegUInt32(_deviceHandler, 0x060c, REGPRIVATE.READWRITE);
- SjcCdacQ = new RegUInt32(_deviceHandler, 0x0610, REGPRIVATE.READWRITE);
- SjcResultI = new RegUInt32(_deviceHandler, 0x0614, REGPRIVATE.READONLY);
- SjcResultQ = new RegUInt32(_deviceHandler, 0x0618, REGPRIVATE.READONLY);
- AnalogEnable = new RegUInt32(_deviceHandler, 0x0700, REGPRIVATE.READWRITE);
+ //DcOffset = new RegUInt32(_deviceHandler, 0x0518, REGPRIVATE.READWRITE);
+ //CwOffTime = new RegUInt32(_deviceHandler, 0x051c, REGPRIVATE.READWRITE);
+ //SjcControl = new Regbyte(_deviceHandler, 0x0600, REGPRIVATE.READWRITE);
+ //SjcGainControl = new RegUInt32(_deviceHandler, 0x0604, REGPRIVATE.READWRITE);
+ //SjcSettlingTime = new RegUInt32(_deviceHandler, 0x0608, REGPRIVATE.READWRITE);
+ //SjcCdacI = new RegUInt32(_deviceHandler, 0x060c, REGPRIVATE.READWRITE);
+ //SjcCdacQ = new RegUInt32(_deviceHandler, 0x0610, REGPRIVATE.READWRITE);
+ //SjcResultI = new RegUInt32(_deviceHandler, 0x0614, REGPRIVATE.READONLY);
+ //SjcResultQ = new RegUInt32(_deviceHandler, 0x0618, REGPRIVATE.READONLY);
+ //AnalogEnable = new RegUInt32(_deviceHandler, 0x0700, REGPRIVATE.READWRITE);
//InventoryRoundControl = new RegInventoryRoundControl(_deviceHandler); // for E710 only
//InventoryRoundControl_2 = new RegUInt32(_deviceHandler, 0x1004, REGPRIVATE.READWRITE); // for E710 only
- NominalStopTime = new RegUInt16(_deviceHandler, 0x1008, REGPRIVATE.READWRITE);
- ExtendedStopTime = new RegUInt16(_deviceHandler, 0x100c, REGPRIVATE.READWRITE);
- RegulatoryStopTime = new RegUInt16(_deviceHandler, 0x1010, REGPRIVATE.READWRITE);
- Gen2SelectEnable = new RegUInt16(_deviceHandler, 0x1014, REGPRIVATE.READWRITE);
- Gen2AccessEnable = new RegUInt16(_deviceHandler, 0x1018, REGPRIVATE.READWRITE);
- Gen2Offsets = new Regbyte(_deviceHandler, 0x1020, REGPRIVATE.READWRITE);
- Gen2Lengths = new RegUInt16(_deviceHandler, 0x1030, REGPRIVATE.READWRITE);
- Gen2TransactionIds = new Regbyte(_deviceHandler, 0x1050, REGPRIVATE.READWRITE);
- Gen2TxnControls = new RegUInt32(_deviceHandler, 0x1060, REGPRIVATE.READWRITE);
- Gen2TxBuffer = new RegByteArray(_deviceHandler, 0x1100, 128, REGPRIVATE.READWRITE);
+ //NominalStopTime = new RegUInt16(_deviceHandler, 0x1008, REGPRIVATE.READWRITE);
+ //ExtendedStopTime = new RegUInt16(_deviceHandler, 0x100c, REGPRIVATE.READWRITE);
+ //RegulatoryStopTime = new RegUInt16(_deviceHandler, 0x1010, REGPRIVATE.READWRITE);
+ //Gen2SelectEnable = new RegUInt16(_deviceHandler, 0x1014, REGPRIVATE.READWRITE);
+ //Gen2AccessEnable = new RegUInt16(_deviceHandler, 0x1018, REGPRIVATE.READWRITE);
+ //Gen2Offsets = new Regbyte(_deviceHandler, 0x1020, REGPRIVATE.READWRITE);
+ //Gen2Lengths = new RegUInt16(_deviceHandler, 0x1030, REGPRIVATE.READWRITE);
+ //Gen2TransactionIds = new Regbyte(_deviceHandler, 0x1050, REGPRIVATE.READWRITE);
+ //Gen2TxnControls = new RegUInt32(_deviceHandler, 0x1060, REGPRIVATE.READWRITE);
+ //Gen2TxBuffer = new RegByteArray(_deviceHandler, 0x1100, 128, REGPRIVATE.READWRITE);
LoopStyle = new RegUInt32(_deviceHandler, 0x3000, REGPRIVATE.READWRITE);
HopStyle = new Regbyte(_deviceHandler, 0x3008, REGPRIVATE.READWRITE);
RegulatoryNoEmissionTime = new RegUInt16(_deviceHandler, 0x3010, REGPRIVATE.READWRITE);
@@ -1515,10 +1536,13 @@ public CSLRFIDREGISTER(RFIDReader _deviceHandler)
AuthenticateConfig = new RegUInt24(_deviceHandler, 0x390e, REGPRIVATE.READWRITE);
AuthenticateMessage = new RegByteArray(_deviceHandler, 0x3912, 32, REGPRIVATE.READWRITE);
AuthenticateResponseLen = new RegUInt16(_deviceHandler, 0x3944, REGPRIVATE.READWRITE);
+ ReversePowerADC = new RegUInt16(_deviceHandler, 0x3946, REGPRIVATE.READWRITE);
+ CurrentPort = new Regbyte(_deviceHandler, 0x3948, REGPRIVATE.READWRITE);
ModelName = new Regstring(_deviceHandler, 0x5000, 32, REGPRIVATE.READONLY);
SerialNumber_1 = new Regstring(_deviceHandler, 0x5020, 32, REGPRIVATE.READONLY);
CountryEnum_1 = new RegUInt16(_deviceHandler, 0x5040, REGPRIVATE.READONLY);
EF98 = new RegUInt32(_deviceHandler, 0xef98, REGPRIVATE.READONLY);
+ EF9C = new Regstring(_deviceHandler, 0xef9c, 16, REGPRIVATE.READONLY);
EFAC = new RegUInt32(_deviceHandler, 0xefac, REGPRIVATE.READONLY);
EFB0 = new RegUInt32(_deviceHandler, 0xefb0, REGPRIVATE.READONLY);
}
@@ -1539,24 +1563,36 @@ public CSLRFIDREGISTER(RFIDReader _deviceHandler)
Serial Number 5020, 32
Country Enum 5040, 2
*/
+ /*
+ int[,] ReaderOEMDDataAddress = new int[,] { { 0x0008, 32 },
+ { 0x0028, 4 },
+ // { 0x002c, 4 },
+ // { 0x0034, 4 },
+ // { 0x0068, 8 },
+ // { 0x0070, 32 },
+ // { 0x0090, 4 },
+ // { 0x0094, 4 },
+ // { 0x0098, 4 },
+ { 0x5000, 32 },
+ { 0x5020, 32 },
+ { 0x5040, 2 },
+ // { 0xef98, 4 },
+ // { 0xefac, 4 },
+ // { 0xefb0, 4 },
+ { 0x3014, 2 },
+ { 0x3018, 1 }
+ */
int[,] ReaderOEMDDataAddress = new int[,] { { 0x0008, 32 },
{ 0x0028, 4 },
- { 0x002c, 4 },
- { 0x0034, 4 },
- { 0x0068, 8 },
- { 0x0070, 32 },
- { 0x0090, 4 },
- { 0x0094, 4 },
- { 0x0098, 4 },
+ { 0x3014, 2 },
+ { 0x3018, 1 },
{ 0x5000, 32 },
- { 0x5020, 32 },
{ 0x5040, 2 },
{ 0xef98, 4 },
+ { 0xef9c, 16 },
{ 0xefac, 4 },
- { 0xefb0, 4 },
- { 0x3014, 2 },
- { 0x3018, 1 }
- };
+ { 0xefb0, 4 }
+ };
public bool RegisterInitialize_CS710S()
{
@@ -1633,23 +1669,36 @@ byte[] RfidCmdpack(SCSLRFIDCMD cmd, byte[] payload)
void SaveInitRegisters(int index, byte[]data, int size)
{
+ /*
+ RFIDRegister.VersionString.Set(System.Text.Encoding.Default.GetString(data, index, RFIDRegister.VersionString.maxlen));
+ RFIDRegister.BuildNumber.Set(System.Text.Encoding.Default.GetString(data, index + 32, RFIDRegister.BuildNumber.maxlen));
+ RFIDRegister.Githash.Set(Tools.Hex.MSBToUInt32(data, index + 36));
+ RFIDRegister.FrefFreq.Set(Tools.Hex.MSBToUInt32(data, index + 40));
+ RFIDRegister.ProductSku.Set(Tools.Hex.MSBToUInt64(data, index + 44));
+ RFIDRegister.SerialNumber.Set(System.Text.Encoding.Default.GetString(data, index + 52, RFIDRegister.BuildNumber.maxlen));
+ RFIDRegister.DeviceInfo.Set(Tools.Hex.MSBToUInt32(data, index + 84));
+ RFIDRegister.DeviceBuild.Set(Tools.Hex.MSBToUInt32(data, index + 88));
+ RFIDRegister.RtlRevision.Set(Tools.Hex.MSBToUInt32(data, index + 92));
+ RFIDRegister.ModelName.Set(System.Text.Encoding.Default.GetString(data, index + 96, RFIDRegister.ModelName.maxlen));
+ RFIDRegister.SerialNumber_1.Set(System.Text.Encoding.Default.GetString(data, index + 128, RFIDRegister.SerialNumber_1.maxlen));
+ RFIDRegister.CountryEnum_1.Set(Tools.Hex.MSBToUInt16(data, index + 160));
+ RFIDRegister.EF98.Set(Tools.Hex.MSBToUInt32(data, index + 162));
+ RFIDRegister.EFAC.Set(Tools.Hex.MSBToUInt32(data, index + 166));
+ RFIDRegister.EFB0.Set(Tools.Hex.MSBToUInt32(data, index + 170));
+ RFIDRegister.CountryEnum.Set(Tools.Hex.MSBToUInt16(data, index + 174));
+ RFIDRegister.FrequencyChannelIndex.Set(data[index + 176]);
+ */
+
RFIDRegister.VersionString.Set(System.Text.Encoding.Default.GetString(data, index, RFIDRegister.VersionString.maxlen));
RFIDRegister.BuildNumber.Set(System.Text.Encoding.Default.GetString(data, index + 32, RFIDRegister.BuildNumber.maxlen));
- RFIDRegister.Githash.Set(Tools.Hex.MSBToUInt32(data, index + 36));
- RFIDRegister.FrefFreq.Set(Tools.Hex.MSBToUInt32(data, index + 40));
- RFIDRegister.ProductSku.Set(Tools.Hex.MSBToUInt64(data, index + 44));
- RFIDRegister.SerialNumber.Set(System.Text.Encoding.Default.GetString(data, index + 52, RFIDRegister.BuildNumber.maxlen));
- RFIDRegister.DeviceInfo.Set(Tools.Hex.MSBToUInt32(data, index + 84));
- RFIDRegister.DeviceBuild.Set(Tools.Hex.MSBToUInt32(data, index + 88));
- RFIDRegister.RtlRevision.Set(Tools.Hex.MSBToUInt32(data, index + 92));
- RFIDRegister.ModelName.Set(System.Text.Encoding.Default.GetString(data, index + 96, RFIDRegister.ModelName.maxlen));
- RFIDRegister.SerialNumber_1.Set(System.Text.Encoding.Default.GetString(data, index + 128, RFIDRegister.SerialNumber_1.maxlen));
- RFIDRegister.CountryEnum_1.Set(Tools.Hex.MSBToUInt16(data, index + 160));
- RFIDRegister.EF98.Set(Tools.Hex.MSBToUInt32(data, index + 162));
- RFIDRegister.EFAC.Set(Tools.Hex.MSBToUInt32(data, index + 166));
- RFIDRegister.EFB0.Set(Tools.Hex.MSBToUInt32(data, index + 170));
- RFIDRegister.CountryEnum.Set(Tools.Hex.MSBToUInt16(data, index + 174));
- RFIDRegister.FrequencyChannelIndex.Set(data[index + 176]);
+ RFIDRegister.CountryEnum.Set(Tools.Hex.MSBToUInt16(data, index + 36));
+ RFIDRegister.FrequencyChannelIndex.Set(data[index + 38]);
+ RFIDRegister.ModelName.Set(System.Text.Encoding.Default.GetString(data, index + 39, RFIDRegister.ModelName.maxlen));
+ RFIDRegister.CountryEnum_1.Set(Tools.Hex.MSBToUInt16(data, index + 71));
+ RFIDRegister.EF98.Set(Tools.Hex.MSBToUInt32(data, index + 73));
+ RFIDRegister.EF9C.Set(System.Text.Encoding.Default.GetString(data, index + 77, RFIDRegister.EF9C.maxlen));
+ RFIDRegister.EFAC.Set(Tools.Hex.MSBToUInt32(data, index + 93));
+ RFIDRegister.EFB0.Set(Tools.Hex.MSBToUInt32(data, index + 97));
m_oem_machine = MODEL.CS710S;
m_oem_country_code = RFIDRegister.EF98.Get();
@@ -1676,6 +1725,7 @@ void SaveInitRegisters(int index, byte[]data, int size)
///
///
///
+/*
int SaveRegister(int add, byte[] data, int index)
{
switch (add)
@@ -1707,5 +1757,6 @@ int SaveRegister(int add, byte[] data, int index)
return 0;
}
+*/
}
}
diff --git a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.UplinkPackets.cs b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.UplinkPackets.cs
index 0781532..6a6a31e 100644
--- a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.UplinkPackets.cs
+++ b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.UplinkPackets.cs
@@ -26,6 +26,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
using CSLibrary.Constants;
using System.Net.Sockets;
using CSLibrary.Barcode.Constants;
+using System.Linq.Expressions;
namespace CSLibrary
@@ -141,67 +142,77 @@ internal void OperationComplete(byte[] data, int index)
// 0x3001 packet
void csl_tag_read_epc_only_new_packet_proc(byte[] data, int index)
{
- UInt32 UTCTimeStamp = Tools.Hex.MSBToUInt32(data, index);
- UInt16 rf_phase_begin = Tools.Hex.MSBToUInt16(data, index + 6);
- UInt16 rf_phase_end = Tools.Hex.MSBToUInt16(data, index + 8);
- byte PortNumber = data[index + 10];
- UInt16 Tag_Index = Tools.Hex.MSBToUInt16(data, index + 13);
-
- int rssidBm100;
+ try
{
- byte hiByte = data[index + 4];
- rssidBm100 = Tools.Hex.MSBToUInt16 (data, index + 4);
- if (hiByte > 0x7f)
- rssidBm100 -= 0x10000;
- }
+ UInt32 UTCTimeStamp = Tools.Hex.MSBToUInt32(data, index);
+ UInt16 rf_phase_begin = Tools.Hex.MSBToUInt16(data, index + 6);
+ UInt16 rf_phase_end = Tools.Hex.MSBToUInt16(data, index + 8);
+ byte PortNumber = data[index + 10];
+ UInt16 Tag_Index = Tools.Hex.MSBToUInt16(data, index + 13);
- index += 15;
- //while (index < data.Length)
- {
- CSLibrary.Constants.CallbackType type = CSLibrary.Constants.CallbackType.TAG_RANGING;
- CSLibrary.Structures.TagCallbackInfo info = new CSLibrary.Structures.TagCallbackInfo();
+ int rssidBm100;
+ {
+ byte hiByte = data[index + 4];
+ rssidBm100 = Tools.Hex.MSBToUInt16 (data, index + 4);
- info.pc = new S_PC(Tools.Hex.MSBToUInt16(data, index));
- index += 2;
+ if (hiByte > 0x7f)
+ rssidBm100 -= 0x10000;
+ }
- if (info.pc.XI) // Check XPC W1
+ index += 15;
+ //while (index < data.Length)
{
- info.xpc_w1 = new S_XPC_W1(Tools.Hex.MSBToUInt16(data, index));
+ CSLibrary.Constants.CallbackType type = CSLibrary.Constants.CallbackType.TAG_RANGING;
+ CSLibrary.Structures.TagCallbackInfo info = new CSLibrary.Structures.TagCallbackInfo();
+
+ info.pc = new S_PC(Tools.Hex.MSBToUInt16(data, index));
index += 2;
- if (info.xpc_w1.XEB) // Check XPC W2
+ if (info.pc.XI) // Check XPC W1
{
- info.xpc_w2 = new S_XPC_W2(Tools.Hex.MSBToUInt16(data, index));
+ info.xpc_w1 = new S_XPC_W1(Tools.Hex.MSBToUInt16(data, index));
index += 2;
- }
- }
- int epcbytelen = ((info.pc >> 11) << 1);
- byte[] epc = new byte[epcbytelen];
- Array.Copy(data, index, epc, 0, epcbytelen);
- info.epc = new S_EPC(epc);
- index += epcbytelen;
+ if (info.xpc_w1.XEB) // Check XPC W2
+ {
+ info.xpc_w2 = new S_XPC_W2(Tools.Hex.MSBToUInt16(data, index));
+ index += 2;
+ }
+ }
- info.antennaPort = PortNumber;
- info.rssidBm = rssidBm100 / 100;
- info.rssi = Tools.dBConverion.dBm2dBuV(info.rssidBm) ;
+ int epcbytelen = ((info.pc >> 11) << 1);
+ byte[] epc = new byte[epcbytelen];
+ Array.Copy(data, index, epc, 0, epcbytelen);
+ info.epc = new S_EPC(epc);
+ index += epcbytelen;
- info.Bank1Data = new ushort[0];
- info.Bank2Data = new ushort[0];
- info.Bank3Data = new ushort[0];
+ info.antennaPort = PortNumber;
+ info.rssidBm = rssidBm100 / 100;
+ info.rssi = Tools.dBConverion.dBm2dBuV(info.rssidBm) ;
- CSLibrary.Events.OnAsyncCallbackEventArgs callBackData = new Events.OnAsyncCallbackEventArgs(info, type);
+ info.Bank1Data = new ushort[0];
+ info.Bank2Data = new ushort[0];
+ info.Bank3Data = new ushort[0];
- if (OnAsyncCallback != null)
- try
- {
- OnAsyncCallback(_deviceHandler, callBackData);
- }
- catch (Exception ex)
+ if (OnAsyncCallback != null)
{
- CSLibrary.Debug.WriteLine("OnAsyncCallback Error : " + ex.Message);
+ try
+ {
+ CSLibrary.Events.OnAsyncCallbackEventArgs callBackData = new Events.OnAsyncCallbackEventArgs(info, type);
+
+ OnAsyncCallback(_deviceHandler, callBackData);
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("OnAsyncCallback Error : " + ex.Message);
+ }
}
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("csl_tag_read_epc_only_new_packet_proc Error : " + ex.Message);
}
}
@@ -217,186 +228,202 @@ bool checkmultibankzero(UInt16[] multibankdata)
// 0x3003 packet
void csl_tag_read_multibank_new_packet_proc(byte[] data, int index)
{
- UInt32 UTCTimeStamp = Tools.Hex.MSBToUInt32(data, index);
- UInt16 rf_phase_begin = Tools.Hex.MSBToUInt16(data, index + 6);
- UInt16 rf_phase_end = Tools.Hex.MSBToUInt16(data, index + 8);
- byte PortNumber = data[index + 10];
- UInt16 Tag_Index = Tools.Hex.MSBToUInt16(data, index + 13);
-
- int rssidBm100;
+ try
{
- byte hiByte = data[index + 4];
- rssidBm100 = Tools.Hex.MSBToUInt16(data, index + 4);
-
- if (hiByte > 0x7f)
- rssidBm100 -= 0x10000;
- }
+ UInt32 UTCTimeStamp = Tools.Hex.MSBToUInt32(data, index);
+ UInt16 rf_phase_begin = Tools.Hex.MSBToUInt16(data, index + 6);
+ UInt16 rf_phase_end = Tools.Hex.MSBToUInt16(data, index + 8);
+ byte PortNumber = data[index + 10];
+ UInt16 Tag_Index = Tools.Hex.MSBToUInt16(data, index + 13);
- index += 15;
- //while (index < data.Length)
- {
- CSLibrary.Constants.CallbackType type = CSLibrary.Constants.CallbackType.TAG_RANGING;
- CSLibrary.Structures.TagCallbackInfo info = new CSLibrary.Structures.TagCallbackInfo();
+ int rssidBm100;
+ {
+ byte hiByte = data[index + 4];
+ rssidBm100 = Tools.Hex.MSBToUInt16(data, index + 4);
- info.pc = new S_PC(Tools.Hex.MSBToUInt16(data, index));
- index += 2;
+ if (hiByte > 0x7f)
+ rssidBm100 -= 0x10000;
+ }
- if (info.pc.XI) // Check XPC W1
+ index += 15;
+ //while (index < data.Length)
{
- info.xpc_w1 = new S_XPC_W1(Tools.Hex.MSBToUInt16(data, index));
+ CSLibrary.Constants.CallbackType type = CSLibrary.Constants.CallbackType.TAG_RANGING;
+ CSLibrary.Structures.TagCallbackInfo info = new CSLibrary.Structures.TagCallbackInfo();
+
+ info.pc = new S_PC(Tools.Hex.MSBToUInt16(data, index));
index += 2;
- if (info.xpc_w1.XEB) // Check XPC W2
+ if (info.pc.XI) // Check XPC W1
{
- info.xpc_w2 = new S_XPC_W2(Tools.Hex.MSBToUInt16(data, index));
+ info.xpc_w1 = new S_XPC_W1(Tools.Hex.MSBToUInt16(data, index));
index += 2;
- }
- }
-
- int epcbytelen = ((info.pc >> 11) << 1);
- byte[] epc = new byte[epcbytelen];
- Array.Copy(data, index, epc, 0, epcbytelen);
- info.epc = new S_EPC(epc);
- index += epcbytelen;
- info.antennaPort = PortNumber;
- info.rssidBm = rssidBm100 / 100;
- info.rssi = Tools.dBConverion.dBm2dBuV(info.rssidBm);
-
- info.Bank1Data = new ushort[0];
- info.Bank2Data = new ushort[0];
- info.Bank3Data = new ushort[0];
- if (data[index] == m_rdr_opt_parms.TagRanging.multibanks)
- {
- index++;
- if (m_rdr_opt_parms.TagRanging.multibanks > 0)
- info.Bank1Data = Tools.Hex.MSBToUInt16Array(data, index, m_rdr_opt_parms.TagRanging.count1);
- if (m_rdr_opt_parms.TagRanging.multibanks > 1)
- info.Bank2Data = Tools.Hex.MSBToUInt16Array(data, index + (m_rdr_opt_parms.TagRanging.count1 * 2), m_rdr_opt_parms.TagRanging.count2);
- if (m_rdr_opt_parms.TagRanging.multibanks > 2)
- info.Bank3Data = Tools.Hex.MSBToUInt16Array(data, index + ((m_rdr_opt_parms.TagRanging.count1 + m_rdr_opt_parms.TagRanging.count2) * 2), m_rdr_opt_parms.TagRanging.count3);
- }
+ if (info.xpc_w1.XEB) // Check XPC W2
+ {
+ info.xpc_w2 = new S_XPC_W2(Tools.Hex.MSBToUInt16(data, index));
+ index += 2;
+ }
+ }
- if (_currentTagRanging.multibanks >= 3)
- {
- if (_currentTagRanging.bank3 == MemoryBank.TID)
- if (checkmultibankzero(info.Bank3Data))
- return;
- }
+ int epcbytelen = ((info.pc >> 11) << 1);
+ byte[] epc = new byte[epcbytelen];
+ Array.Copy(data, index, epc, 0, epcbytelen);
+ info.epc = new S_EPC(epc);
+ index += epcbytelen;
- if (_currentTagRanging.multibanks >= 2)
- {
- if (_currentTagRanging.bank2 == MemoryBank.TID)
- if (checkmultibankzero(info.Bank2Data))
- return;
- }
+ info.antennaPort = PortNumber;
+ info.rssidBm = rssidBm100 / 100;
+ info.rssi = Tools.dBConverion.dBm2dBuV(info.rssidBm);
- if (_currentTagRanging.multibanks >= 1)
- {
- if (_currentTagRanging.bank1 == MemoryBank.TID)
- if (checkmultibankzero(info.Bank1Data))
- return;
- }
+ info.Bank1Data = new ushort[0];
+ info.Bank2Data = new ushort[0];
+ info.Bank3Data = new ushort[0];
+ if (data[index] == m_rdr_opt_parms.TagRanging.multibankswithreply)
+ {
+ index++;
+ if (m_rdr_opt_parms.TagRanging.multibanks > 0)
+ info.Bank1Data = Tools.Hex.MSBToUInt16Array(data, index, m_rdr_opt_parms.TagRanging.count1);
+ if (m_rdr_opt_parms.TagRanging.multibanks > 1)
+ info.Bank2Data = Tools.Hex.MSBToUInt16Array(data, index + (m_rdr_opt_parms.TagRanging.count1 * 2), m_rdr_opt_parms.TagRanging.count2);
+ if (m_rdr_opt_parms.TagRanging.multibanks > 2)
+ info.Bank3Data = Tools.Hex.MSBToUInt16Array(data, index + ((m_rdr_opt_parms.TagRanging.count1 + m_rdr_opt_parms.TagRanging.count2) * 2), m_rdr_opt_parms.TagRanging.count3);
+ }
- CSLibrary.Events.OnAsyncCallbackEventArgs callBackData = new Events.OnAsyncCallbackEventArgs(info, type);
+ if (_currentTagRanging.multibankswithreply >= 3)
+ {
+ if (_currentTagRanging.bank3 == MemoryBank.TID)
+ if (checkmultibankzero(info.Bank3Data))
+ return;
+ }
- if (OnAsyncCallback != null)
- try
+ if (_currentTagRanging.multibankswithreply >= 2)
{
- OnAsyncCallback(_deviceHandler, callBackData);
+ if (_currentTagRanging.bank2 == MemoryBank.TID)
+ if (checkmultibankzero(info.Bank2Data))
+ return;
}
- catch (Exception ex)
+
+ if (_currentTagRanging.multibankswithreply >= 1)
{
- CSLibrary.Debug.WriteLine("OnAsyncCallback Error : " + ex.Message);
+ if (_currentTagRanging.bank1 == MemoryBank.TID)
+ if (checkmultibankzero(info.Bank1Data))
+ return;
}
+
+ CSLibrary.Events.OnAsyncCallbackEventArgs callBackData = new Events.OnAsyncCallbackEventArgs(info, type);
+
+ if (OnAsyncCallback != null)
+ try
+ {
+ OnAsyncCallback(_deviceHandler, callBackData);
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("OnAsyncCallback Error : " + ex.Message);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("csl_tag_read_multibank_new_packet_proc Error : " + ex.Message);
}
}
// 0x3006 packet
internal void csl_tag_read_compact_packet_proc(byte[] data, int index)
{
- UInt32 UTCTimeStamp = Tools.Hex.MSBToUInt32(data, index);
-
- index += 6;
- while (index < data.Length)
+ try
{
- CSLibrary.Constants.CallbackType type = CSLibrary.Constants.CallbackType.TAG_RANGING;
- CSLibrary.Structures.TagCallbackInfo info = new CSLibrary.Structures.TagCallbackInfo();
+ UInt32 UTCTimeStamp = Tools.Hex.MSBToUInt32(data, index);
- //var PC = BitConverter.ToUInt16(data, index);
- //info.pc = new S_PC(PC);
- info.pc = new S_PC((UInt16)(data[index] << 8 | data[index + 1]));
- index += 2;
-
- if (info.pc.XI) // Check XPC W1
+ index += 6;
+ while (index < data.Length)
{
- info.xpc_w1 = new S_XPC_W1((UInt16)(data[index] << 8 | data[index + 1]));
+ CSLibrary.Constants.CallbackType type = CSLibrary.Constants.CallbackType.TAG_RANGING;
+ CSLibrary.Structures.TagCallbackInfo info = new CSLibrary.Structures.TagCallbackInfo();
+
+ //var PC = BitConverter.ToUInt16(data, index);
+ //info.pc = new S_PC(PC);
+ info.pc = new S_PC((UInt16)(data[index] << 8 | data[index + 1]));
index += 2;
- if (info.xpc_w1.XEB) // Check XPC W2
+ if (info.pc.XI) // Check XPC W1
{
- info.xpc_w2 = new S_XPC_W2((UInt16)(data[index] << 8 | data[index + 1]));
+ info.xpc_w1 = new S_XPC_W1((UInt16)(data[index] << 8 | data[index + 1]));
index += 2;
+
+ if (info.xpc_w1.XEB) // Check XPC W2
+ {
+ info.xpc_w2 = new S_XPC_W2((UInt16)(data[index] << 8 | data[index + 1]));
+ index += 2;
+ }
}
- }
- int epcbytelen = ((info.pc >> 11) << 1);
- byte[] epc = new byte[epcbytelen];
- Array.Copy(data, index, epc, 0, epcbytelen);
- info.epc = new S_EPC(epc);
- index += epcbytelen;
+ int epcbytelen = ((info.pc >> 11) << 1);
+ byte[] epc = new byte[epcbytelen];
+ Array.Copy(data, index, epc, 0, epcbytelen);
+ info.epc = new S_EPC(epc);
+ index += epcbytelen;
- int rssidBm100;
- {
- byte hiByte = data[index];
- rssidBm100 = ((int)(data[index] << 8 | data[index + 1]));
+ int rssidBm100;
+ {
+ byte hiByte = data[index];
+ rssidBm100 = ((int)(data[index] << 8 | data[index + 1]));
- if (hiByte > 0x7f)
- rssidBm100 -= 0x10000;
- }
- info.rssidBm = rssidBm100 / 100;
- info.rssi = Tools.dBConverion.dBm2dBuV(info.rssidBm);
+ if (hiByte > 0x7f)
+ rssidBm100 -= 0x10000;
+ }
+ info.rssidBm = rssidBm100 / 100;
+ info.rssi = Tools.dBConverion.dBm2dBuV(info.rssidBm);
- index += 2;
+ index += 2;
- info.Bank1Data = new ushort[0];
- info.Bank2Data = new ushort[0];
- info.Bank3Data = new ushort[0];
+ info.Bank1Data = new ushort[0];
+ info.Bank2Data = new ushort[0];
+ info.Bank3Data = new ushort[0];
-/*
- if (RFIDRegister.AntennaPortConfig.FastId() && info.pc.EPCLength >= 6 && epc[epcbytelen - 12] == 0xe2 && epc[epcbytelen - 11] == 0x80 && epc[epcbytelen - 10] == 0x11)
- {
- byte[] newbyteEpc = new byte[epcbytelen - 12];
- UInt16[] newbyteTid = new UInt16[6];
+ /*
+ if (RFIDRegister.AntennaPortConfig.FastId() && info.pc.EPCLength >= 6 && epc[epcbytelen - 12] == 0xe2 && epc[epcbytelen - 11] == 0x80 && epc[epcbytelen - 10] == 0x11)
+ {
+ byte[] newbyteEpc = new byte[epcbytelen - 12];
+ UInt16[] newbyteTid = new UInt16[6];
- Array.Copy(epc, 0, newbyteEpc, 0, newbyteEpc.Length);
- ArrayCopy(epc, epcbytelen - 12, newbyteTid, 0, 12);
+ Array.Copy(epc, 0, newbyteEpc, 0, newbyteEpc.Length);
+ ArrayCopy(epc, epcbytelen - 12, newbyteTid, 0, 12);
- info.FastTid = newbyteTid;
- epc = newbyteEpc;
- }
- else
- info.FastTid = new UInt16[0];
-*/
+ info.FastTid = newbyteTid;
+ epc = newbyteEpc;
+ }
+ else
+ info.FastTid = new UInt16[0];
+ */
- CSLibrary.Events.OnAsyncCallbackEventArgs callBackData = new Events.OnAsyncCallbackEventArgs(info, type);
+ CSLibrary.Events.OnAsyncCallbackEventArgs callBackData = new Events.OnAsyncCallbackEventArgs(info, type);
- if (OnAsyncCallback != null)
- try
- {
- OnAsyncCallback(_deviceHandler, callBackData);
- }
- catch (Exception ex)
- {
- CSLibrary.Debug.WriteLine("OnAsyncCallback Error : " + ex.Message);
- }
+ if (OnAsyncCallback != null)
+ try
+ {
+ OnAsyncCallback(_deviceHandler, callBackData);
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("OnAsyncCallback Error : " + ex.Message);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("csl_tag_read_compact_packet_proc Error : " + ex.Message);
}
}
// 0x3007 packet
void csl_miscellaneous_event_packet_proc(byte[] data, int index, int len)
{
+ try
+ {
UInt32 UTCTimeStamp = Tools.Hex.MSBToUInt32(data, index);
UInt16 eventCode = Tools.Hex.MSBToUInt16(data, index + 4);
@@ -404,7 +431,16 @@ void csl_miscellaneous_event_packet_proc(byte[] data, int index, int len)
switch (eventCode)
{
- case 0x0004: // Tag Rate
+ case 0x0001: // keep alive
+ break;
+
+ case 0x0002: // inventory round end
+ break;
+
+ case 0x0003: // CRC error rate (2 bytes Data)
+ break;
+
+ case 0x0004: // tag rate value (2 bytes Data)
{
uint tagRate = Tools.Hex.MSBToUInt16(data, index + 6);
@@ -416,13 +452,21 @@ void csl_miscellaneous_event_packet_proc(byte[] data, int index, int len)
}
catch (Exception ex)
{
- //Console.WriteLine(ex);
+ CSLibrary.Debug.WriteLine("csl_miscellaneous_event call back error : " + ex.Message);
}
}
}
+ break;
+ default:
+ CSLibrary.Debug.WriteLine("csl_miscellaneous_event Event Code : " + eventCode.ToString());
break;
}
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("csl_miscellaneous_event_packet_proc Error : " + ex.Message);
+ }
}
// 0x3009 packet
diff --git a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/RX000Commands/ClassRFID.Private.MacRegister.cs b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/RX000Commands/ClassRFID.Private.MacRegister.cs
index b48a2e1..caf8c74 100644
--- a/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/RX000Commands/ClassRFID.Private.MacRegister.cs
+++ b/Library/CSLibrary/Source/RFIDReader/Comm_Protocol/RX000Commands/ClassRFID.Private.MacRegister.cs
@@ -122,7 +122,7 @@ public bool MacRegisterInitialize()
//_0309 = new UInt32[8];
- _0400 = new UInt32[0]; // 408
+ _0400 = new UInt32[11]; // 0x0400-0x040A
//_0408 = new UInt32[2]; // (Selector)
diff --git a/MobileMvxApp/BLE.Client.Droid/BLE.Client.Droid.csproj b/MobileMvxApp/BLE.Client.Droid/BLE.Client.Droid.csproj
index 8db6a3b..d59edeb 100644
--- a/MobileMvxApp/BLE.Client.Droid/BLE.Client.Droid.csproj
+++ b/MobileMvxApp/BLE.Client.Droid/BLE.Client.Droid.csproj
@@ -65,6 +65,7 @@
+
@@ -133,6 +134,9 @@
7.0.1
+
+ 4.3.3.952
+
7.1.2
diff --git a/MobileMvxApp/BLE.Client.Droid/ClassIBatteryOptimizationService.cs b/MobileMvxApp/BLE.Client.Droid/ClassIBatteryOptimizationService.cs
new file mode 100644
index 0000000..7877956
--- /dev/null
+++ b/MobileMvxApp/BLE.Client.Droid/ClassIBatteryOptimizationService.cs
@@ -0,0 +1,45 @@
+using Android.OS;
+using Android.Content;
+using Android.Provider;
+using Xamarin.Essentials;
+using Xamarin.Forms;
+using Android.Net;
+using System.Threading.Tasks;
+
+[assembly: Xamarin.Forms.Dependency(typeof(BLE.Client.Droid.BatteryOptimizationService))]
+
+namespace BLE.Client.Droid
+{
+ public class BatteryOptimizationService : BLE.Client.IBatteryOptimizationService
+ {
+ public bool IsBatteryOptimizationDisabled()
+ {
+ // If Android 12 or older
+ if (Build.VERSION.SdkInt < BuildVersionCodes.Tiramisu)
+ return true;
+
+ var powerManager = (PowerManager)Android.App.Application.Context.GetSystemService(Android.Content.Context.PowerService);
+ var packageName = Android.App.Application.Context.PackageName;
+ if (powerManager.IsIgnoringBatteryOptimizations(packageName))
+ return true;
+
+ return false;
+ }
+
+ public async Task OpenBatteryOptimizationsAsync()
+ {
+ if (!IsBatteryOptimizationDisabled())
+ {
+ var intent = new Intent(Android.Provider.Settings.ActionApplicationDetailsSettings);
+ var uri = Uri.FromParts("package", Forms.Context.PackageName, null);
+ intent.SetData(uri);
+ intent.AddFlags(ActivityFlags.NewTask);
+ Forms.Context.StartActivity(intent);
+ }
+
+ return;
+ }
+ }
+}
+
+
diff --git a/MobileMvxApp/BLE.Client.Droid/MainActivity.cs b/MobileMvxApp/BLE.Client.Droid/MainActivity.cs
index 0a4f58a..028553a 100644
--- a/MobileMvxApp/BLE.Client.Droid/MainActivity.cs
+++ b/MobileMvxApp/BLE.Client.Droid/MainActivity.cs
@@ -55,6 +55,8 @@ public class BLEPermission : Xamarin.Essentials.Permissions.BasePlatformPermissi
{
(Android.Manifest.Permission.BluetoothScan, true),
(Android.Manifest.Permission.BluetoothConnect, true),
+ (Android.Manifest.Permission.Internet, true),
+ (Android.Manifest.Permission.AccessNetworkState, true),
(Android.Manifest.Permission.ReadExternalStorage, true),
(Android.Manifest.Permission.WriteExternalStorage, true)
}.ToArray();
diff --git a/MobileMvxApp/BLE.Client.Droid/Properties/AndroidManifest.xml b/MobileMvxApp/BLE.Client.Droid/Properties/AndroidManifest.xml
index 8f13ff0..a552c16 100644
--- a/MobileMvxApp/BLE.Client.Droid/Properties/AndroidManifest.xml
+++ b/MobileMvxApp/BLE.Client.Droid/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
@@ -12,4 +12,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.Droid/SplashScreen.cs b/MobileMvxApp/BLE.Client.Droid/SplashScreen.cs
index e2486c9..0b68cd1 100644
--- a/MobileMvxApp/BLE.Client.Droid/SplashScreen.cs
+++ b/MobileMvxApp/BLE.Client.Droid/SplashScreen.cs
@@ -7,6 +7,7 @@
using MvvmCross.Forms.Platforms.Android.Views;
using MvvmCross.Platforms.Android.Views;
using System.Threading.Tasks;
+using System;
namespace BLE.Client.Droid
{
@@ -27,7 +28,6 @@ protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
UserDialogs.Init(this);
-
}
protected override Task RunAppStartAsync(Bundle bundle)
diff --git a/MobileMvxApp/BLE.Client.Droid/Working Copy of BLE.Client.Droid.csproj b/MobileMvxApp/BLE.Client.Droid/Working Copy of BLE.Client.Droid.csproj
new file mode 100644
index 0000000..e9cd834
--- /dev/null
+++ b/MobileMvxApp/BLE.Client.Droid/Working Copy of BLE.Client.Droid.csproj
@@ -0,0 +1,1291 @@
+Start debugging Android application ...
+Forwarding debugger port 8887
+Detecting existing process
+> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.SplashScreen"
+> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.SplashScreen }
+[0Sfulldemo.dem] Late-enabling -Xcheck:jni
+[0Sfulldemo.dem] Unknown bits set in runtime_flags: 0x8000
+[KPI-6PA-ZY-6] 1232645661 enter ActivityThread.main()
+[debug-app-helper] Checking if libmonodroid was unpacked to /data/app/csl.CS710Sfulldemo.demo-F9UBlvXCv_LtBJbesaeODw==/lib/arm64/libmonodroid.so
+[debug-app-helper] Native libs extracted to /data/app/csl.CS710Sfulldemo.demo-F9UBlvXCv_LtBJbesaeODw==/lib/arm64, assuming application/android:extractNativeLibs == true
+[debug-app-helper] Setting up for DSO lookup in app data directories
+[debug-app-helper] Added filesystem DSO lookup location: /data/app/csl.CS710Sfulldemo.demo-F9UBlvXCv_LtBJbesaeODw==/lib/arm64
+[debug-app-helper] Using runtime path: /data/app/csl.CS710Sfulldemo.demo-F9UBlvXCv_LtBJbesaeODw==/lib/arm64
+[debug-app-helper] checking directory: `/data/user/0/csl.CS710Sfulldemo.demo/files/.__override__/lib`
+[debug-app-helper] directory does not exist: `/data/user/0/csl.CS710Sfulldemo.demo/files/.__override__/lib`
+[debug-app-helper] Checking whether Mono runtime exists at: /data/user/0/csl.CS710Sfulldemo.demo/files/.__override__/libmonosgen-2.0.so
+[debug-app-helper] Checking whether Mono runtime exists at: /data/app/csl.CS710Sfulldemo.demo-F9UBlvXCv_LtBJbesaeODw==/lib/arm64/libmonosgen-2.0.so
+[debug-app-helper] Mono runtime found at: /data/app/csl.CS710Sfulldemo.demo-F9UBlvXCv_LtBJbesaeODw==/lib/arm64/libmonosgen-2.0.so
+[0Sfulldemo.dem] Attempt to remove non-JNI local reference, dumping thread
+[monodroid] Creating public update directory: `/data/user/0/csl.CS710Sfulldemo.demo/files/.__override__`
+[0Sfulldemo.dem] Attempt to remove non-JNI local reference, dumping thread
+[monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8887,server=y,embedding=1
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Arch.Core.Common.dll
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/BLE.Client.Droid.dll
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/CSLibrary2024.NETSTD2.dll
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Acr.Support.Android.dll
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Acr.UserDialogs.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Acr.UserDialogs.Interface.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/AndHUD.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/BLE.Client.dll
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/FormsViewGroup.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Microsoft.Extensions.Logging.Abstractions.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/MQTTnet.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/MvvmCross.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/MvvmCross.Forms.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/MvvmCross.Plugins.BLE.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/MvvmCross.Plugins.BLE.Droid.dll
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Newtonsoft.Json.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/PCLStorage.Abstractions.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/PCLStorage.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Plugin.BLE.Abstractions.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Plugin.BLE.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Plugin.CurrentActivity.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Plugin.Settings.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Plugin.Share.Abstractions.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Plugin.Share.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Prism.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Splat.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/TagDataTranslation.dll [External]
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Arch.Lifecycle.Common.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Arch.Lifecycle.Runtime.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Animated.Vector.Drawable.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Annotations.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Collections.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Compat.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Core.UI.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Core.Utils.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.CustomTabs.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Design.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Fragment.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Media.Compat.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Transition.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.v7.AppCompat.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.v7.RecyclerView.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.Vector.Drawable.dll
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Android.Support.VersionedParcelable.dll
+[monodroid-gc] GREF GC Threshold: 46080
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Activity.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Annotation.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Annotation.Experimental.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.AppCompat.AppCompatResources.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.AppCompat.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Arch.Core.Common.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Arch.Core.Runtime.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.AsyncLayoutInflater.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Browser.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.CardView.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Collection.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Concurrent.Futures.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.ConstraintLayout.Core.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.ConstraintLayout.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.CoordinatorLayout.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Core.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.CursorAdapter.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.CustomView.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.DocumentFile.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.DrawerLayout.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.DynamicAnimation.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Fragment.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Interpolator.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Legacy.Support.Core.UI.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Legacy.Support.Core.Utils.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Legacy.Support.V4.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Lifecycle.Common.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Lifecycle.LiveData.Core.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Lifecycle.LiveData.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Lifecycle.Runtime.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Lifecycle.ViewModel.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Loader.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.LocalBroadcastManager.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Media.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.MediaRouter.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.MultiDex.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Navigation.Common.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Navigation.Runtime.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Navigation.UI.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Palette.dll [External]
+[0Sfulldemo.dem] Waiting for a blocking GC ProfileSaver
+[0Sfulldemo.dem] WaitForGcToComplete blocked ProfileSaver on ClassLinker for 5.206ms
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Preference.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Print.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.RecyclerView.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.SavedState.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.SlidingPaneLayout.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.SwipeRefreshLayout.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Tracing.Tracing.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.Transition.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.VectorDrawable.Animated.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.VectorDrawable.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.VersionedParcelable.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.ViewPager.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.AndroidX.ViewPager2.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.Essentials.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.Forms.Core.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.Forms.Platform.Android.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.Forms.Platform.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.Forms.Xaml.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.Google.Android.Material.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Xamarin.Google.Guava.ListenableFuture.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Mono.Android.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Java.Interop.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.dll [External]
+Resolved pending breakpoint for 'Android.Runtime.JNIEnvInit.RegisterJniNatives(System.IntPtr, System.Int32, System.IntPtr, System.IntPtr, System.Int32)' to /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnvInit.cs:59 [0x00000].
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Mono.Security.dll [External]
+[0Sfulldemo.dem] Attempt to remove non-JNI local reference, dumping thread
+Loaded assembly: data-0x7478252d00 [External]
+[] Symbol file LoadedFromMemory is not a mono symbol file
+Loaded assembly: data-0x747825f200 [External]
+Loaded assembly: data-0x747826a700 [External]
+Loaded assembly: data-0x74782c0e80 [External]
+Loaded assembly: data-0x74782d6c40 [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/netstandard.dll [External]
+Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:423 [0x00000].
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Core.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Runtime.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Resources.ResourceManager.dll [External]
+Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointCheckpoint()' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:418 [0x00000].
+[Looper] Slow dispatch took 8948ms main h=android.app.ActivityThread$H c=null m=110
+[KPI-6PA-AT-5] 1232654634 enter ApplicationThread.handleLaunchActivity() : ActivityInfo{7d454ba crc648d0a0ab3e1cc7257.SplashScreen}
+2024-06-11 14:37:28 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Primary start
+2024-06-11 14:37:28 [TRACE] (MvvmCross.Core.MvxSetup) Setup: FirstChance start
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Xml.dll [External]
+Thread started: #2
+Thread started: #3
+Thread started: #4
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Runtime.Serialization.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.ServiceModel.Internals.dll [External]
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Core.MvxSetup) Setup: MvvmCross settings start
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Singleton Cache start
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Core.MvxSetup) Setup: ViewDispatcher start
+Thread started: #5
+Thread started: #6
+Thread started: #7
+Thread started: #8
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Bootstrap actions
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Net.Http.dll [External]
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Logging.MvxLog) No view model type finder available - assuming we are looking for a splash screen - returning null
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Core.MvxSetup) Setup: StringToTypeParser start
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Core.MvxSetup) Setup: FillableStringToTypeParser start
+2024-06-11 14:37:29 [TRACE] (MvvmCross.Core.MvxSetup) Setup: PluginManagerFramework start
+[0Sfulldemo.dem] Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
+[0Sfulldemo.dem] Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Threading.Tasks.dll [External]
+[KPI-6PA-AT-6] 1232656156 leave ApplicationThread.handleLaunchActivity() :ActivityInfo{7d454ba crc648d0a0ab3e1cc7257.SplashScreen}
+Thread started: #9
+Thread started: #10
+Thread started: #11
+Thread started: #12
+Thread started: #13
+Thread started: #14
+Thread started: #15
+Thread started: #16
+Thread started: #17
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+[Looper] Slow dispatch took 1724ms main h=android.app.ActivityThread$H c=null m=159
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Create App
+Thread started: #18
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: NavigationService
+[AdrenoGLES-0] QUALCOMM build : 39a1dfd, Ic628754133
+[AdrenoGLES-0] Build Date : 06/29/20
+[AdrenoGLES-0] OpenGL ES Shader Compiler Version: EV031.29.00.13
+[AdrenoGLES-0] Local Branch :
+[AdrenoGLES-0] Remote Branch :
+[AdrenoGLES-0] Remote Branch :
+[AdrenoGLES-0] Reconstruct Branch :
+[AdrenoGLES-0] Build Config : S P 8.0.16 AArch64
+[AdrenoGLES-0] Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Load navigation routes
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: App start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Application Initialize - On background thread
+[AdrenoGLES-0] PFP: 0x016ee188, ME: 0x00000000
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: ViewModelTypeFinder start
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: ViewsContainer start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Lookup Dictionary start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view MainActivity
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageBarcodeScan
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageInventory
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PagePostFilter
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PagePreFilter
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageRSSIFilter
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageKill
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageSecurity
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageAbout
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageSettingAdministration
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageSettingAntenna
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageSettingOperation
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageSettingPower
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view PageXerxesSetting
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Views start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: CommandCollectionBuilder start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: NavigationSerializer start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: InpcInterception start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: InpcInterception start
+2024-06-11 14:37:30 [TRACE] (MvvmCross.Core.MvxSetup) Setup: LastChance start
+[0Sfulldemo.dem] Explicit concurrent copying GC freed 325(51KB) AllocSpace objects, 0(0B) LOS objects, 53% free, 1327KB/2863KB, paused 46us total 7.150ms
+2024-06-11 14:37:31 [TRACE] (MvvmCross.Core.MvxSetup) Setup: Secondary end
+[KPI-6PA-AT-5] 1232657280 enter ApplicationThread.handleLaunchActivity() : ActivityInfo{11959c crc648d0a0ab3e1cc7257.MainActivity}
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/Mono.Android.Export.dll [External]
+Loaded assembly: __callback_factory__ [External]
+[0Sfulldemo.dem] Accessing hidden method Landroid/view/LayoutInflater;->setPrivateFactory(Landroid/view/LayoutInflater$Factory2;)V (greylist, reflection, allowed)
+2024-06-11 14:37:31 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view MainActivity
+2024-06-11 14:37:31 [TRACE] (MvvmCross.Logging.MvxLog) No ViewModel class specified for MainActivity in LoadViewModel
+2024-06-11 14:37:31 [TRACE] (MvvmCross.Logging.MvxLog) Null Extras seen on Intent when creating ViewModel - have you tried to navigate to an MvvmCross View directly? Will try direct load
+2024-06-11 14:37:31 [ERROR] (MvvmCross.Logging.MvxLog) Unable to load viewmodel - no type hint provided
+2024-06-11 14:37:31 [WARN] (MvvmCross.Logging.MvxLog) ViewModel not loaded for view MainActivity
+2024-06-11 14:37:31 [TRACE] (MvvmCross.Logging.MvxLog) AppStart: Application Startup - On UI thread
+2024-06-11 14:37:31 [TRACE] (MvxForms) PresentationAttribute not found for ViewModelMainMenu. Assuming ContentPage presentation
+2024-06-11 14:37:31 [WARN] (MvxForms) Ignoring close for ViewModel - Matching View for ViewModel instance failed
+2024-06-11 14:37:31 [TRACE] (MvxForms) PresentationAttribute not found for ViewModelMainMenu. Assuming ContentPage presentation
+2024-06-11 14:37:31 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view MainActivity
+2024-06-11 14:37:31 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view MainActivity
+[0Sfulldemo.dem] Explicit concurrent copying GC freed 908(279KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 1493KB/3029KB, paused 46us total 8.123ms
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Drawing.Common.dll [External]
+Loaded assembly: Anonymously Hosted DynamicMethods Assembly [External]
+[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Forms.Platform.Android.AppLinks.dll
+[Activity] setRequestedOrientation 1
+[KPI-6PA-AT-6] 1232658779 leave ApplicationThread.handleLaunchActivity() :ActivityInfo{11959c crc648d0a0ab3e1cc7257.MainActivity}
+[0Sfulldemo.dem] Explicit concurrent copying GC freed 1410(327KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1718KB/3437KB, paused 44us total 9.151ms
+SendAsync : 9003
+2024-06-11 14:37:32 [TRACE] (MvvmCross.Logging.MvxLog) ViewAppeared ViewModelMainMenu
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+[Looper] Slow dispatch took 1918ms main h=android.app.ActivityThread$H c=null m=159
+2024-06-11 14:37:33 [TRACE] (MvvmCross.Logging.MvxLog) ViewDisappeared ViewModelMainMenu
+SendAsync : 9003
+2024-06-11 14:37:33 [TRACE] (MvvmCross.Logging.MvxLog) ViewAppeared ViewModelMainMenu
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+[OpenGLRenderer] Davey! duration=1010ms; Flags=1, IntendedVsync=1232659196904741, Vsync=1232659246904739, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=1232659256149585, AnimationStart=1232659256209898, PerformTraversalsStart=1232659256216408, DrawStart=1232660169019103, SyncQueued=1232660186272803, SyncStart=1232660187062751, IssueDrawCommandsStart=1232660187212542, SwapBuffers=1232660207641919, FrameCompleted=1232660208415513, DequeueBufferDuration=140000, QueueBufferDuration=435000,
+[Choreographer] Skipped 52 frames! The application may be doing too much work on its main thread.
+Thread started: #19
+Thread started: #20
+[ViewRootImpl] title=csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.MainActivity enqueue motion: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=245.0, y[0]=1402.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1232665160, downTime=1232665160, deviceId=6, source=0x1002, displayId=0 }
+[ViewRootImpl] title=csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.MainActivity enqueue motion: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=245.0, y[0]=1402.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1232665304, downTime=1232665160, deviceId=6, source=0x1002, displayId=0 }
+2024-06-11 14:37:39 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view MainActivity
+2024-06-11 14:37:39 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view MainActivity
+2024-06-11 14:37:39 [TRACE] (MvvmCross.Logging.MvxLog) ViewDisappeared ViewModelMainMenu
+[BluetoothAdapter] isLeEnabled(): ON
+[BluetoothLeScanner] onScannerRegistered() - status=0 scannerId=8 mScannerId=0
+2024-06-11 14:37:39 [TRACE] (MvvmCross.Logging.MvxLog) ViewAppeared DeviceListViewModel
+2024-06-11 14:37:39 [TRACE] (MvvmCross.Logging.MvxLog) No view model association found for candidate view MvxContentPage
+2024-06-11 14:37:39 [TRACE] (MvvmCross.Logging.MvxLog) ViewAppeared DeviceListViewModel
+[0:] Binding: 'DisconnectCommand' property not found on 'MvvmCross.Binding.BindingContext.MvxBindingContext', target property: 'Xamarin.Forms.MenuItem.Command'
+[0:] Binding: 'CopyGuidCommand' property not found on 'MvvmCross.Binding.BindingContext.MvxBindingContext', target property: 'Xamarin.Forms.MenuItem.Command'
+[0:] Binding: 'ConnectDisposeCommand' property not found on 'MvvmCross.Binding.BindingContext.MvxBindingContext', target property: 'Xamarin.Forms.MenuItem.Command'
+[0Sfulldemo.dem] Explicit concurrent copying GC freed 6051(844KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 2170KB/4341KB, paused 57us total 12.440ms
+[0:] Binding: 'DisconnectCommand' property not found on 'MvvmCross.Binding.BindingContext.MvxBindingContext', target property: 'Xamarin.Forms.MenuItem.Command'
+[0:] Binding: 'CopyGuidCommand' property not found on 'MvvmCross.Binding.BindingContext.MvxBindingContext', target property: 'Xamarin.Forms.MenuItem.Command'
+[0:] Binding: 'ConnectDisposeCommand' property not found on 'MvvmCross.Binding.BindingContext.MvxBindingContext', target property: 'Xamarin.Forms.MenuItem.Command'
+[ViewRootImpl] title=csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.MainActivity enqueue motion: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=294.0, y[0]=321.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1232670199, downTime=1232670199, deviceId=6, source=0x1002, displayId=0 }
+[ViewRootImpl] title=csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.MainActivity enqueue motion: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=294.0, y[0]=321.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1232670381, downTime=1232670199, deviceId=6, source=0x1002, displayId=0 }
+[AppCompatDelegate] The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+[ViewRootImpl] title=csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.MainActivity enqueue motion: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=570.0, y[0]=185.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1232671819, downTime=1232671819, deviceId=6, source=0x1002, displayId=0 }
+[ViewRootImpl] title=csl.CS710Sfulldemo.demo/crc648d0a0ab3e1cc7257.MainActivity enqueue motion: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=570.0, y[0]=185.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1232672001, downTime=1232671819, deviceId=6, source=0x1002, displayId=0 }
+[BluetoothGatt] connect() - device: 84:C6:92:C3:D9:73, auto: false
+[BluetoothGatt] registerApp()
+[BluetoothGatt] registerApp() - UUID=3fdb42ec-cba1-42bf-986e-8ca9b8da8bc6
+[OpenGLRenderer] endAllActiveAnimators on 0x73fd49f700 (RippleDrawable) with handle 0x73fd4b1c80
+[BluetoothGatt] onClientRegistered() - status=0 clientIf=9
+[BluetoothGatt] onClientConnectionState() - status=0 clientIf=9 device=84:C6:92:C3:D9:73
+Thread started: #21
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+[BluetoothGatt] configureMTU() - device: 84:C6:92:C3:D9:73 mtu: 255
+[0:] NavigationPage: RemovePage called for CurrentPage object. This can result in undesired behavior, consider calling PopAsync instead.
+[BluetoothAdapter] isLeEnabled(): ON
+2024-06-11 14:37:46 [TRACE] (MvvmCross.Logging.MvxLog) ViewDisappeared DeviceListViewModel
+2024-06-11 14:37:46 [TRACE] (MvvmCross.Logging.MvxLog) ViewDisappeared DeviceListViewModel
+[ViewRootImpl] package=csl.CS710Sfulldemo.demo is not forcedto immersive fullscreen
+SendAsync : 9003
+2024-06-11 14:37:46 [TRACE] (MvvmCross.Logging.MvxLog) ViewAppeared ViewModelMainMenu
+[BluetoothGatt] onConnectionUpdated() - Device=84:C6:92:C3:D9:73 interval=6 latency=0 timeout=500 status=0
+[BluetoothGatt] onConfigureMTU() - Device=84:C6:92:C3:D9:73 mtu=251 status=0
+[BluetoothGatt] discoverServices() - device: 84:C6:92:C3:D9:73
+[BluetoothGatt] onSearchComplete() = Device=84:C6:92:C3:D9:73 Status=0
+[BluetoothGatt] onConnectionUpdated() - Device=84:C6:92:C3:D9:73 interval=12 latency=0 timeout=50 status=0
+[BluetoothGatt] setCharacteristicNotification() - uuid: 00009901-0000-1000-8000-00805f9b34fb enable: true
+SendAsync : 9000
+SendAsync : 8001
+SendAsync : 8000
+SendAsync : C000
+SendAsync : C004
+SendAsync : B000
+SendAsync : B004
+SendAsync : B006
+SendAsync : 8002
+SendAsync : 8002
+SendAsync : A002
+[0Sfulldemo.dem] Explicit concurrent copying GC freed 21330(1105KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 2381KB/4762KB, paused 53us total 15.818ms
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.IO.dll [External]
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Numerics.dll [External]
+Resolved pending breakpoint at 'CodeFileBLE.cs:195,1' to void CSLibrary.HighLevelInterface.d__94.MoveNext () [0x00039].
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Thread finished: #12
+The thread 0xc has exited with code 0 (0x0).
+Thread finished: #17
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\HAL\MvvmCross.Plugin.BLE\CodeFileBLE.cs:195,1' to void CSLibrary.HighLevelInterface.d__94.MoveNext () [0x00039].
+The thread 0x11 has exited with code 0 (0x0).
+Thread finished: #15
+The thread 0xf has exited with code 0 (0x0).
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 22125ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 5544ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 1395ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+Thread started: #22
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Thread finished: #10
+The thread 0xa has exited with code 0 (0x0).
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\HAL\MvvmCross.Plugin.BLE\CodeFileBLE.cs:190,1' to void CSLibrary.HighLevelInterface.d__94.MoveNext () [0x00024].
+Thread finished: #5
+Thread finished: #14
+The thread 0x5 has exited with code 0 (0x0).
+The thread 0xe has exited with code 0 (0x0).
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 16540ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+Thread started: #23
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Loaded assembly: /data/data/csl.CS710Sfulldemo.demo/files/.__override__/System.Data.dll [External]
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 10017ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\HAL\MvvmCross.Plugin.BLE\ClassDebug.cs:34,1' to void CSLibrary.Debug.WriteBytes (string header, byte[] data) [0x0005b].
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Thread finished: #23
+The thread 0x17 has exited with code 0 (0x0).
+Thread started: #24
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 60989ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Thread finished: #13
+The thread 0xd has exited with code 0 (0x0).
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 26935ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\HAL\MvvmCross.Plugin.BLE\CodeFileBLE.cs:191,1' to void CSLibrary.HighLevelInterface.d__94.MoveNext () [0x0002f].
+Thread finished: #7
+The thread 0x7 has exited with code 0 (0x0).
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 12167ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\CSLibrary.cs:255,1' to bool CSLibrary.HighLevelInterface.ProcessAPIPacket (byte[] recData) [0x0000c].
+Thread finished: #24
+The thread 0x18 has exited with code 0 (0x0).
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\CSLibrary.cs:466,1' to bool CSLibrary.HighLevelInterface.RecvNofigicationPacket (byte[] recvData) [0x000c8].
+Thread started: #25
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\Notification\ClassNotification.cs:155,1' to void CSLibrary.Notification.DeviceRecvState (int value) [0x0002a].
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 60963ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Thread finished: #6
+The thread 0x6 has exited with code 0 (0x0).
+Program execption error, please check BLE_Recv!!! error message : Object reference not set to an instance of an object.
+[IPCThreadState] Slow binder transaction: 19152ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[Looper] Slow dispatch took 241187ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@71309d2 m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) identical 4 lines
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[Looper] Slow dispatch took 1505ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@1b78464 m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) identical 1 line
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[Choreographer] Skipped 14558 frames! The application may be doing too much work on its main thread.
+[Looper] Slow dispatch took 1957ms main h=android.view.Choreographer$FrameHandler c=android.view.Choreographer$FrameDisplayEventReceiver@1d2567e m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+[OpenGLRenderer] Davey! duration=244601ms; Flags=0, IntendedVsync=1232673583121159, Vsync=1232916216444787, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=1232916225728726, AnimationStart=1232916226123778, PerformTraversalsStart=1232916226158674, DrawStart=1232918171099284, SyncQueued=1232918181181889, SyncStart=1232918181659441, IssueDrawCommandsStart=1232918181815066, SwapBuffers=1232918183831264, FrameCompleted=1232918184641994, DequeueBufferDuration=190000, QueueBufferDuration=332000,
+The thread 0x19 has exited with code 0 (0x0).
+Thread finished: #25
+Thread started: #26
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+[Looper] Slow dispatch took 2804ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@c164285 m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[IPCThreadState] Slow binder transaction: 19887ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[Looper] Slow dispatch took 17795ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@e52d8a6 m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[Looper] Slow dispatch took 2881ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@7bf3d3d m=0
+Command timeout
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+[Looper] Slow dispatch took 3782ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@8fc4000 m=0
+[Choreographer] Skipped 226 frames! The application may be doing too much work on its main thread.
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+Thread started: #27
+[Looper] Slow dispatch took 1385ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@3c5d6f5 m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+Thread started: #28
+Thread started: #29
+[Looper] Slow dispatch took 1619ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@45aa2fb m=0
+[Looper] Slow dispatch took 1259ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@be9ed71 m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[IPCThreadState] Slow binder transaction: 26716ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Thread started: #30
+Command timeout
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Thread started: #31
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[IPCThreadState] Slow binder transaction: 14780ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Resolved pending breakpoint at 'C:\Projects\GitHub\CS710S-C-Sharp-APP-for-iOS-ANDROID-UWP\Library\CSLibrary\Source\CSLibrary.cs:466,1' to bool CSLibrary.HighLevelInterface.RecvNofigicationPacket (byte[] recvData) [0x000c8].
+Thread finished: #16
+The thread 0x10 has exited with code 0 (0x0).
+Thread finished: #27
+The thread 0x1b has exited with code 0 (0x0).
+Thread finished: #31
+The thread 0x1f has exited with code 0 (0x0).
+Thread started: #32
+Thread started: #33
+Thread started: #34
+Thread started: #35
+Thread started: #36
+Thread started: #37
+Thread started: #38
+Thread started: #39
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+[IPCThreadState] Slow binder transaction: 11042ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+Thread started: #40
+The thread 0x1a has exited with code 0 (0x0).
+Thread started: #41
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+Thread finished: #26
+Thread started: #42
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+[Looper] Slow dispatch took 1442ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@c481e1d m=0
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[Looper] Slow dispatch took 7443ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@28eebde m=0
+[IPCThreadState] Slow binder transaction: 22428ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[Looper] Slow dispatch took 5427ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@6adf3d5 m=0
+[IPCThreadState] Slow binder transaction: 5433ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+[IPCThreadState] Slow binder transaction: 1078ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+Command timeout
+[Looper] Slow dispatch took 5669ms main h=android.os.Handler c=mono.java.lang.RunnableImplementor@e6f851 m=0
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 6A 82 37 00 00 90 00
+[IPCThreadState] Slow binder transaction: 5681ms { pid=0 uid=1002 InterfaceDescriptor=android.bluetooth.IBluetoothGattCallback code=11 serviceObj=00000073feeb53a0 }
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_3 identical 4 lines
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_3 identical 1 line
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_1 identical 1 line
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_1 identical 2 lines
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 6A 82 9E 25 4E 90 00 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 C2 82 37 00 00 80 01
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_1 identical 1 line
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_2 identical 3 lines
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_2 identical 2 lines
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 6A 82 9E 25 4E 90 00 00
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 C2 82 37 00 00 80 00
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 C2 82 9E 01 41 80 00 00
+Routine : RecvRFIDPacket
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 5F 82 37 00 00 C0 00
+CSLibrary : BT data received 13:A7 B3 05 5F 82 9E 3E A7 C0 00 01 00 06
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 5F 82 37 00 00 C0 04
+CSLibrary : BT data received 31:A7 B3 17 5F 82 9E 96 23 C0 04 43 53 37 31 30 53 72 65 61 64 65 72 43 33 44 39 37 33 00 00 00
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 E8 82 37 00 00 B0 00
+CSLibrary : BT data received 13:A7 B3 05 E8 82 9E 7E 54 B0 00 02 00 06
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 11:A7 B3 03 E8 82 37 00 00 B0 04 00
+CSLibrary : BT data received 42:A7 B3 22 E8 82 9E BC 48 B0 04 4B 42 41 32 33 41 31 50 42 30 30 30 30 33 32 38 34 30 31 30 31 30 31 33 00 00 00 00 00 00 00 00
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 11:A7 B3 03 E8 82 37 00 00 B0 06 00
+CSLibrary : BT data received 42:A7 B3 22 E8 82 9E 8C F3 B0 06 43 53 37 31 30 53 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (DATA1) 17:A7 B3 09 6A 82 37 00 00 90 03 7E 00 00 02 33 37 F9
+CSLibrary : BT data received 11:A7 B3 03 6A 82 9E 0F 26 90 03 00
+wait response : DATA1:WAIT_BTAPIRESPONSE
+CSLibrary : BT data received 32:A7 B3 18 6A D8 9E FE 1D 91 00 02 00 00 11 34 01 06 02 00 07 10 17 13 01 06 05 01 11 16 03 04 CF
+SendAsync : 9003
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_1 identical 1 line
+SendAsync : 9003
+wait response : DATA1:WAIT_BTAPIRESPONSE_DATA1
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+
+
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE_DATA1) 48:A7 B3 28 C2 82 37 00 00 80 02 80 B3 14 71 00 00 1F 0A 00 08 20 00 28 04 30 14 02 30 18 01 50 00 20 50 20 20 50 40 02 EF 98 04 EF AC 04 EF B0 04
+CSLibrary : BT data received 134:A7 B3 7E C2 D9 9E 03 D6 81 00 51 E2 14 71 00 00 75 32 2E 30 30 2E 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 97 00 43 53 37 31 30 53 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4B 42 41 32 33 41 31 50 42 30 30 30 30 33 32 38 34 30 31 30 31 30 31 33 00 00 00 00 00 00 00 00 FF FF 00 00 00 01 00 00 00 00 00 00 00 AA
+
+
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE
+BLE stat : Total Inventory Received 0, Skip packet 86
+Routine : RecvRFIDPacket
+Routine : DeviceRecvData
+SendAsync : 8002
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE
+SendAsync : 8002
+[chatty] uid=10314(csl.CS710Sfulldemo.demo) Binder:12678_1 identical 2 lines
+SendAsync : 8002
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE_DATA1
+CSLibrary : BT send data (COMMANDENDRESPONSE) 23:A7 B3 0F C2 82 37 00 00 80 02 80 B3 9A 06 00 00 06 01 39 06 02 00 09
+wait response : COMMANDENDRESPONSE:NOWAIT
+wait response : COMMANDENDRESPONSE:NOWAIT
+wait response : COMMANDENDRESPONSE:NOWAIT
+wait response : COMMANDENDRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 C2 82 9E 32 F1 80 02 00
+Routine : RecvRFIDPacket
+CSLibrary : BT data received 18:A7 B3 0A C2 DA 9E 4F 4B 81 00 51 E2 9A 06 00 00 01 00
+Routine : RecvRFIDPacket
+Routine : DeviceRecvData
+wait response : COMMANDENDRESPONSE:WAIT_BTAPIRESPONSE_COMMANDENDRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE) 10:A7 B3 02 D9 82 37 00 00 A0 02
+wait response : WAIT_BTAPIRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 D9 82 9E 5E 5F A0 02 00
+wait response : WAIT_BTAPIRESPONSE:WAIT_BTAPIRESPONSE
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE_DATA1) 21:A7 B3 0D 6A 82 37 00 00 90 03 6E 6C 73 30 30 30 36 30 31 30 3B
+CSLibrary : BT data received 11:A7 B3 03 6A 82 9E 0F 26 90 03 00
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE
+CSLibrary : BT data received 11:A7 B3 03 6A DB 9E 3E A2 91 00 06
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE_DATA1
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE_DATA1) 21:A7 B3 0D 6A 82 37 00 00 90 03 6E 6C 73 30 34 30 35 31 30 30 3B
+CSLibrary : BT data received 11:A7 B3 03 6A 82 9E 0F 26 90 03 00
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE
+CSLibrary : BT data received 11:A7 B3 03 6A DC 9E 0E 7E 91 00 06
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE_DATA1
+CSLibrary : BT data received 12:A7 B3 04 D9 82 9E 05 92 A0 00 10 23
+CSLibrary : BT send data (WAIT_BTAPIRESPONSE_DATA1) 21:A7 B3 0D 6A 82 37 00 00 90 03 6E 6C 73 30 30 30 36 30 30 30 3B
+wait response : WAIT_BTAPIRESPONSE_DATA1:NOWAIT
+wait response : WAIT_BTAPIRESPONSE_DATA1:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 6A 82 9E 0F 26 90 03 00
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE
+CSLibrary : BT data received 11:A7 B3 03 6A DD 9E 05 3A 91 00 06
+wait response : WAIT_BTAPIRESPONSE_DATA1:WAIT_BTAPIRESPONSE_DATA1
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT send data (COMMANDENDRESPONSE) 23:A7 B3 0F C2 82 37 00 00 80 02 80 B3 9A 06 01 00 06 01 30 14 02 00 97
+wait response : COMMANDENDRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 C2 82 9E 32 F1 80 02 00
+Routine : RecvRFIDPacket
+CSLibrary : BT data received 18:A7 B3 0A C2 DE 9E 56 86 81 00 51 E2 9A 06 01 00 01 00
+BLE stat : Total Inventory Received 0, Skip packet 89
+Routine : RecvRFIDPacket
+Routine : DeviceRecvData
+wait response : COMMANDENDRESPONSE:WAIT_BTAPIRESPONSE_COMMANDENDRESPONSE
+CSLibrary : BT send data (COMMANDENDRESPONSE) 23:A7 B3 0F C2 82 37 00 00 80 02 80 B3 9A 06 02 00 06 01 30 33 02 0C E4
+wait response : COMMANDENDRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 C2 82 9E 32 F1 80 02 00
+Routine : RecvRFIDPacket
+CSLibrary : BT data received 18:A7 B3 0A C2 DF 9E F6 1E 81 00 51 E2 9A 06 02 00 01 00
+Routine : RecvRFIDPacket
+Routine : DeviceRecvData
+wait response : COMMANDENDRESPONSE:WAIT_BTAPIRESPONSE_COMMANDENDRESPONSE
+CSLibrary : BT send data (COMMANDENDRESPONSE) 23:A7 B3 0F C2 82 37 00 00 80 02 80 B3 9A 06 03 00 06 01 30 31 02 00 00
+wait response : COMMANDENDRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 C2 82 9E 32 F1 80 02 00
+Routine : RecvRFIDPacket
+CSLibrary : BT data received 18:A7 B3 0A C2 E0 9E 5C B9 81 00 51 E2 9A 06 03 00 01 00
+Routine : RecvRFIDPacket
+Routine : DeviceRecvData
+wait response : COMMANDENDRESPONSE:WAIT_BTAPIRESPONSE_COMMANDENDRESPONSE
+CSLibrary : BT send data (COMMANDENDRESPONSE) 23:A7 B3 0F C2 82 37 00 00 80 02 80 B3 9A 06 04 00 06 01 30 33 02 0B B8
+wait response : COMMANDENDRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 C2 82 9E 32 F1 80 02 00
+Routine : RecvRFIDPacket
+CSLibrary : BT data received 18:A7 B3 0A C2 E1 9E 8E CD 81 00 51 E2 9A 06 04 00 01 00
+Routine : RecvRFIDPacket
+Routine : DeviceRecvData
+wait response : COMMANDENDRESPONSE:WAIT_BTAPIRESPONSE_COMMANDENDRESPONSE
+CSLibrary : BT send data (COMMANDENDRESPONSE) 23:A7 B3 0F C2 82 37 00 00 80 02 80 B3 9A 06 05 00 06 01 30 31 02 07 D0
+wait response : COMMANDENDRESPONSE:NOWAIT
+CSLibrary : BT data received 11:A7 B3 03 C2 82 9E 32 F1 80 02 00
+Routine : RecvRFIDPacket
+CSLibrary : BT data received 18:A7 B3 0A C2 E2 9E 15 98 81 00 51 E2 9A 06 05 00 01 00
+Routine : RecvRFIDPacket
+Routine : DeviceRecvData
+wait response : COMMANDENDRESPONSE:WAIT_BTAPIRESPONSE_COMMANDENDRESPONSE
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 12:A7 B3 04 D9 82 9E 60 A4 A0 00 10 25
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
+CSLibrary : BT data received 10:A7 B3 02 D9 82 9E B6 E6 A1 03
diff --git a/MobileMvxApp/BLE.Client.UWP/BLE.Client.UWP.csproj b/MobileMvxApp/BLE.Client.UWP/BLE.Client.UWP.csproj
index 6fb0b40..da753fe 100644
--- a/MobileMvxApp/BLE.Client.UWP/BLE.Client.UWP.csproj
+++ b/MobileMvxApp/BLE.Client.UWP/BLE.Client.UWP.csproj
@@ -11,8 +11,8 @@
CS710S RFID Reader App
en-US
UAP
- 10.0.20348.0
- 10.0.16299.0
+ 10.0.22621.0
+ 10.0.20348.0
14
512
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
@@ -231,6 +231,9 @@
6.1.1
+
+ 4.3.3.952
+
7.1.2
@@ -258,7 +261,7 @@
- {47e1bec1-4717-46f5-9e71-6f4ccb7b0eaf}
+ {1bb029e4-a2c7-46b4-9e8f-f356ec322125}
BLE.Client
diff --git a/MobileMvxApp/BLE.Client.UWP/Properties/AssemblyInfo.cs b/MobileMvxApp/BLE.Client.UWP/Properties/AssemblyInfo.cs
index 78d0d90..45c52ed 100644
--- a/MobileMvxApp/BLE.Client.UWP/Properties/AssemblyInfo.cs
+++ b/MobileMvxApp/BLE.Client.UWP/Properties/AssemblyInfo.cs
@@ -24,6 +24,6 @@
// 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.9.76")]
-[assembly: AssemblyFileVersion("1.0.9.76")]
+[assembly: AssemblyVersion("1.0.10.94")]
+[assembly: AssemblyFileVersion("1.0.10.94")]
[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/BLE.Client.iOS.csproj b/MobileMvxApp/BLE.Client.iOS/BLE.Client.iOS.csproj
index d4981a2..914c87f 100644
--- a/MobileMvxApp/BLE.Client.iOS/BLE.Client.iOS.csproj
+++ b/MobileMvxApp/BLE.Client.iOS/BLE.Client.iOS.csproj
@@ -13,7 +13,7 @@
BLEClientiOS
- automatic
+ manual
true
@@ -51,7 +51,7 @@
4
false
ARM64
- Apple Development: Wallace Sit (JBBYRB3QK9)
+ iPhone Developer
true
Entitlements.plist
-all
@@ -150,6 +150,9 @@
false
+
+ false
+
false
@@ -266,6 +269,9 @@
7.0.1
+
+ 4.3.3.952
+
7.1.2
@@ -322,4 +328,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Info.plist b/MobileMvxApp/BLE.Client.iOS/Info.plist
index 9c94929..d1642b4 100644
--- a/MobileMvxApp/BLE.Client.iOS/Info.plist
+++ b/MobileMvxApp/BLE.Client.iOS/Info.plist
@@ -5,6 +5,7 @@
UIDeviceFamily
1
+ 2
UISupportedInterfaceOrientations
@@ -26,7 +27,7 @@
CFBundleName
BLE.Client
CFBundleShortVersionString
- 0.1.9
+ 0.1.10
UIMainStoryboardFile
LaunchScreen
NSLocationAlwaysUsageDescription
@@ -50,6 +51,6 @@
XSAppIconAssets
Media.xcassets/AppIcon.appiconset
CFBundleVersion
- 76
+ 95
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/AppIcon.appiconset/CSL logo for RFID C# 167x167.png b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/AppIcon.appiconset/CSL logo for RFID C# 167x167.png
new file mode 100644
index 0000000..ccfbc0f
Binary files /dev/null and b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/AppIcon.appiconset/CSL logo for RFID C# 167x167.png differ
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/AppIcon.appiconset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/AppIcon.appiconset/Contents.json
index 006474d..62df306 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/AppIcon.appiconset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/AppIcon.appiconset/Contents.json
@@ -84,11 +84,6 @@
"idiom": "ipad",
"filename": "CSL logo for RFID C# 80x801.png"
},
- {
- "scale": "2x",
- "size": "83.5x83.5",
- "idiom": "ipad"
- },
{
"scale": "1x",
"size": "76x76",
@@ -118,6 +113,12 @@
"size": "76x76",
"idiom": "ipad",
"filename": "CSL logo for RFID C# 152x152.png"
+ },
+ {
+ "scale": "2x",
+ "size": "83.5x83.5",
+ "idiom": "ipad",
+ "filename": "CSL logo for RFID C# 167x167.png"
}
],
"properties": {},
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/filter.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/filter.imageset/Contents.json
index e9e79b8..99b322b 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/filter.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/filter.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "filter.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "filter.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/function.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/function.imageset/Contents.json
index 57cceed..5e07459 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/function.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/function.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "function.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "function.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/inventory.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/inventory.imageset/Contents.json
index d635ddb..f0721c3 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/inventory.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/inventory.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "inventory.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "inventory.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/main_logo.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/main_logo.imageset/Contents.json
index e61d404..9772299 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/main_logo.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/main_logo.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "main_logo.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "main_logo.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/register.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/register.imageset/Contents.json
index dc4befb..f83a391 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/register.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/register.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "register.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "register.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/search.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/search.imageset/Contents.json
index 0d3e1d1..242b505 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/search.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/search.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "search.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "search.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/security.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/security.imageset/Contents.json
index bf225ae..90f63db 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/security.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/security.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "security.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "security.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/settings.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/settings.imageset/Contents.json
index 1130aa9..2b85646 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/settings.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/settings.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "settings.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "settings.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/write.imageset/Contents.json b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/write.imageset/Contents.json
index ba27b17..61cfec4 100644
--- a/MobileMvxApp/BLE.Client.iOS/Media.xcassets/write.imageset/Contents.json
+++ b/MobileMvxApp/BLE.Client.iOS/Media.xcassets/write.imageset/Contents.json
@@ -1,12 +1,14 @@
{
- "images" : [
+ "images": [
{
- "filename" : "write.png",
- "idiom" : "universal"
+ "appearances": [],
+ "idiom": "universal",
+ "filename": "write.png"
}
],
- "info" : {
- "author" : "xcode",
- "version" : 1
+ "properties": {},
+ "info": {
+ "version": 1,
+ "author": "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client.iOS/Resources/CSL logo for RFID C# 167x167.png b/MobileMvxApp/BLE.Client.iOS/Resources/CSL logo for RFID C# 167x167.png
new file mode 100644
index 0000000..ccfbc0f
Binary files /dev/null and b/MobileMvxApp/BLE.Client.iOS/Resources/CSL logo for RFID C# 167x167.png differ
diff --git a/MobileMvxApp/BLE.Client/BLE.Client.csproj b/MobileMvxApp/BLE.Client/BLE.Client.csproj
index 8c6f387..d4cca37 100644
--- a/MobileMvxApp/BLE.Client/BLE.Client.csproj
+++ b/MobileMvxApp/BLE.Client/BLE.Client.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
dc141870-cb13-42a9-a9a3-392a54f09990
@@ -18,6 +18,7 @@
+
@@ -62,6 +63,12 @@
Code
PageImpinjSpecialFeaturesConfig.xaml
+
+ PageInventorytoWedgeForwarderSetting.xaml
+
+
+ PageInventorytoWedgeForwarder.xaml
+
LEDTag.xaml
@@ -72,6 +79,9 @@
Code
PageLEDTagWithInventory.xaml
+
+ PageMQTTInventory.xaml
+
PageUCODE8Inventory.xaml
diff --git a/MobileMvxApp/BLE.Client/BleMvxApplication.cs b/MobileMvxApp/BLE.Client/BleMvxApplication.cs
index 9afeb85..abee9b8 100644
--- a/MobileMvxApp/BLE.Client/BleMvxApplication.cs
+++ b/MobileMvxApp/BLE.Client/BleMvxApplication.cs
@@ -319,6 +319,12 @@ public class BleMvxApplication : MvxApplication
// LED Tag
public static bool _LEDTag_Selected = false;
+ // Wedge Forwarder
+ public static string _WedgeIP = "127.0.0.1";
+ public static int _WedgePort = 9394;
+ public static int _WedgeDuplicateFilter = 0;
+ public static int _WedgeRollingWindows = 1;
+
public override void Initialize()
{
CreatableTypes()
diff --git a/MobileMvxApp/BLE.Client/InterfaceIBatteryOptimizationService.cs b/MobileMvxApp/BLE.Client/InterfaceIBatteryOptimizationService.cs
new file mode 100644
index 0000000..65e30a7
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/InterfaceIBatteryOptimizationService.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLE.Client
+{
+ public interface IBatteryOptimizationService
+ {
+ bool IsBatteryOptimizationDisabled();
+ Task OpenBatteryOptimizationsAsync();
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/PageBarcodeScan.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/PageBarcodeScan.xaml
index f1ac43c..4519245 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/PageBarcodeScan.xaml
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/PageBarcodeScan.xaml
@@ -27,7 +27,12 @@
-
+
+
+
+
+
+
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/ViewModelInventorynScan.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/ViewModelInventorynScan.cs
index 328b947..f172671 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/ViewModelInventorynScan.cs
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Inventory/ViewModelInventorynScan.cs
@@ -5,14 +5,17 @@
using System.Windows.Input;
using Xamarin.Forms;
using Xamarin.Essentials;
+using System.Net;
+
+using System.Net.Http;
+using System.Net.Security;
+using System.Security.Cryptography.X509Certificates;
using Plugin.BLE.Abstractions.Contracts;
using Plugin.BLE.Abstractions;
using Prism.Mvvm;
-//using PCLStorage;
-
using System.Net.Http;
using System.Net.Http.Headers;
@@ -23,6 +26,8 @@
using TagDataTranslation;
using CSLibrary.Barcode.Constants;
using System.Text.RegularExpressions;
+using System.Net.Security;
+using System.Security.Cryptography.X509Certificates;
// GTIN Convert
@@ -158,6 +163,9 @@ public class ViewModelInventorynScan : BaseViewModel
public ICommand OnStartInventoryButtonCommand { protected set; get; }
public ICommand OnClearButtonCommand { protected set; get; }
+ public ICommand OnSendDataCommand { protected set; get; }
+ public ICommand OnShareDataCommand { protected set; get; }
+ public ICommand OnSaveDataCommand { protected set; get; }
public ICommand OnHEXButtonCommand { protected set; get; }
public ICommand OnUPCButtonommand { protected set; get; }
public ICommand OnSGTINButtonCommand { protected set; get; }
@@ -225,7 +233,6 @@ public ViewModelInventorynScan(IAdapter adapter, IUserDialogs userDialogs/* , IP
OnStartInventoryButtonCommand = new Command(StartInventoryClick);
OnClearButtonCommand = new Command(ClearClick);
-
OnStartBarcodeScanButtonCommand = new Command(StartBarcodeScanButtonClick);
OnClearBarcodeDataButtonCommand = new Command(ClearBarcodeDataButtonClick);
OnSendDataCommand = new Command(SendDataButtonClick);
@@ -234,6 +241,9 @@ public ViewModelInventorynScan(IAdapter adapter, IUserDialogs userDialogs/* , IP
OnHEXButtonCommand = new Command(HEXButtonClick);
OnUPCButtonommand = new Command(UPCButtonClick);
OnSGTINButtonCommand = new Command(SGTINButtonClick);
+ OnBarCodeSendDataCommand = new Command(BarCodeSendDataButtonClick);
+ OnBarCodeShareDataCommand = new Command(BarCodeShareDataButtonClick);
+ OnBarCodeSaveDataCommand = new Command(BarCodeSaveDataButtonClick);
_EPCHeaderText = "EPC";
_RSSIHeaderText = "RSSI";
@@ -282,25 +292,14 @@ public override void ViewAppearing()
base.ViewAppearing();
SetEvent(true);
- try
+ if (CheckCurrentPage() == 1)
{
- Page currentPage;
-
- currentPage = ((TabbedPage)Application.Current.MainPage.Navigation.NavigationStack[1]).CurrentPage;
-
- if (currentPage.Title == "Barcode Scan")
- {
- BleMvxApplication._reader.barcode.FastBarcodeMode(true);
- }
- else
- {
- BleMvxApplication._reader.barcode.FastBarcodeMode(false);
- }
+ BleMvxApplication._reader.barcode.FastBarcodeMode(true);
}
- catch (Exception ex)
+ else
{
+ BleMvxApplication._reader.barcode.FastBarcodeMode(false);
}
-
}
public override void ViewDisappearing()
@@ -312,32 +311,103 @@ public override void ViewDisappearing()
if (BleMvxApplication._config.RFID_Vibration)
BleMvxApplication._reader.barcode.VibratorOff();
+ BleMvxApplication._reader.barcode.FastBarcodeMode(false);
+
+ // don't turn off event handler is you need program work in sleep mode.
//SetEvent(false);
+ base.ViewDisappearing();
+ }
+
+ protected override void InitFromBundle(IMvxBundle parameters)
+ {
+ base.InitFromBundle(parameters);
+ }
+
+ private int CheckCurrentPage()
+ {
+ try
+ {
+ var tp = (TabbedPage)(Application.Current.MainPage.Navigation.NavigationStack[Application.Current.MainPage.Navigation.NavigationStack.Count - 1]);
+ var currentPage1 = tp.CurrentPage;
+ int index = tp.Children.IndexOf(currentPage1);
+
+ return index;
+ }
+ catch (Exception ex1)
+ {
+ string msg = "";
+
+ for (int i = Application.Current.MainPage.Navigation.NavigationStack.Count - 1; i >= 0; i--)
+ {
+ msg += "[" + i.ToString() + "]" + ((Application.Current.MainPage.Navigation.NavigationStack[i] is TabbedPage tabbedPage) ? "Y" : "N");
+
+ _userDialogs.Alert(msg + " : " + ex1.Message);
+ }
+ }
+
+
+
+ /*
try
{
- Page currentPage;
+ string msg = "";
+
+ msg += "[Total : " + Application.Current.MainPage.Navigation.NavigationStack.Count.ToString() + "]";
- currentPage = ((TabbedPage)Application.Current.MainPage.Navigation.NavigationStack[1]).CurrentPage;
+ _userDialogs.Alert(msg);
- //if (currentPage.Title != "Barcode Scan")
+ for (int i = Application.Current.MainPage.Navigation.NavigationStack.Count - 1; i >= 0; i--)
{
- BleMvxApplication._reader.barcode.FastBarcodeMode(false);
+ msg += "[" + i.ToString() + "]" + ((Application.Current.MainPage.Navigation.NavigationStack[i] is TabbedPage) ? "Y" : "N");
}
+
+ _userDialogs.Alert(msg );
}
catch (Exception ex)
{
+ _userDialogs.Alert("Error : " + ex.Message);
}
+ */
+ /*
+ try
+ {
+ var tabbedPage = (TabbedPage)Application.Current.MainPage.Navigation.NavigationStack[1];
+ var currentPage = tabbedPage.CurrentPage;
+ int index = tabbedPage.Children.IndexOf(currentPage);
- // don't turn off event handler is you need program work in sleep mode.
- //SetEvent(false);
- base.ViewDisappearing();
- }
+ return index;
+ }
+ catch (Exception ex)
+ {
+ try
+ {
+ for (int i = Application.Current.MainPage.Navigation.NavigationStack.Count - 1; i >= 0; i--)
+ {
+ if (Application.Current.MainPage.Navigation.NavigationStack[i] is TabbedPage tp)
+ {
+ var currentPage1 = tp.CurrentPage;
+ int index = tp.Children.IndexOf(currentPage1);
+
+ return index;
+ }
+ }
+ }
+ catch (Exception ex1)
+ {
+ string msg = "";
- protected override void InitFromBundle(IMvxBundle parameters)
- {
- base.InitFromBundle(parameters);
+ for (int i = Application.Current.MainPage.Navigation.NavigationStack.Count - 1; i >= 0; i--)
+ {
+ msg += "[" + i.ToString() + "]" + ((Application.Current.MainPage.Navigation.NavigationStack[i] is TabbedPage tabbedPage) ? "Y" : "N");
+
+ _userDialogs.Alert(msg + " : " + ex1.Message);
+ }
+ }
+ }
+ */
+ return -1;
}
private void ClearClick()
@@ -1115,9 +1185,9 @@ void VoltageEvent(object sender, CSLibrary.Notification.VoltageEventArgs e)
public ICommand OnStartBarcodeScanButtonCommand { protected set; get; }
public ICommand OnClearBarcodeDataButtonCommand { protected set; get; }
- public ICommand OnSendDataCommand { protected set; get; }
- public ICommand OnShareDataCommand { protected set; get; }
- public ICommand OnSaveDataCommand { protected set; get; }
+ public ICommand OnBarCodeSendDataCommand { protected set; get; }
+ public ICommand OnBarCodeShareDataCommand { protected set; get; }
+ public ICommand OnBarCodeSaveDataCommand { protected set; get; }
private string _startBarcodeScanButtonText = "Start Scan";
public string startBarcodeScanButtonText { get { return _startBarcodeScanButtonText; } }
@@ -1128,6 +1198,7 @@ public class BARCODEInfoViewModel : BindableBase
public string code { get { return this._code; } set { this.SetProperty(ref this._code, value); } }
private uint _count;
public uint count { get { return this._count; } set { this.SetProperty(ref this._count, value); } }
+ public DateTime timeOfRead;
}
public ObservableCollection barcodeData { get; set; } = new ObservableCollection();
@@ -1165,15 +1236,6 @@ private void SendDataButtonClick ()
CSLibrary.Debug.WriteLine("BackupData : {0}", result.ToString());
}
-/* private void ShareDataButtonClick(object ind)
- {
- if (ind == null || (int)ind != 1)
- return;
-
- var result = ShareData();
- CSLibrary.Debug.WriteLine("Share Data : {0}", result.ToString());
- }
-*/
private void ShareDataButtonClick()
{
var result = ShareData();
@@ -1185,6 +1247,25 @@ private void SaveDataButtonClick()
CSLibrary.Debug.WriteLine("Save Data : {0}", result.ToString());
}
+ private void BarCodeSendDataButtonClick()
+ {
+ var result = BackupBarCodeData();
+
+ CSLibrary.Debug.WriteLine("BackupData : {0}", result.ToString());
+ }
+
+ private void BarCodeShareDataButtonClick()
+ {
+ var result = ShareBarcodeData();
+ CSLibrary.Debug.WriteLine("Share Data : {0}", result.ToString());
+ }
+
+ private void BarCodeSaveDataButtonClick()
+ {
+ var result = SaveBarCodeData();
+ CSLibrary.Debug.WriteLine("Save Data : {0}", result.ToString());
+ }
+
private void HEXButtonClick()
{
_displayFormat = 0;
@@ -1282,6 +1363,7 @@ private void AddOrUpdateBarcodeData(CSLibrary.Barcode.Structures.DecodeMessage d
item.code = decodeInfo.pchMessage;
item.count = 1;
+ item.timeOfRead = DateTime.Now;
barcodeData.Insert(0, item);
}
@@ -1297,54 +1379,23 @@ void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e)
{
InvokeOnMainThread(() =>
{
- Page currentPage;
-
- Trace.Message("Receive Key Event");
-
- // try to get current page
- try
+ if (CheckCurrentPage() == 0)
{
- currentPage = ((TabbedPage)Application.Current.MainPage.Navigation.NavigationStack[1]).CurrentPage;
- }
- catch (Exception ex)
- {
- return;
- }
-
- switch (currentPage.Title)
- {
- case "RFID Inventory":
- if (e.KeyCode == CSLibrary.Notification.Key.BUTTON)
+ if (e.KeyCode == CSLibrary.Notification.Key.BUTTON)
+ {
+ if (e.KeyDown)
{
- if (e.KeyDown)
- {
- if (!_KeyDown)
- StartInventory();
- _KeyDown = true;
- }
- else
- {
- if (_KeyDown == true)
- StopInventory();
- _KeyDown = false;
- }
+ if (!_KeyDown)
+ StartInventory();
+ _KeyDown = true;
}
- break;
-
- case "Barcode Scan":
- /*
- if (e.KeyCode == CSLibrary.Notification.Key.BUTTON)
+ else
{
- if (e.KeyDown)
- {
- BarcodeStart();
- }
- else
- {
- BarcodeStop();
- }
- }*/
- break;
+ if (_KeyDown == true)
+ StopInventory();
+ _KeyDown = false;
+ }
+ }
}
});
}
@@ -1375,12 +1426,20 @@ string GetJsonData ()
data.sequenceNumber = BleMvxApplication._sequenceNumber++;
data.rfidReaderName = BleMvxApplication._reader.ReaderName;
+ switch (BleMvxApplication._reader.rfid.GetModelName())
+ {
+ case "CS108":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 13);
+ break;
- data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync();
+ case "CS710S":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 16);
+ break;
+ }
if (data.rfidReaderSerialNumber == null)
_userDialogs.Alert("No Serial Number");
- data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode();
+ data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode().Substring(0, 13);
data.numberOfTags = (UInt16)_TagInfoList.Count;
foreach (var tagitem in _TagInfoList)
@@ -1415,14 +1474,6 @@ string GetCSVData()
CSVdata += tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff") + ",";
CSVdata += tagitem.timeOfRead.ToString("zzz");
CSVdata += System.Environment.NewLine;
-
- /*
- CSVdata += "\"" + tagitem.PC.ToString("X4") + "\",";
- CSVdata += "\"" + tagitem.EPC.ToString() + "\",";
- CSVdata += tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff") + "\",";
- CSVdata += "\"" + tagitem.timeOfRead.ToString("zzz") + "\"";
- CSVdata += System.Environment.NewLine;
- */
}
return CSVdata;
@@ -1456,6 +1507,96 @@ string GetExcelCSVData()
}
}
+ string GetBarcodeJsonData()
+ {
+ try
+ {
+ RESTfulHeader data = new RESTfulHeader();
+
+ data.sequenceNumber = BleMvxApplication._sequenceNumber++;
+ data.rfidReaderName = BleMvxApplication._reader.ReaderName;
+
+ switch (BleMvxApplication._reader.rfid.GetModelName())
+ {
+ case "CS108":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 13);
+ break;
+
+ case "CS710S":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 16);
+ break;
+ }
+ if (data.rfidReaderSerialNumber == null)
+ _userDialogs.Alert("No Serial Number");
+
+ data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode().Substring(0, 13);
+ data.numberOfTags = (UInt16)barcodeData.Count;
+
+ foreach (var tagitem in barcodeData)
+ {
+ RESTfulSDetail item = new RESTfulSDetail();
+ item.pc = "";
+ item.epc = tagitem.code.ToString();
+ item.timeOfRead = tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff");
+ item.timeZone = tagitem.timeOfRead.ToString("zzz");
+ data.tags.Add(item);
+ }
+
+ string JSONdata = Newtonsoft.Json.JsonConvert.SerializeObject(data);
+ return JSONdata;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ string GetBarcodeCSVData()
+ {
+ try
+ {
+ string CSVdata = "";
+
+ foreach (var tagitem in barcodeData)
+ {
+ CSVdata += tagitem.code.ToString() + ",";
+ CSVdata += tagitem.code.ToString();
+ CSVdata += tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff") + ",";
+ CSVdata += tagitem.timeOfRead.ToString("zzz");
+ CSVdata += System.Environment.NewLine;
+ }
+
+ return CSVdata;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ string GetBarcodeExcelCSVData()
+ {
+ try
+ {
+ string CSVdata = "";
+
+ foreach (var tagitem in barcodeData)
+ {
+ CSVdata += tagitem.code.ToString() + ",";
+ CSVdata += tagitem.code.ToString();
+ CSVdata += tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff") + ",";
+ CSVdata += tagitem.timeOfRead.ToString("zzz");
+ CSVdata += System.Environment.NewLine;
+ }
+
+ return CSVdata;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
async System.Threading.Tasks.Task ShareData()
{
bool r = false;
@@ -1490,6 +1631,40 @@ async System.Threading.Tasks.Task ShareData()
return r;
}
+ async System.Threading.Tasks.Task ShareBarcodeData()
+ {
+ bool r = false;
+
+ switch (BleMvxApplication._config.RFID_ShareFormat)
+ {
+ case 0: // JSON
+ r = await CrossShare.Current.Share(new Plugin.Share.Abstractions.ShareMessage
+ {
+ Text = GetBarcodeJsonData(),
+ Title = "CS108 barcode list"
+ });
+ break;
+
+ case 1:
+ r = await CrossShare.Current.Share(new Plugin.Share.Abstractions.ShareMessage
+ {
+ Text = GetBarcodeCSVData(),
+ Title = "CS108 barcode list.csv"
+ });
+ break;
+
+ case 2:
+ r = await CrossShare.Current.Share(new Plugin.Share.Abstractions.ShareMessage
+ {
+ Text = GetBarcodeExcelCSVData(),
+ Title = "CS108 barcode list.csv"
+ });
+ break;
+ }
+
+ return r;
+ }
+
async System.Threading.Tasks.Task SaveData()
{
string fileExtName = "";
@@ -1561,6 +1736,65 @@ async System.Threading.Tasks.Task SaveData()
return true;
}
+ async System.Threading.Tasks.Task SaveBarCodeData()
+ {
+ string fileExtName = "";
+ string Text = "";
+
+ switch (BleMvxApplication._config.RFID_ShareFormat)
+ {
+ case 0: // JSON
+ fileExtName = "json";
+ Text = GetBarcodeJsonData();
+ break;
+
+ case 1:
+ fileExtName = "csv";
+ Text = GetBarcodeCSVData();
+ break;
+
+ case 2:
+ fileExtName = "csv";
+ Text = GetBarcodeExcelCSVData();
+ break;
+
+ default:
+ fileExtName = "txt";
+ break;
+ }
+
+ switch (Xamarin.Forms.Device.RuntimePlatform)
+ {
+ case Xamarin.Forms.Device.Android:
+ {
+ if (await Permissions.CheckStatusAsync() != PermissionStatus.Granted)
+ {
+ await Permissions.RequestAsync();
+ }
+
+ var documents = DependencyService.Get().GetPath();
+ var filename = System.IO.Path.Combine(documents, "BarcodeData-" + System.DateTime.Now.ToString("yyyyMMddHHmmss") + "." + fileExtName);
+ //System.IO.File.WriteAllText(filename, Text);
+ using (var writer = System.IO.File.CreateText(filename))
+ {
+ await writer.WriteLineAsync(Text);
+ }
+ }
+ break;
+
+ default:
+ {
+ var documents = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
+ var filename = System.IO.Path.Combine(documents, "BarcodeData-" + System.DateTime.Now.ToString("yyyyMMddHHmmss") + "." + fileExtName);
+ System.IO.File.WriteAllText(filename, Text);
+ }
+ break;
+ }
+
+ _userDialogs.AlertAsync("File saved, please check file in public folder");
+
+ return true;
+ }
async System.Threading.Tasks.Task BackupData()
{
@@ -1571,11 +1805,20 @@ async System.Threading.Tasks.Task BackupData()
data.sequenceNumber = BleMvxApplication._sequenceNumber ++;
data.rfidReaderName = BleMvxApplication._reader.ReaderName;
- data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync();
+ switch (BleMvxApplication._reader.rfid.GetModelName())
+ {
+ case "CS108":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 13);
+ break;
+
+ case "CS710S":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 16);
+ break;
+ }
if (data.rfidReaderSerialNumber == null)
_userDialogs.Alert("No Serial Number");
- data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode();
+ data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode().Substring(0,13);
data.numberOfTags = (UInt16)_TagInfoList.Count;
foreach (var tagitem in _TagInfoList)
@@ -1601,8 +1844,13 @@ async System.Threading.Tasks.Task BackupData()
fullPath += @"/create-update-delete/update-entity/tagdata";
var uri = new Uri(fullPath + "?" + JSONdata);
-
- HttpClient client = new HttpClient();
+ var handler = new HttpClientHandler();
+#if NETSTANDARD2_1
+ handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
+#elif NETSTANDARD2_0
+ ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
+#endif
+ HttpClient client = new HttpClient(handler);
client.MaxResponseContentBufferSize = 102400;
HttpResponseMessage response = null;
@@ -1638,8 +1886,13 @@ async System.Threading.Tasks.Task BackupData()
var uri1 = new Uri(string.Format(fullPath1, string.Empty));
var content1 = new StringContent(JSONdata, System.Text.Encoding.UTF8, "application/json");
-
- HttpClient client1 = new HttpClient();
+ var handler = new HttpClientHandler();
+#if NETSTANDARD2_1
+ handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
+#elif NETSTANDARD2_0
+ ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
+#endif
+ HttpClient client1 = new HttpClient(handler);
client1.MaxResponseContentBufferSize = 102400;
HttpResponseMessage response1 = null;
@@ -1659,20 +1912,169 @@ async System.Threading.Tasks.Task BackupData()
catch (Exception ex1)
{
Trace.Message(ex1.Message);
+ _userDialogs.Alert("Fail to Save to Cloud Server !!!!!" + Environment.NewLine + ex1.Message);
+ }
+ }
+
+ }
+ catch (Exception ex)
+ {
+ Trace.Message(ex.Message);
+ _userDialogs.Alert("URL Fail !!!!!" + Environment.NewLine + ex.Message);
+ }
+
+ return false;
+ }
+
+ async System.Threading.Tasks.Task BackupBarCodeData()
+ {
+ try
+ {
+ RESTfulHeader data = new RESTfulHeader();
+
+ data.sequenceNumber = BleMvxApplication._sequenceNumber++;
+ data.rfidReaderName = BleMvxApplication._reader.ReaderName;
+
+ switch (BleMvxApplication._reader.rfid.GetModelName())
+ {
+ case "CS108":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 13);
+ break;
+
+ case "CS710S":
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync().Substring(0, 16);
+ break;
+ }
+ if (data.rfidReaderSerialNumber == null)
+ _userDialogs.Alert("No Serial Number");
+
+ data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode().Substring(0, 13);
+ data.numberOfTags = (UInt16)barcodeData.Count;
+
+ foreach (var tagitem in barcodeData)
+ {
+ RESTfulSDetail item = new RESTfulSDetail();
+ item.pc = "";
+ item.epc = tagitem.code.ToString();
+ item.timeOfRead = tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff");
+ item.timeZone = tagitem.timeOfRead.ToString("zzz");
+ data.tags.Add(item);
+ }
+
+ string JSONdata = Newtonsoft.Json.JsonConvert.SerializeObject(data);
+
+ // Post to server when parameters
+ if (BleMvxApplication._config.RFID_SavetoCloud && BleMvxApplication._config.RFID_CloudProtocol == 1)
+ {
+ //string rootPath = @"https://www.convergence.com.hk:29090/WebServiceRESTs/1.0/req";
+ //string rootPath = @"https://192.168.25.21:29090/WebServiceRESTs/1.0/req";
+ string fullPath = BleMvxApplication._config.RFID_IPAddress;
+
+ if (fullPath.Length >= 28 && fullPath.Substring(8, 28) == "democloud.convergence.com.hk")
+ fullPath += @"/create-update-delete/update-entity/tagdata";
+
+ var uri = new Uri(fullPath + "?" + JSONdata);
+ var handler = new HttpClientHandler();
+#if NETSTANDARD2_1
+ handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
+#elif NETSTANDARD2_0
+ ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
+// ServicePointManager.ServerCertificateValidationCallback += SelfSignedForLocalhost;
+#endif
+ HttpClient client = new HttpClient(handler);
+ client.MaxResponseContentBufferSize = 102400;
+
+ HttpResponseMessage response = null;
+
+ try
+ {
+ response = await client.PostAsync(uri, new StringContent("", System.Text.Encoding.UTF8, "application/json"));
+ if (response.IsSuccessStatusCode)
+ {
+ var a = response.Content;
+ var b = await a.ReadAsStringAsync();
+ _userDialogs.Alert("Success Save to Cloud Server : " + b);
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ Trace.Message(ex.Message);
}
_userDialogs.Alert("Fail to Save to Cloud Server !!!!!");
}
+ // Post to server when body
+ if (BleMvxApplication._config.RFID_SavetoCloud && BleMvxApplication._config.RFID_CloudProtocol == 0)
+ {
+ //string rootPath = @"https://www.convergence.com.hk:29090/WebServiceRESTs/1.0/req";
+ //string rootPath = @"https://192.168.25.21:29090/WebServiceRESTs/1.0/req";
+ string fullPath1 = BleMvxApplication._config.RFID_IPAddress;
+
+ if (fullPath1.Length >= 28 && fullPath1.Substring(8, 28) == "democloud.convergence.com.hk")
+ fullPath1 += @"/create-update-delete/update-entity/tagdata";
+
+ var uri1 = new Uri(string.Format(fullPath1, string.Empty));
+ var handler = new HttpClientHandler();
+#if NETSTANDARD2_1
+ handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
+#elif NETSTANDARD2_0
+ ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
+#endif
+ HttpClient client1 = new HttpClient(handler);
+ client1.MaxResponseContentBufferSize = 102400;
+
+ var content1 = new StringContent(JSONdata, System.Text.Encoding.UTF8, "application/json");
+
+ HttpResponseMessage response1 = null;
+
+ try
+ {
+ response1 = await client1.PostAsync(uri1, content1);
+ //response = await client.PutAsync(uri, content);
+ if (response1.IsSuccessStatusCode)
+ {
+ var a = response1.Content;
+ var b = await a.ReadAsStringAsync();
+ _userDialogs.Alert("Success Save to Cloud Server : " + b);
+ return true;
+ }
+ }
+ catch (Exception ex1)
+ {
+ Trace.Message(ex1.Message);
+ _userDialogs.Alert("Fail to Save to Cloud Server !!!!!" + Environment.NewLine + ex1.Message);
+ }
+ }
+
}
catch (Exception ex)
{
- Trace.Message("data fail");
- var a = ex.Message;
+ Trace.Message(ex.Message);
+ _userDialogs.Alert("URL Fail !!!!!" + Environment.NewLine + ex.Message);
}
return false;
}
+#if NETSTANDARD2_0
+ private static bool SelfSignedForLocalhost(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
+ {
+ if (sslPolicyErrors == SslPolicyErrors.None)
+ {
+ return true;
+ }
+
+ // For HTTPS requests to this specific host, we expect this specific certificate.
+ // In practice, you'd want this to be configurable and allow for multiple certificates per host, to enable
+ // seamless certificate rotations.
+ return sender is HttpWebRequest httpWebRequest
+ && httpWebRequest.RequestUri.Host == "localhost"
+ && certificate is X509Certificate2 x509Certificate2
+ && x509Certificate2.Thumbprint == "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ && sslPolicyErrors == SslPolicyErrors.RemoteCertificateChainErrors;
+ }
+#endif
}
-}
+}
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml
index 61ef8d0..0bd13c0 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml
@@ -8,12 +8,14 @@
-
+
+
-
+
+
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml.cs
index f2128ee..a847648 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml.cs
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/Settings/PageAbout.xaml.cs
@@ -22,7 +22,8 @@ public PageAbout()
this.Icon = new FileImageSource();
this.Icon.File = "icons8-Settings-50-4-30x30.png";
}
-
+
+ labelModel.Text = "Model " + BleMvxApplication._reader.rfid.GetFullModelName();
labelAppVer.Text = "Application Version " + DependencyService.Get().GetVersion() + "-" + DependencyService.Get().GetBuild().ToString();
labelLibVer.Text = "Library Version " + BleMvxApplication._reader.GetVersion().ToString();
labelBtFwVer.Text = "Bluetooth Firmware Version " + Version2String(BleMvxApplication._reader.bluetoothIC.GetFirmwareVersion());
@@ -32,6 +33,7 @@ public PageAbout()
else
labelSiliconlabFwVer.Text = "SiliconLab IC Firmware Version " + Version2String(BleMvxApplication._reader.siliconlabIC.GetFirmwareVersion());
labelSerialNumber.Text = "Reader Serial Number " + BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync();
+ labelPCBSerialNumber.Text = "PCB Serial Number " + BleMvxApplication._reader.rfid.GetPCBAssemblyCode();
}
string Version2String(uint ver)
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarder.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarder.xaml
new file mode 100644
index 0000000..9d8e1f1
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarder.xaml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarder.xaml.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarder.xaml.cs
new file mode 100644
index 0000000..b68bfb3
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarder.xaml.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using BLE.Client.Pages;
+using BLE.Client.ViewModels;
+using MvvmCross.Forms.Views;
+using Xamarin.Forms;
+
+namespace BLE.Client.Pages
+{
+ public partial class PageInventorytoWedgeForwarder : MvxContentPage
+ {
+ public PageInventorytoWedgeForwarder()
+ {
+ InitializeComponent();
+ }
+
+ public async void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
+ {
+ var answer = await DisplayAlert("Select Tag", "Selected Tag for Read/Write and Geiger search", "OK", "Cancel");
+
+ if (answer)
+ {
+ //BLE.Client.ViewModels.ViewModelInventorynScan.TagInfo Items = (BLE.Client.ViewModels.ViewModelInventorynScan.TagInfo)e.SelectedItem;
+ TagInfoViewModel Items = (TagInfoViewModel)e.SelectedItem;
+
+ BleMvxApplication._SELECT_EPC = Items.EPC;
+ BleMvxApplication._SELECT_PC = Items.PC;
+
+ if ((BleMvxApplication._config.RFID_MBI_MultiBank1Enable && BleMvxApplication._config.RFID_MBI_MultiBank1 == CSLibrary.Constants.MemoryBank.TID) ||
+ (!BleMvxApplication._config.RFID_MBI_MultiBank1Enable && BleMvxApplication._config.RFID_MBI_MultiBank2Enable && BleMvxApplication._config.RFID_MBI_MultiBank2 == CSLibrary.Constants.MemoryBank.TID))
+ BleMvxApplication._SELECT_TID = Items.Bank1Data;
+ else if (BleMvxApplication._config.RFID_MBI_MultiBank2Enable && BleMvxApplication._config.RFID_MBI_MultiBank2 == CSLibrary.Constants.MemoryBank.TID)
+ BleMvxApplication._SELECT_TID = Items.Bank2Data;
+ }
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarderSetting.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarderSetting.xaml
new file mode 100644
index 0000000..2c4cc02
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarderSetting.xaml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarderSetting.xaml.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarderSetting.xaml.cs
new file mode 100644
index 0000000..c014a5f
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/PageInventorytoWedgeForwarderSetting.xaml.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Design;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using BLE.Client.ViewModels;
+using MvvmCross.Forms.Views;
+using Xamarin.Forms;
+using Xamarin.Forms.PlatformConfiguration.AndroidSpecific;
+using Xamarin.Forms.Xaml;
+
+namespace BLE.Client.Pages
+{
+ public partial class PageInventorytoWedgeForwarderSetting : MvxContentPage
+ {
+ string[] duplicateFilterOptions_cs710 = new string[] { "0. Send Unique Tag only once \n (until buffer cleared)", "1. Send All Tags received", "2. Send unique tags using \n duplicate eliminate window" };
+ string[] duplicateFilterOptions_cs108 = new string[] { "0. Send Unique Tag only once \n (until buffer cleared)", "1. Send All Tags received" };
+
+ public PageInventorytoWedgeForwarderSetting()
+ {
+ InitializeComponent();
+
+ entryIP.Text = BleMvxApplication._WedgeIP;
+ entryPort.Text = BleMvxApplication._WedgePort.ToString();
+ if (BleMvxApplication._reader.rfid.GetModel() == CSLibrary.RFIDDEVICE.MODEL.CS108)
+ {
+ buttonTagDuplicateFilter.Text = duplicateFilterOptions_cs710[1];
+ }
+ else
+ {
+ buttonTagDuplicateFilter.Text = duplicateFilterOptions_cs710[2];
+ }
+ entryRollingWindows.Text = BleMvxApplication._WedgeRollingWindows.ToString() ;
+ }
+
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+
+ if (Device.RuntimePlatform == Device.Android)
+ {
+ CheckBatteryOptimization();
+ }
+ else
+ {
+ BatteryUsage.IsVisible = false;
+ Normal.IsVisible = true;
+ }
+ }
+
+ void CheckBatteryOptimization()
+ {
+ if (!DependencyService.Get().IsBatteryOptimizationDisabled())
+ {
+ // Be sure to select unrestricted in battery usage to work properly.
+ BatteryUsage.IsVisible = true;
+ Normal.IsVisible = false;
+ }
+ else{
+ BatteryUsage.IsVisible = false;
+ Normal.IsVisible = true;
+ }
+ }
+
+ public async void buttonTagDuplicateFilterClicked(object sender, EventArgs e)
+ {
+ string answer;
+
+ if (BleMvxApplication._reader.rfid.GetModel() == CSLibrary.RFIDDEVICE.MODEL.CS710S)
+ answer = await DisplayActionSheet("Duplicate Filter", "Cancel", null, duplicateFilterOptions_cs710);
+ else
+ answer = await DisplayActionSheet("Duplicate Filter", "Cancel", null, duplicateFilterOptions_cs108);
+
+ if (answer != null && answer != "Cancel")
+ buttonTagDuplicateFilter.Text = answer;
+ }
+
+
+ public async void buttonTagDuplicateFilterPropertyChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ if (buttonTagDuplicateFilter != null)
+ if (buttonTagDuplicateFilter.Text.Substring(0, 1) == "2")
+ sracklayoutRollingWindows.IsVisible = true;
+ else
+ sracklayoutRollingWindows.IsVisible = false;
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine(ex.Message);
+ }
+ }
+
+ public async void buttonOKClicked(object sender, EventArgs e)
+ {
+ BleMvxApplication._WedgeIP = entryIP.Text;
+ try
+ {
+ BleMvxApplication._WedgePort = int.Parse(entryPort.Text);
+ BleMvxApplication._WedgeDuplicateFilter = int.Parse(buttonTagDuplicateFilter.Text.Substring(0, 1));
+ BleMvxApplication._WedgeRollingWindows = int.Parse(entryRollingWindows.Text);
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine(ex.Message);
+ }
+ }
+
+ public async void buttonGotoBatteryUsageSettingClicked(object sender, EventArgs e)
+ {
+ await DependencyService.Get().OpenBatteryOptimizationsAsync();
+
+ //System.Diagnostics.Process.GetCurrentProcess().CloseMainWindow();
+ //System.Diagnostics.Process.GetCurrentProcess().Close();
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/ViewModelInventorytoWedgeForwarder.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/ViewModelInventorytoWedgeForwarder.cs
new file mode 100644
index 0000000..1f713b3
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/ViewModelInventorytoWedgeForwarder.cs
@@ -0,0 +1,601 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Collections.Generic;
+using Acr.UserDialogs;
+using MvvmCross;
+using System.Net.Sockets;
+
+using System.Windows.Input;
+using Xamarin.Forms;
+
+
+using Plugin.BLE.Abstractions.Contracts;
+
+using Plugin.BLE.Abstractions;
+using Plugin.BLE.Abstractions.Extensions;
+
+using Prism.Mvvm;
+using MvvmCross.ViewModels;
+using BLE.Client.Pages;
+using System.Net;
+using System.Text;
+
+namespace BLE.Client.ViewModels
+{
+ public class ViewModelInventorytoWedgeForwarder : BaseViewModel
+ {
+ private readonly IUserDialogs _userDialogs;
+
+ #region -------------- RFID inventory -----------------
+
+ public ICommand OnStartInventoryButtonCommand { protected set; get; }
+ public ICommand OnClearButtonCommand { protected set; get; }
+
+ private ObservableCollection _TagInfoList = new ObservableCollection();
+ public ObservableCollection TagInfoList { get { return _TagInfoList; } set { SetProperty(ref _TagInfoList, value); } }
+
+ public int tagsCount = 0;
+ bool _newTag = false;
+ int _tagCountForAlert = 0;
+ bool _newTagFound = false;
+
+ public bool _startInventory = true;
+ private bool _KeyDown = false;
+
+ public string FilterIndicator { get { return (BleMvxApplication._PREFILTER_Enable | BleMvxApplication._POSTFILTER_MASK_Enable | BleMvxApplication._RSSIFILTER_Type != CSLibrary.Constants.RSSIFILTERTYPE.DISABLE) ? "Filter On" : ""; } }
+
+ private string _startInventoryButtonText = "Start Inventory";
+ public string startInventoryButtonText { get { return _startInventoryButtonText; } }
+
+ bool _tagCount = false;
+
+ private string _tagPerSecondText = "0 tags/s";
+ public string tagPerSecondText { get { return _tagPerSecondText; } }
+ private string _numberOfTagsText = "0 tags";
+ public string numberOfTagsText { get { return _numberOfTagsText; } }
+ private string _labelVoltage = "";
+ public string labelVoltage { get { return _labelVoltage; } }
+
+ private int _ListViewRowHeight = -1;
+ public int ListViewRowHeight { get { return _ListViewRowHeight; } set { _ListViewRowHeight = value; } }
+
+ DateTime InventoryStartTime;
+ private double _InventoryTime = 0;
+ public string InventoryTime { get { return ((uint)_InventoryTime).ToString() + "s"; } }
+
+ private int _DefaultRowHight;
+
+ bool _cancelVoltageValue = false;
+
+ #endregion
+
+ public ViewModelInventorytoWedgeForwarder(IAdapter adapter, IUserDialogs userDialogs) : base(adapter)
+ {
+ _userDialogs = userDialogs;
+
+ RaisePropertyChanged(() => ListViewRowHeight);
+ _DefaultRowHight = ListViewRowHeight;
+
+ OnStartInventoryButtonCommand = new Command(StartInventoryClick);
+ OnClearButtonCommand = new Command(ClearClick);
+
+ BleMvxApplication._reader.rfid.SetCountry(BleMvxApplication._config.RFID_Region, (int)BleMvxApplication._config.RFID_FixedChannel);
+
+ InventorySetting();
+ }
+
+ ~ViewModelInventorytoWedgeForwarder()
+ {
+ BleMvxApplication._reader.barcode.Stop();
+ }
+
+ public override void ViewAppearing()
+ {
+ base.ViewAppearing();
+ SetEvent(true);
+ }
+
+ public override void ViewDisappearing()
+ {
+ base.ViewDisappearing();
+ }
+
+ protected override void InitFromBundle(IMvxBundle parameters)
+ {
+ base.InitFromBundle(parameters);
+ }
+
+ private void ClearClick()
+ {
+ InvokeOnMainThread(() =>
+ {
+ lock (TagInfoList)
+ {
+ TagInfoList.Clear();
+ _numberOfTagsText = _TagInfoList.Count.ToString() + " tags";
+ RaisePropertyChanged(() => numberOfTagsText);
+
+ tagsCount = 0;
+ _tagPerSecondText = tagsCount.ToString() + " tags/s";
+ RaisePropertyChanged(() => tagPerSecondText);
+ }
+ });
+ }
+
+ private void SetEvent(bool enable)
+ {
+ // Cancel RFID event handler
+ BleMvxApplication._reader.rfid.ClearEventHandler();
+
+ // Cancel Barcode event handler
+ BleMvxApplication._reader.barcode.ClearEventHandler();
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.ClearEventHandler();
+
+ if (enable)
+ {
+ // RFID event handler
+ BleMvxApplication._reader.rfid.OnAsyncCallback += new EventHandler(TagInventoryEvent);
+ BleMvxApplication._reader.rfid.OnStateChanged += new EventHandler(StateChangedEvent);
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.OnKeyEvent += new EventHandler(HotKeys_OnKeyEvent);
+ BleMvxApplication._reader.notification.OnVoltageEvent += new EventHandler(VoltageEvent);
+ }
+ }
+
+ void SetConfigPower()
+ {
+ if (BleMvxApplication._reader.rfid.GetAntennaPort() == 1)
+ {
+ if (BleMvxApplication._config.RFID_PowerSequencing_NumberofPower == 0)
+ {
+ BleMvxApplication._reader.rfid.SetPowerSequencing(0);
+ BleMvxApplication._reader.rfid.SetPowerLevel(BleMvxApplication._config.RFID_Antenna_Power[0]);
+ }
+ else
+ BleMvxApplication._reader.rfid.SetPowerSequencing(BleMvxApplication._config.RFID_PowerSequencing_NumberofPower, BleMvxApplication._config.RFID_PowerSequencing_Level, BleMvxApplication._config.RFID_PowerSequencing_DWell);
+ }
+ else
+ {
+ for (uint cnt = 0; cnt < BleMvxApplication._reader.rfid.GetAntennaPort(); cnt++)
+ {
+ BleMvxApplication._reader.rfid.SetPowerLevel(BleMvxApplication._config.RFID_Antenna_Power[cnt], cnt);
+ }
+ }
+ }
+
+ void InventorySetting()
+ {
+ BleMvxApplication._reader.rfid.CancelAllSelectCriteria();
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags = CSLibrary.Constants.SelectFlags.ZERO;
+
+ SetConfigPower();
+ BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
+ BleMvxApplication._reader.rfid.SetTagDelayTime((uint)BleMvxApplication._config.RFID_CompactInventoryDelayTime); // for CS108 only
+ BleMvxApplication._reader.rfid.SetIntraPacketDelayTime((uint)BleMvxApplication._config.RFID_IntraPacketDelayTime); // for CS710S only
+ BleMvxApplication._reader.rfid.SetDuplicateEliminationRollingWindow(BleMvxApplication._config.RFID_DuplicateEliminationRollingWindow);
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(BleMvxApplication._config.RFID_Profile);
+ BleMvxApplication._reader.rfid.SetTagGroup(BleMvxApplication._config.RFID_TagGroup);
+
+ if (BleMvxApplication._config.RFID_Algorithm == CSLibrary.Constants.SingulationAlgorithm.DYNAMICQ)
+ {
+ BleMvxApplication._config.RFID_DynamicQParms.toggleTarget = BleMvxApplication._config.RFID_ToggleTarget ? 1U : 0;
+ BleMvxApplication._reader.rfid.SetDynamicQParms(BleMvxApplication._config.RFID_DynamicQParms);
+ }
+ else
+ {
+ BleMvxApplication._config.RFID_FixedQParms.toggleTarget = BleMvxApplication._config.RFID_ToggleTarget ? 1U : 0;
+ BleMvxApplication._reader.rfid.SetFixedQParms(BleMvxApplication._config.RFID_FixedQParms);
+ }
+
+ // Select Criteria filter
+ if (BleMvxApplication._PREFILTER_Enable)
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags |= CSLibrary.Constants.SelectFlags.SELECT;
+ BleMvxApplication._reader.rfid.Options.TagSelected.flags = CSLibrary.Constants.SelectMaskFlags.ENABLE_TOGGLE;
+ if (BleMvxApplication._PREFILTER_Bank == 1)
+ {
+ BleMvxApplication._reader.rfid.Options.TagSelected.bank = CSLibrary.Constants.MemoryBank.EPC;
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMask = new CSLibrary.Structures.S_MASK(BleMvxApplication._PREFILTER_MASK_EPC);
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMaskOffset = BleMvxApplication._PREFILTER_MASK_Offset;
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMaskLength = (uint)(BleMvxApplication._PREFILTER_MASK_EPC.Length) * 4;
+ }
+ else
+ {
+ BleMvxApplication._reader.rfid.Options.TagSelected.bank = (CSLibrary.Constants.MemoryBank)(BleMvxApplication._PREFILTER_Bank);
+ BleMvxApplication._reader.rfid.Options.TagSelected.Mask = CSLibrary.Tools.Hex.ToBytes(BleMvxApplication._PREFILTER_MASK_EPC);
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskOffset = BleMvxApplication._PREFILTER_MASK_Offset;
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskLength = (uint)(BleMvxApplication._PREFILTER_MASK_EPC.Length) * 4;
+ }
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PREFILTER);
+ }
+
+ BleMvxApplication._reader.rfid.SetRSSIdBmFilter(BleMvxApplication._RSSIFILTER_Type, BleMvxApplication._RSSIFILTER_Option, BleMvxApplication._RSSIFILTER_Threshold_dBm);
+
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 0;
+ if (BleMvxApplication._config.RFID_MBI_MultiBank1Enable)
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks++;
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank1 = BleMvxApplication._config.RFID_MBI_MultiBank1;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset1 = BleMvxApplication._config.RFID_MBI_MultiBank1Offset;
+ BleMvxApplication._reader.rfid.Options.TagRanging.count1 = BleMvxApplication._config.RFID_MBI_MultiBank1Count;
+ }
+
+ if (BleMvxApplication._config.RFID_MBI_MultiBank2Enable)
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks++;
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks == 1)
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank1 = BleMvxApplication._config.RFID_MBI_MultiBank2;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset1 = BleMvxApplication._config.RFID_MBI_MultiBank2Offset;
+ BleMvxApplication._reader.rfid.Options.TagRanging.count1 = BleMvxApplication._config.RFID_MBI_MultiBank2Count;
+ }
+ else
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank2 = BleMvxApplication._config.RFID_MBI_MultiBank2;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset2 = BleMvxApplication._config.RFID_MBI_MultiBank2Offset;
+ BleMvxApplication._reader.rfid.Options.TagRanging.count2 = BleMvxApplication._config.RFID_MBI_MultiBank2Count;
+ }
+ }
+
+ BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = false;
+ BleMvxApplication._reader.rfid.Options.TagRanging.focus = BleMvxApplication._config.RFID_Focus;
+ BleMvxApplication._reader.rfid.Options.TagRanging.fastid = BleMvxApplication._config.RFID_FastId;
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PRERANGING);
+ }
+
+ static void SendData(string message)
+ {
+ UdpClient client = new UdpClient();
+ IPEndPoint ip = new IPEndPoint(IPAddress.Parse(BleMvxApplication._WedgeIP), BleMvxApplication._WedgePort);
+
+ byte[] bytes = Encoding.ASCII.GetBytes(message + System.Environment.NewLine);
+
+ client.Send(bytes, bytes.Length, ip);
+ client.Close();
+ }
+
+ void StartInventory()
+ {
+ if (_startInventory == false)
+ return;
+
+ //TagInfoList.Clear();
+
+ StartTagCount();
+ //if (BleMvxApplication._config.RFID_OperationMode == CSLibrary.Constants.RadioOperationMode.CONTINUOUS)
+ {
+ _startInventory = false;
+ _startInventoryButtonText = "Stop Inventory";
+ }
+
+ _ListViewRowHeight = 40 + (int)(BleMvxApplication._reader.rfid.Options.TagRanging.multibanks * 10);
+ RaisePropertyChanged(() => ListViewRowHeight);
+
+ InventoryStartTime = DateTime.Now;
+ if (BleMvxApplication._WedgeDuplicateFilter == 2)
+ {
+ BleMvxApplication._reader.rfid.SetDuplicateEliminationRollingWindow((uint)BleMvxApplication._WedgeRollingWindows);
+ }
+ else {
+ BleMvxApplication._reader.rfid.SetDuplicateEliminationRollingWindow(0);
+ }
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_EXERANGING);
+ ClassBattery.SetBatteryMode(ClassBattery.BATTERYMODE.INVENTORY);
+ _cancelVoltageValue = true;
+
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ async void InventoryStopped()
+ {
+ if (_startInventory)
+ return;
+
+ _startInventory = true;
+ _startInventoryButtonText = "Start Inventory";
+
+ _tagCount = false;
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ void StopInventory ()
+ {
+ if (_startInventory)
+ return;
+
+ _startInventory = true;
+ _startInventoryButtonText = "Start Inventory";
+
+ _tagCount = false;
+ BleMvxApplication._reader.rfid.StopOperation();
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ void StartInventoryClick()
+ {
+ if (_startInventory)
+ {
+ StartInventory();
+ }
+ else
+ {
+ StopInventory();
+ }
+ }
+
+ void StartTagCount()
+ {
+ tagsCount = 0;
+ _tagCount = true;
+
+ // Create a timer that waits one second, then invokes every second.
+ Xamarin.Forms.Device.StartTimer(TimeSpan.FromMilliseconds(1000), () =>
+ {
+ _InventoryTime = (DateTime.Now - InventoryStartTime).TotalSeconds;
+ RaisePropertyChanged(() => InventoryTime);
+
+ _tagCountForAlert = 0;
+
+ _numberOfTagsText = _TagInfoList.Count.ToString() + " tags";
+ RaisePropertyChanged(() => numberOfTagsText);
+
+ _tagPerSecondText = tagsCount.ToString() + " tags/s";
+ RaisePropertyChanged(() => tagPerSecondText);
+ tagsCount = 0;
+
+ if (_tagCount)
+ return true;
+
+ return false;
+ });
+ }
+
+ void StopInventoryClick()
+ {
+ BleMvxApplication._reader.rfid.StopOperation();
+ }
+
+ void TagInventoryEvent(object sender, CSLibrary.Events.OnAsyncCallbackEventArgs e)
+ {
+ if (e.type != CSLibrary.Constants.CallbackType.TAG_RANGING)
+ return;
+
+ InvokeOnMainThread(() =>
+ {
+ _tagCountForAlert++;
+ if (_tagCountForAlert == 1)
+ {
+ if (BleMvxApplication._config.RFID_InventoryAlertSound)
+ {
+ if (_newTagFound)
+ Xamarin.Forms.DependencyService.Get().SystemSound(3);
+ else
+ Xamarin.Forms.DependencyService.Get().SystemSound(2);
+ _newTagFound = false;
+ }
+ }
+ else if (_tagCountForAlert >= 5)
+ _tagCountForAlert = 0;
+
+ AddOrUpdateTagData(e.info);
+ tagsCount++;
+ });
+ }
+
+ void StateChangedEvent(object sender, CSLibrary.Events.OnStateChangedEventArgs e)
+ {
+ //InvokeOnMainThread(() =>
+ //{
+ switch (e.state)
+ {
+ case CSLibrary.Constants.RFState.IDLE:
+ ClassBattery.SetBatteryMode(ClassBattery.BATTERYMODE.IDLE);
+ _cancelVoltageValue = true;
+ if (BleMvxApplication._reader.rfid.GetModelName() == "CS710S")
+ {
+ switch (BleMvxApplication._reader.rfid.LastMacErrorCode)
+ {
+ case 0x00: // normal end
+ break;
+
+ default:
+ _userDialogs.Alert("Last error : 0x" + BleMvxApplication._reader.rfid.LastMacErrorCode.ToString("X4"));
+ break;
+ }
+ }
+ else
+ {
+ switch (BleMvxApplication._reader.rfid.LastMacErrorCode)
+ {
+ case 0x00: // normal end
+ break;
+
+ case 0x0309: //
+ _userDialogs.Alert("Too near to metal, please move CS108 away from metal and start inventory again.");
+ break;
+
+ default:
+ _userDialogs.Alert("Mac error : 0x" + BleMvxApplication._reader.rfid.LastMacErrorCode.ToString("X4"));
+ break;
+ }
+ }
+
+ InventoryStopped();
+ break;
+ }
+ //});
+ }
+
+ private void AddOrUpdateTagData(CSLibrary.Structures.TagCallbackInfo info)
+ {
+ InvokeOnMainThread(() =>
+ {
+ if (BleMvxApplication._WedgeDuplicateFilter == 1 || BleMvxApplication._WedgeDuplicateFilter == 2)
+ {
+ SendData(info.epc.ToString());
+ }
+
+ try
+ {
+ bool found = false;
+
+ int cnt;
+
+ lock (TagInfoList)
+ {
+ try
+ {
+
+ for (cnt = 0; cnt < TagInfoList.Count; cnt++)
+ {
+ if (TagInfoList[cnt].EPC == info.epc.ToString())
+ {
+ /*
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1 && TagInfoList[cnt].Bank1Data != CSLibrary.Tools.Hex.ToString(info.Bank1Data))
+ continue;
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks == 2 && TagInfoList[cnt].Bank2Data != CSLibrary.Tools.Hex.ToString(info.Bank2Data))
+ continue;
+ */
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1)
+ if (TagInfoList[cnt].Bank1Data.Length > 0)
+ if (info.Bank1Data.Length > 0)
+ if (TagInfoList[cnt].Bank1Data != CSLibrary.Tools.Hex.ToString(info.Bank1Data))
+ continue;
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 2)
+ if (TagInfoList[cnt].Bank2Data.Length > 0)
+ if (info.Bank2Data.Length > 0)
+ if (TagInfoList[cnt].Bank2Data != CSLibrary.Tools.Hex.ToString(info.Bank2Data))
+ continue;
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1 && info.Bank1Data.Length > 0)
+ TagInfoList[cnt].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 2 && info.Bank2Data.Length > 0)
+ TagInfoList[cnt].Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+
+ TagInfoList[cnt].RSSI = info.rssidBm;
+ found = true;
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("AddOrUpdateTagData xists Item : " + ex.Message);
+ }
+
+ if (!found)
+ {
+ if (BleMvxApplication._WedgeDuplicateFilter == 0)
+ {
+ SendData(info.epc.ToString());
+ }
+
+ try
+ {
+ TagInfoViewModel item = new TagInfoViewModel();
+
+ item.EPC = info.epc.ToString();
+ item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ item.Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+ item.RSSI = info.rssidBm;
+ item.PC = info.pc.ToUshorts()[0];
+
+ TagInfoList.Insert(0, item);
+
+ _newTagFound = true;
+
+ Trace.Message("EPC Data = {0}", item.EPC);
+
+ _newTag = true;
+
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("AddOrUpdateTagData New Item : " + ex.Message);
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("AddOrUpdateTagData : " + ex.Message);
+ }
+ });
+ }
+
+ void VoltageEvent(object sender, CSLibrary.Notification.VoltageEventArgs e)
+ {
+ if (e.Voltage == 0xffff)
+ {
+ _labelVoltage = "Battery ERROR"; // 3.98v
+ }
+ else
+ {
+ // to fix CS108 voltage bug
+ if (_cancelVoltageValue)
+ {
+ _cancelVoltageValue = false;
+ return;
+ }
+
+ switch (BleMvxApplication._config.BatteryLevelIndicatorFormat)
+ {
+ case 0:
+ _labelVoltage = "Battery " + ((double)e.Voltage / 1000).ToString("0.000") + "v"; // v
+ break;
+
+ default:
+ _labelVoltage = "Battery " + ClassBattery.Voltage2Percent((double)e.Voltage / 1000).ToString("0") + "%"; // %
+ break;
+ }
+ }
+
+ RaisePropertyChanged(() => labelVoltage);
+ }
+
+ #region Key_event
+
+ void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e)
+ {
+ if (e.KeyCode == CSLibrary.Notification.Key.BUTTON)
+ {
+ if (e.KeyDown)
+ {
+ if (!_KeyDown)
+ StartInventory();
+ _KeyDown = true;
+ }
+ else
+ {
+ if (_KeyDown)
+ StopInventory();
+ _KeyDown = false;
+ }
+ }
+ }
+ #endregion
+
+ async void ShowDialog(string Msg)
+ {
+ var config = new ProgressDialogConfig()
+ {
+ Title = Msg,
+ IsDeterministic = true,
+ MaskType = MaskType.Gradient,
+ };
+
+ using (var progress = _userDialogs.Progress(config))
+ {
+ progress.Show();
+ await System.Threading.Tasks.Task.Delay(1000);
+ }
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/ViewModelInventorytoWedgeForwarderSetting.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/ViewModelInventorytoWedgeForwarderSetting.cs
new file mode 100644
index 0000000..2de2b9e
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/InventorytoWedgeForwarder/ViewModelInventorytoWedgeForwarderSetting.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Collections.Generic;
+using Acr.UserDialogs;
+using MvvmCross;
+
+
+using System.Windows.Input;
+using Xamarin.Forms;
+
+using Plugin.BLE.Abstractions.Contracts;
+using MvvmCross.Navigation;
+using MvvmCross.ViewModels;
+
+namespace BLE.Client.ViewModels
+{
+ public class ViewModelInventorytoWedgeForwarderSetting : BaseViewModel
+ {
+ private readonly IUserDialogs _userDialogs;
+ private readonly IMvxNavigationService _navigation;
+
+ public ICommand OnOKButtonCommand { protected set; get; }
+ public string entryIPText { get ; set ;}
+ public string entryPortText { get; set; }
+ public bool switchswitchUniqueIsToggled { get; set; }
+
+ public ViewModelInventorytoWedgeForwarderSetting(IAdapter adapter, IUserDialogs userDialogs, IMvxNavigationService navigation) : base(adapter)
+ {
+ _userDialogs = userDialogs;
+ _navigation = navigation;
+
+ OnOKButtonCommand = new Command(OnOKButtonClicked);
+
+ //entryIPText = "127.0.0.1";
+ //entryPortText = "9394";
+ //switchswitchUniqueIsToggled = false;
+
+ //RaisePropertyChanged();
+ }
+
+ void RaisePropertyChanged()
+ {
+ //RaisePropertyChanged(() => entryIPText);
+ //RaisePropertyChanged(() => entryPortText);
+ //RaisePropertyChanged(() => switchswitchUniqueIsToggled);
+ }
+
+ void OnOKButtonClicked()
+ {
+ //RaisePropertyChanged();
+
+ //BleMvxApplication.SaveConfig();
+
+ _navigation.Navigate(new MvxBundle());
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithGeiger.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithGeiger.xaml
new file mode 100644
index 0000000..8c37293
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithGeiger.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithGeiger.xaml.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithGeiger.xaml.cs
new file mode 100644
index 0000000..78b3250
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithGeiger.xaml.cs
@@ -0,0 +1,92 @@
+using System;
+using BLE.Client.ViewModels;
+using MvvmCross.Forms.Views;
+
+namespace BLE.Client.Pages
+{
+ public partial class PageLEDKilowayTagWithGeiger : MvxContentPage
+ {
+ static string[] _bankSelectionItems = new string[] { "Security (Bank 0)", "EPC (Bank 1)", "TID (Bank 2)", "User (Bank 3)" };
+ static uint _rssi;
+
+ public PageLEDKilowayTagWithGeiger()
+ {
+ InitializeComponent();
+
+ if (BleMvxApplication._config.RFID_DBm)
+ {
+ labelThreshold.Text = "Threshold dBm";
+ sliderThreshold.Minimum = -90;
+ sliderThreshold.Maximum = -10;
+ sliderThreshold.Value = -47;
+ }
+ else
+ {
+ labelThreshold.Text = "Threshold dBuV";
+ sliderThreshold.Minimum = 17;
+ sliderThreshold.Maximum = 97;
+ sliderThreshold.Value = 60;
+ }
+
+ BleMvxApplication._geiger_Bank = 2;
+ buttonBank.Text = _bankSelectionItems[2];
+ }
+
+ public async void buttonBankClicked(object sender, EventArgs e)
+ {
+ var answer = await DisplayActionSheet("", "Cancel", null, _bankSelectionItems);
+
+ if (answer != null && answer != "Cancel")
+ {
+ if (buttonBank.Text != answer)
+ {
+ buttonBank.Text = answer;
+ BleMvxApplication._geiger_Bank = int.Parse(buttonBank.Text.Substring(buttonBank.Text.Length - 2, 1));
+ switch (BleMvxApplication._geiger_Bank)
+ {
+ case 1: // EPC
+ entryMask.Text = BleMvxApplication._SELECT_EPC;
+ break;
+
+ case 2: // TID
+ entryMask.Text = BleMvxApplication._SELECT_TID;
+ break;
+ }
+ }
+ }
+ }
+
+ public async void entryPowerCompleted(object sender, EventArgs e)
+ {
+ uint value;
+
+ try
+ {
+ value = uint.Parse(entryPower.Text);
+ if (value < 0 || value > 300)
+ throw new System.ArgumentException("Value not valid", "tagPopulation");
+ entryPower.Text = value.ToString();
+ }
+ catch (Exception ex)
+ {
+ await DisplayAlert("", "Value not valid!!!", "OK");
+ entryPower.Text = "300";
+ }
+ }
+
+ void sliderThresholdValueChanged(object sender, EventArgs e)
+ {
+ labelThresholdValue.Text = ((int)(sliderThreshold.Value)).ToString();
+ }
+
+ void RssiPropertyChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ progressbarRSSI.Progress = (double.Parse(Rssi.Text) - sliderThreshold.Minimum) / (sliderThreshold.Maximum - sliderThreshold.Minimum);
+ //progressbarRSSI.Progress = 0.5;
+ }
+ catch (Exception ex) { }
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithInventory.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithInventory.xaml
new file mode 100644
index 0000000..fe91465
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithInventory.xaml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithInventory.xaml.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithInventory.xaml.cs
new file mode 100644
index 0000000..1a45184
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/PageLEDKilowayTagWithInventory.xaml.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using BLE.Client.Pages;
+using BLE.Client.ViewModels;
+using MvvmCross.Forms.Views;
+using Xamarin.Forms;
+
+namespace BLE.Client.Pages
+{
+ public partial class PageLEDKilowayTagWithInventory : MvxContentPage
+ {
+ public PageLEDKilowayTagWithInventory()
+ {
+ InitializeComponent();
+ }
+
+ public async void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
+ {
+ var answer = await DisplayAlert("Select Tag", "Selected Tag for Read/Write and Geiger search", "OK", "Cancel");
+
+ if (answer)
+ {
+ TagInfoViewModel Items = (TagInfoViewModel)e.SelectedItem;
+
+ BleMvxApplication._SELECT_EPC = Items.EPC;
+ BleMvxApplication._SELECT_TID = Items.Bank1Data;
+ }
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDKilowayTagWithGeiger.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDKilowayTagWithGeiger.cs
new file mode 100644
index 0000000..17c8d6e
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDKilowayTagWithGeiger.cs
@@ -0,0 +1,352 @@
+using System;
+using Acr.UserDialogs;
+using Plugin.BLE.Abstractions.Contracts;
+
+using System.Windows.Input;
+using Xamarin.Forms;
+using MvvmCross.ViewModels;
+using BLE.Client.ViewModels;
+using CSLibrary.Constants;
+
+namespace BLE.Client.ViewModels
+{
+ public class ViewModelLEDKilowayTagWithGeiger : BaseViewModel
+ {
+ private readonly IUserDialogs _userDialogs;
+
+ public ICommand OnStartGeigerButtonCommand { protected set; get; }
+
+ private int _rssidBuV = 0;
+ private string _rssiString = "RSSI";
+ public string rssiStart { get { return _rssiString; } }
+
+ double _progressbarRSSIValue = 0;
+ public double progressbarRSSIValue { get { return _progressbarRSSIValue; } }
+
+ private string _startGeigerButtonText = "Start";
+ public string startGeigerButtonText { get { return _startGeigerButtonText; } }
+
+ private int _buttonBank = 1;
+ public int buttonBank { get { return _buttonBank; } set { _buttonBank = value; } }
+
+ private string _entryEPC;
+ public string entryEPC { get { return _entryEPC; } set { _entryEPC = value; } }
+
+ private uint _power = 300;
+ public uint power { get { return _power; } set { _power = value; } }
+
+ private int _Threshold = 0;
+ public string labelThresholdValueText { get { return _Threshold.ToString(); } set { try { _Threshold = int.Parse(value); } catch (Exception ex) { } } }
+
+
+ // end for test
+
+ bool _startInventory = false;
+ public bool _KeyDown = false;
+ int _beepSoundCount = 0;
+ int _noTagCount = 0;
+
+ public ViewModelLEDKilowayTagWithGeiger(IAdapter adapter, IUserDialogs userDialogs) : base(adapter)
+ {
+ _userDialogs = userDialogs;
+
+ _entryEPC = BleMvxApplication._SELECT_TID;
+
+ OnStartGeigerButtonCommand = new Command(StartGeigerButtonClick);
+
+ RaisePropertyChanged(() => entryEPC);
+ _Threshold = BleMvxApplication._config.RFID_DBm ? -47 : 60;
+ }
+
+ private void SetEvent(bool enable)
+ {
+ // Cancel RFID event handler
+ BleMvxApplication._reader.rfid.ClearEventHandler();
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.ClearEventHandler();
+
+ if (enable)
+ {
+ BleMvxApplication._reader.rfid.OnAsyncCallback += new EventHandler(TagSearchOneEvent);
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.OnKeyEvent += new EventHandler(HotKeys_OnKeyEvent);
+ }
+ }
+
+ public override void ViewAppearing()
+ {
+ base.ViewAppearing();
+ SetEvent(true);
+ InventorySetting();
+ }
+
+ public override void ViewDisappearing()
+ {
+ // don't turn off event handler is you need program work in sleep mode.
+ StopGeiger();
+ SetEvent(false);
+ base.ViewDisappearing();
+ }
+
+ protected override void InitFromBundle(IMvxBundle parameters)
+ {
+ base.InitFromBundle(parameters);
+ }
+
+ void InventorySetting()
+ {
+ // Optimatize for LED Light
+
+ // Cancel old setting
+ BleMvxApplication._reader.rfid.CancelAllSelectCriteria();
+ BleMvxApplication._reader.rfid.SetPowerSequencing(0);
+
+ // Set Geiger parameters
+ //BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
+ //BleMvxApplication._reader.rfid.SetTagDelayTime((uint)BleMvxApplication._config.RFID_CompactInventoryDelayTime); // for CS108 only
+ //BleMvxApplication._reader.rfid.SetIntraPacketDelayTime((uint)BleMvxApplication._config.RFID_IntraPacketDelayTime); // for CS710S only
+ //BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
+ BleMvxApplication._reader.rfid.SetTagDelayTime(0);
+ BleMvxApplication._reader.rfid.SetIntraPacketDelayTime(0);
+ BleMvxApplication._reader.rfid.SetDuplicateEliminationRollingWindow(0);
+ BleMvxApplication._reader.rfid.SetInventoryDuration(0);
+ BleMvxApplication._config.RFID_FixedQParms.qValue = 0;
+ BleMvxApplication._config.RFID_FixedQParms.toggleTarget = 1;
+ BleMvxApplication._reader.rfid.SetFixedQParms(BleMvxApplication._config.RFID_FixedQParms);
+ BleMvxApplication._reader.rfid.SetCurrentSingulationAlgorithm(CSLibrary.Constants.SingulationAlgorithm.FIXEDQ);
+ BleMvxApplication._reader.rfid.SetRSSIFilter(CSLibrary.Constants.RSSIFILTERTYPE.DISABLE);
+ switch (BleMvxApplication._reader.rfid.GetModel())
+ {
+ case CSLibrary.RFIDDEVICE.MODEL.CS710S:
+ if (BleMvxApplication._reader.rfid.GetCountry() == 1)
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(241);
+ else
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(244);
+ break;
+
+ default:
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(BleMvxApplication._config.RFID_Profile);
+ break;
+ }
+ BleMvxApplication._reader.rfid.SetOperationMode( CSLibrary.Constants.RadioOperationMode.CONTINUOUS);
+ BleMvxApplication._reader.rfid.SetTagGroup(Selected.ASSERTED, Session.S0, SessionTarget.A);
+
+ // Multi bank inventory
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags = CSLibrary.Constants.SelectFlags.SELECT;
+ BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = false;
+ BleMvxApplication._reader.rfid.Options.TagRanging.focus = false;
+
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 1;
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank1 = CSLibrary.Constants.MemoryBank.BANK0;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset1 = 4;
+ BleMvxApplication._reader.rfid.Options.TagRanging.count1 = 1;
+ }
+
+
+ void StartGeiger()
+ {
+ if (_startInventory)
+ return;
+
+ _startGeigerButtonText = "Stop";
+ _startInventory = true;
+
+ RaisePropertyChanged(() => entryEPC);
+ RaisePropertyChanged(() => power);
+
+ BleMvxApplication._reader.rfid.SetPowerLevel(_power);
+
+ BleMvxApplication._reader.rfid.Options.TagSelected.flags = CSLibrary.Constants.SelectMaskFlags.ENABLE_TOGGLE;
+ if (BleMvxApplication._geiger_Bank == 1) // if EPC
+ {
+ BleMvxApplication._reader.rfid.Options.TagSelected.bank = CSLibrary.Constants.MemoryBank.EPC;
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMask = new CSLibrary.Structures.S_MASK(_entryEPC);
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMaskOffset = 0;
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMaskLength = (uint)_entryEPC.Length * 4;
+ }
+ else
+ {
+ BleMvxApplication._reader.rfid.Options.TagSelected.bank = (CSLibrary.Constants.MemoryBank)BleMvxApplication._geiger_Bank;
+ BleMvxApplication._reader.rfid.Options.TagSelected.Mask = CSLibrary.Tools.HexEncoding.ToBytes(_entryEPC);
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskOffset = 0;
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskLength = (uint)_entryEPC.Length * 4;
+ }
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_SELECTED);
+
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_RANGING);
+
+ RaisePropertyChanged(() => startGeigerButtonText);
+
+ // Create a beep sound timer.
+ _beepSoundCount = 0;
+ Device.StartTimer(TimeSpan.FromMilliseconds(50), () =>
+ {
+ if (_rssidBuV == 0)
+ {
+ _noTagCount++;
+
+ if (_noTagCount > 2)
+ DependencyService.Get().SystemSound(-1);
+ }
+ else
+ {
+ if (_beepSoundCount == 0 && _rssidBuV >= 20 && _rssidBuV < 60)
+ //if (_beepSoundCount == 0)
+ DependencyService.Get().SystemSound(3);
+
+ _beepSoundCount++;
+
+ if ((BleMvxApplication._config.RFID_DBm && CSLibrary.Tools.dBConverion.dBuV2dBm(_rssidBuV) >= _Threshold) ||
+ (!BleMvxApplication._config.RFID_DBm && _rssidBuV >= _Threshold))
+ {
+ DependencyService.Get().SystemSound(4);
+ _beepSoundCount = 1;
+ _rssidBuV = 0;
+ }
+ else if (_rssidBuV >= 50)
+ {
+ if (_beepSoundCount >= 5)
+ {
+ _beepSoundCount = 0;
+ _rssidBuV = 0;
+ }
+ }
+ else if (_rssidBuV >= 40)
+ {
+ if (_beepSoundCount >= 10)
+ {
+ _beepSoundCount = 0;
+ _rssidBuV = 0;
+ }
+ }
+ else if (_rssidBuV >= 30)
+ {
+ if (_beepSoundCount >= 20)
+ {
+ _beepSoundCount = 0;
+ _rssidBuV = 0;
+ }
+ }
+ else if (_rssidBuV >= 20)
+ {
+ if (_beepSoundCount >= 40)
+ {
+ _beepSoundCount = 0;
+ _rssidBuV = 0;
+ }
+ }
+ }
+
+ if (_startInventory)
+ return true;
+
+ // Stop all sound
+ DependencyService.Get().SystemSound(-1);
+ return false;
+ });
+ }
+
+ void StopGeiger()
+ {
+ _startInventory = false;
+ _startGeigerButtonText = "Start";
+ BleMvxApplication._reader.rfid.StopOperation();
+ RaisePropertyChanged(() => startGeigerButtonText);
+ }
+
+ void StartGeigerButtonClick()
+ {
+ if (!_startInventory)
+ {
+ StartGeiger();
+ }
+ else
+ {
+ StopGeiger();
+ }
+ }
+
+ public void TagSearchOneEvent(object sender, CSLibrary.Events.OnAsyncCallbackEventArgs e)
+ {
+ switch (e.type)
+ {
+ //case CSLibrary.Constants.CallbackType.TAG_SEARCHING:
+ case CSLibrary.Constants.CallbackType.TAG_RANGING:
+
+ _rssidBuV = (int)Math.Round(e.info.rssi);
+ _noTagCount = 0;
+
+ if (BleMvxApplication._config.RFID_DBm)
+ {
+ // 0~1
+ _progressbarRSSIValue = e.info.rssidBm;
+ }
+ else
+ {
+ // 0~1
+ _progressbarRSSIValue = e.info.rssi;
+ }
+ _rssiString = ((int)Math.Round(_progressbarRSSIValue)).ToString();
+
+ RaisePropertyChanged(() => rssiStart);
+ RaisePropertyChanged(() => progressbarRSSIValue);
+ break;
+ }
+ }
+
+ void StateChangedEvent(object sender, CSLibrary.Events.OnStateChangedEventArgs e)
+ {
+ switch (e.state)
+ {
+ case CSLibrary.Constants.RFState.IDLE:
+ break;
+ }
+ }
+
+ bool CheckPageActive()
+ {
+ try
+ {
+ if (Application.Current.MainPage.Navigation.NavigationStack.Count > 0)
+ {
+ var currPage = Application.Current.MainPage.Navigation.NavigationStack[Application.Current.MainPage.Navigation.NavigationStack.Count - 1];
+
+ if (currPage.Title == "Geiger")
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+
+ return false;
+ }
+
+
+ void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e)
+ {
+ Page currentPage;
+
+ //if (!CheckPageActive())
+ // return;
+
+ if (e.KeyCode == CSLibrary.Notification.Key.BUTTON)
+ {
+ if (e.KeyDown)
+ {
+ if (!_KeyDown)
+ StartGeiger();
+ _KeyDown = true;
+ }
+ else
+ {
+ if (_KeyDown == true)
+ StopGeiger();
+ _KeyDown = false;
+ }
+ }
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDKilowayTagWithInventory.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDKilowayTagWithInventory.cs
new file mode 100644
index 0000000..17e917f
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDKilowayTagWithInventory.cs
@@ -0,0 +1,537 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Collections.Generic;
+using Acr.UserDialogs;
+using MvvmCross;
+
+
+using System.Windows.Input;
+using Xamarin.Forms;
+
+
+using Plugin.BLE.Abstractions.Contracts;
+
+using Plugin.BLE.Abstractions;
+using Plugin.BLE.Abstractions.Extensions;
+
+using Prism.Mvvm;
+using MvvmCross.ViewModels;
+using BLE.Client.Pages;
+using MvvmCross.Navigation;
+
+namespace BLE.Client.ViewModels
+{
+ public class ViewModelLEDKilowayTagWithInventory : BaseViewModel
+ {
+ private readonly IUserDialogs _userDialogs;
+ private readonly IMvxNavigationService _navigation;
+
+ #region -------------- RFID inventory -----------------
+
+ public ICommand OnStartInventoryButtonCommand { protected set; get; }
+ public ICommand OnClearButtonCommand { protected set; get; }
+ public ICommand OnLEDTagWithGeiGerButtonCommand { protected set; get; }
+
+ private ObservableCollection _TagInfoList = new ObservableCollection();
+ public ObservableCollection TagInfoList { get { return _TagInfoList; } set { SetProperty(ref _TagInfoList, value); } }
+
+ public int tagsCount = 0;
+ bool _newTag = false;
+ int _tagCountForAlert = 0;
+ bool _newTagFound = false;
+
+ public bool _startInventory = true;
+ private bool _KeyDown = false;
+
+ public string FilterIndicator { get { return (BleMvxApplication._PREFILTER_Enable | BleMvxApplication._POSTFILTER_MASK_Enable | BleMvxApplication._RSSIFILTER_Type != CSLibrary.Constants.RSSIFILTERTYPE.DISABLE) ? "Filter On" : ""; } }
+
+ private string _startInventoryButtonText = "Start Inventory";
+ public string startInventoryButtonText { get { return _startInventoryButtonText; } }
+
+ bool _tagCount = false;
+
+ private string _tagPerSecondText = "0 tags/s";
+ public string tagPerSecondText { get { return _tagPerSecondText; } }
+ private string _numberOfTagsText = "0 tags";
+ public string numberOfTagsText { get { return _numberOfTagsText; } }
+ private string _labelVoltage = "";
+ public string labelVoltage { get { return _labelVoltage; } }
+
+ private int _ListViewRowHeight = -1;
+ public int ListViewRowHeight { get { return _ListViewRowHeight; } set { _ListViewRowHeight = value; } }
+
+ DateTime InventoryStartTime;
+ private double _InventoryTime = 0;
+ public string InventoryTime { get { return ((uint)_InventoryTime).ToString() + "s"; } }
+
+ private int _DefaultRowHight;
+
+ bool _cancelVoltageValue = false;
+
+ public bool switchFlashTagsIsToggled { set; get; }
+
+ #endregion
+
+ public ViewModelLEDKilowayTagWithInventory(IAdapter adapter, IUserDialogs userDialogs, IMvxNavigationService navigation) : base(adapter)
+ {
+ _userDialogs = userDialogs;
+ _navigation = navigation;
+
+ RaisePropertyChanged(() => ListViewRowHeight);
+ _DefaultRowHight = ListViewRowHeight;
+
+ OnStartInventoryButtonCommand = new Command(StartInventoryClick);
+ OnClearButtonCommand = new Command(ClearClick);
+ OnLEDTagWithGeiGerButtonCommand = new Command(OnLEDTagWithGeiGerClick);
+
+ BleMvxApplication._reader.rfid.SetCountry(BleMvxApplication._config.RFID_Region, (int)BleMvxApplication._config.RFID_FixedChannel);
+ }
+
+ public override void ViewAppearing()
+ {
+ base.ViewAppearing();
+ SetEvent(true);
+ InventorySetting();
+ }
+
+ public override void ViewDisappearing()
+ {
+ base.ViewDisappearing();
+ }
+
+ protected override void InitFromBundle(IMvxBundle parameters)
+ {
+ base.InitFromBundle(parameters);
+ }
+
+ private void OnLEDTagWithGeiGerClick()
+ {
+ _navigation.Navigate(new MvxBundle());
+ }
+
+
+ private void ClearClick()
+ {
+ InvokeOnMainThread(() =>
+ {
+ lock (TagInfoList)
+ {
+ TagInfoList.Clear();
+ _numberOfTagsText = _TagInfoList.Count.ToString() + " tags";
+ RaisePropertyChanged(() => numberOfTagsText);
+
+ tagsCount = 0;
+ _tagPerSecondText = tagsCount.ToString() + " tags/s";
+ RaisePropertyChanged(() => tagPerSecondText);
+ }
+ });
+ }
+
+ private void SetEvent(bool enable)
+ {
+ // Cancel RFID event handler
+ BleMvxApplication._reader.rfid.ClearEventHandler();
+
+ // Cancel Barcode event handler
+ BleMvxApplication._reader.barcode.ClearEventHandler();
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.ClearEventHandler();
+
+ if (enable)
+ {
+ // RFID event handler
+ BleMvxApplication._reader.rfid.OnAsyncCallback += new EventHandler(TagInventoryEvent);
+ BleMvxApplication._reader.rfid.OnStateChanged += new EventHandler(StateChangedEvent);
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.OnKeyEvent += new EventHandler(HotKeys_OnKeyEvent);
+ BleMvxApplication._reader.notification.OnVoltageEvent += new EventHandler(VoltageEvent);
+ }
+ }
+
+ void SetConfigPower()
+ {
+ if (BleMvxApplication._reader.rfid.GetAntennaPort() == 1)
+ {
+ if (BleMvxApplication._config.RFID_PowerSequencing_NumberofPower == 0)
+ {
+ BleMvxApplication._reader.rfid.SetPowerSequencing(0);
+ BleMvxApplication._reader.rfid.SetPowerLevel(BleMvxApplication._config.RFID_Antenna_Power[0]);
+ }
+ else
+ BleMvxApplication._reader.rfid.SetPowerSequencing(BleMvxApplication._config.RFID_PowerSequencing_NumberofPower, BleMvxApplication._config.RFID_PowerSequencing_Level, BleMvxApplication._config.RFID_PowerSequencing_DWell);
+ }
+ else
+ {
+ for (uint cnt = 0; cnt < BleMvxApplication._reader.rfid.GetAntennaPort(); cnt++)
+ {
+ BleMvxApplication._reader.rfid.SetPowerLevel(BleMvxApplication._config.RFID_Antenna_Power[cnt], cnt);
+ }
+ }
+ }
+
+ void InventorySetting()
+ {
+ BleMvxApplication._reader.rfid.CancelAllSelectCriteria();
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags = CSLibrary.Constants.SelectFlags.ZERO;
+
+ SetConfigPower();
+ BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
+ BleMvxApplication._reader.rfid.SetTagDelayTime((uint)BleMvxApplication._config.RFID_CompactInventoryDelayTime); // for CS108 only
+ BleMvxApplication._reader.rfid.SetIntraPacketDelayTime((uint)BleMvxApplication._config.RFID_IntraPacketDelayTime); // for CS710S only
+ BleMvxApplication._reader.rfid.SetDuplicateEliminationRollingWindow(BleMvxApplication._config.RFID_DuplicateEliminationRollingWindow);
+
+ switch (BleMvxApplication._reader.rfid.GetModel())
+ {
+ case CSLibrary.RFIDDEVICE.MODEL.CS710S:
+ if (BleMvxApplication._reader.rfid.GetCountry() == 1)
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(241);
+ else
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(244);
+ break;
+
+ default:
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(BleMvxApplication._config.RFID_Profile);
+ break;
+ }
+
+ BleMvxApplication._reader.rfid.SetOperationMode(BleMvxApplication._config.RFID_OperationMode);
+ BleMvxApplication._reader.rfid.SetTagGroup(BleMvxApplication._config.RFID_TagGroup);
+
+ if (BleMvxApplication._config.RFID_Algorithm == CSLibrary.Constants.SingulationAlgorithm.DYNAMICQ)
+ {
+ BleMvxApplication._config.RFID_DynamicQParms.toggleTarget = BleMvxApplication._config.RFID_ToggleTarget ? 1U : 0;
+ BleMvxApplication._reader.rfid.SetDynamicQParms(BleMvxApplication._config.RFID_DynamicQParms);
+ }
+ else
+ {
+ BleMvxApplication._config.RFID_FixedQParms.toggleTarget = BleMvxApplication._config.RFID_ToggleTarget ? 1U : 0;
+ BleMvxApplication._reader.rfid.SetFixedQParms(BleMvxApplication._config.RFID_FixedQParms);
+ }
+
+ // Select Criteria filter for LED Tag
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags = CSLibrary.Constants.SelectFlags.SELECT;
+ BleMvxApplication._reader.rfid.Options.TagSelected.bank = CSLibrary.Constants.MemoryBank.TID;
+ BleMvxApplication._reader.rfid.Options.TagSelected.Mask = new byte[] { 0xE2, 0x81, 0xD0 };
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskOffset = 0;
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskLength = 24;
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PREFILTER);
+
+
+ BleMvxApplication._reader.rfid.SetRSSIdBmFilter(BleMvxApplication._RSSIFILTER_Type, BleMvxApplication._RSSIFILTER_Option, BleMvxApplication._RSSIFILTER_Threshold_dBm);
+
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 1;
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank1 = CSLibrary.Constants.MemoryBank.TID;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset1 = 0;
+ BleMvxApplication._reader.rfid.Options.TagRanging.count1 = 6;
+
+ if (switchFlashTagsIsToggled)
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 2;
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank2 = CSLibrary.Constants.MemoryBank.BANK0;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset2 = 4;
+ }
+
+ BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = false;
+ BleMvxApplication._reader.rfid.Options.TagRanging.focus = BleMvxApplication._config.RFID_Focus;
+ BleMvxApplication._reader.rfid.Options.TagRanging.fastid = BleMvxApplication._config.RFID_FastId;
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PRERANGING);
+ }
+
+ void StartInventory()
+ {
+ if (_startInventory == false)
+ return;
+
+ //TagInfoList.Clear();
+
+ StartTagCount();
+ //if (BleMvxApplication._config.RFID_OperationMode == CSLibrary.Constants.RadioOperationMode.CONTINUOUS)
+ {
+ _startInventory = false;
+ _startInventoryButtonText = "Stop Inventory";
+ }
+
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 1;
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank1 = CSLibrary.Constants.MemoryBank.TID;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset1 = 0;
+ BleMvxApplication._reader.rfid.Options.TagRanging.count1 = 6;
+
+ RaisePropertyChanged(() => switchFlashTagsIsToggled);
+ if (switchFlashTagsIsToggled)
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 2;
+ BleMvxApplication._reader.rfid.Options.TagRanging.bank2 = CSLibrary.Constants.MemoryBank.BANK0;
+ BleMvxApplication._reader.rfid.Options.TagRanging.offset2 = 4;
+ BleMvxApplication._reader.rfid.Options.TagRanging.count2 = 1;
+ }
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PRERANGING);
+
+ _ListViewRowHeight = 40 + (int)(BleMvxApplication._reader.rfid.Options.TagRanging.multibanks * 10);
+ RaisePropertyChanged(() => ListViewRowHeight);
+
+ InventoryStartTime = DateTime.Now;
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.Kiloway_RANGING);
+ ClassBattery.SetBatteryMode(ClassBattery.BATTERYMODE.INVENTORY);
+ _cancelVoltageValue = true;
+
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ async void InventoryStopped()
+ {
+ if (_startInventory)
+ return;
+
+ _startInventory = true;
+ _startInventoryButtonText = "Start Inventory";
+
+ _tagCount = false;
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ void StopInventory ()
+ {
+ if (_startInventory)
+ return;
+
+ _startInventory = true;
+ _startInventoryButtonText = "Start Inventory";
+
+ _tagCount = false;
+ BleMvxApplication._reader.rfid.StopOperation();
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ void StartInventoryClick()
+ {
+ if (_startInventory)
+ {
+ StartInventory();
+ }
+ else
+ {
+ StopInventory();
+ }
+ }
+
+ void StartTagCount()
+ {
+ tagsCount = 0;
+ _tagCount = true;
+
+ // Create a timer that waits one second, then invokes every second.
+ Xamarin.Forms.Device.StartTimer(TimeSpan.FromMilliseconds(1000), () =>
+ {
+ _InventoryTime = (DateTime.Now - InventoryStartTime).TotalSeconds;
+ RaisePropertyChanged(() => InventoryTime);
+
+ _tagCountForAlert = 0;
+
+ _numberOfTagsText = _TagInfoList.Count.ToString() + " tags";
+ RaisePropertyChanged(() => numberOfTagsText);
+
+ _tagPerSecondText = tagsCount.ToString() + " tags/s";
+ RaisePropertyChanged(() => tagPerSecondText);
+ tagsCount = 0;
+
+ if (_tagCount)
+ return true;
+
+ return false;
+ });
+ }
+
+ void StopInventoryClick()
+ {
+ BleMvxApplication._reader.rfid.StopOperation();
+ }
+
+ void TagInventoryEvent(object sender, CSLibrary.Events.OnAsyncCallbackEventArgs e)
+ {
+ if (e.type != CSLibrary.Constants.CallbackType.TAG_RANGING)
+ return;
+
+ InvokeOnMainThread(() =>
+ {
+ _tagCountForAlert++;
+ if (_tagCountForAlert == 1)
+ {
+ if (BleMvxApplication._config.RFID_InventoryAlertSound)
+ {
+ if (_newTagFound)
+ Xamarin.Forms.DependencyService.Get().SystemSound(3);
+ else
+ Xamarin.Forms.DependencyService.Get().SystemSound(2);
+ _newTagFound = false;
+ }
+ }
+ else if (_tagCountForAlert >= 5)
+ _tagCountForAlert = 0;
+
+ AddOrUpdateTagData(e.info);
+ tagsCount++;
+ });
+ }
+
+ void StateChangedEvent(object sender, CSLibrary.Events.OnStateChangedEventArgs e)
+ {
+ //InvokeOnMainThread(() =>
+ //{
+ switch (e.state)
+ {
+ case CSLibrary.Constants.RFState.IDLE:
+ ClassBattery.SetBatteryMode(ClassBattery.BATTERYMODE.IDLE);
+ _cancelVoltageValue = true;
+ if (BleMvxApplication._reader.rfid.GetModelName() == "CS710S")
+ {
+ switch (BleMvxApplication._reader.rfid.LastMacErrorCode)
+ {
+ case 0x00: // normal end
+ break;
+
+ default:
+ _userDialogs.Alert("Last error : 0x" + BleMvxApplication._reader.rfid.LastMacErrorCode.ToString("X4"));
+ break;
+ }
+ }
+ else
+ {
+ switch (BleMvxApplication._reader.rfid.LastMacErrorCode)
+ {
+ case 0x00: // normal end
+ break;
+
+ case 0x0309: //
+ _userDialogs.Alert("Too near to metal, please move CS108 away from metal and start inventory again.");
+ break;
+
+ default:
+ _userDialogs.Alert("Mac error : 0x" + BleMvxApplication._reader.rfid.LastMacErrorCode.ToString("X4"));
+ break;
+ }
+ }
+
+ InventoryStopped();
+ break;
+ }
+ //});
+ }
+
+ private void AddOrUpdateTagData(CSLibrary.Structures.TagCallbackInfo info)
+ {
+ if (info.Bank1Data.Length == 0) // if no TID data
+ return;
+
+ InvokeOnMainThread(() =>
+ {
+ bool found = false;
+
+ int cnt;
+
+ lock (TagInfoList)
+ {
+ for (cnt = 0; cnt < TagInfoList.Count; cnt++)
+ {
+ if (TagInfoList[cnt].Bank1Data == CSLibrary.Tools.Hex.ToString(info.Bank1Data))
+ {
+
+ TagInfoList[cnt].EPC = info.epc.ToString();
+ TagInfoList[cnt].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ TagInfoList[cnt].RSSI = info.rssidBm;
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ TagInfoViewModel item = new TagInfoViewModel();
+
+ item.EPC = info.epc.ToString();
+ item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ item.RSSI = info.rssidBm;
+ item.PC = info.pc.ToUshorts()[0];
+
+ TagInfoList.Insert(0, item);
+
+ _newTagFound = true;
+
+ Trace.Message("EPC Data = {0}", item.EPC);
+
+ _newTag = true;
+ }
+ }
+ });
+ }
+
+ void VoltageEvent(object sender, CSLibrary.Notification.VoltageEventArgs e)
+ {
+ if (e.Voltage == 0xffff)
+ {
+ _labelVoltage = "Battery ERROR"; // 3.98v
+ }
+ else
+ {
+ // to fix CS108 voltage bug
+ if (_cancelVoltageValue)
+ {
+ _cancelVoltageValue = false;
+ return;
+ }
+
+ switch (BleMvxApplication._config.BatteryLevelIndicatorFormat)
+ {
+ case 0:
+ _labelVoltage = "Battery " + ((double)e.Voltage / 1000).ToString("0.000") + "v"; // v
+ break;
+
+ default:
+ _labelVoltage = "Battery " + ClassBattery.Voltage2Percent((double)e.Voltage / 1000).ToString("0") + "%"; // %
+ break;
+ }
+ }
+
+ RaisePropertyChanged(() => labelVoltage);
+ }
+
+ #region Key_event
+
+ void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e)
+ {
+ if (e.KeyCode == CSLibrary.Notification.Key.BUTTON)
+ {
+ if (e.KeyDown)
+ {
+ if (!_KeyDown)
+ StartInventory();
+ _KeyDown = true;
+ }
+ else
+ {
+ if (_KeyDown)
+ StopInventory();
+ _KeyDown = false;
+ }
+ }
+ }
+ #endregion
+
+ async void ShowDialog(string Msg)
+ {
+ var config = new ProgressDialogConfig()
+ {
+ Title = Msg,
+ IsDeterministic = true,
+ MaskType = MaskType.Gradient,
+ };
+
+ using (var progress = _userDialogs.Progress(config))
+ {
+ progress.Show();
+ await System.Threading.Tasks.Task.Delay(1000);
+ }
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDTagWithGeiger.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDTagWithGeiger.cs
index a147395..b1bb9ff 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDTagWithGeiger.cs
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/LEDTag/ViewModelLEDTagWithGeiger.cs
@@ -6,6 +6,7 @@
using Xamarin.Forms;
using MvvmCross.ViewModels;
using BLE.Client.ViewModels;
+using CSLibrary.Constants;
namespace BLE.Client.ViewModels
{
@@ -96,16 +97,22 @@ protected override void InitFromBundle(IMvxBundle parameters)
void InventorySetting()
{
+ // Optimatize for LED Light
+
// Cancel old setting
BleMvxApplication._reader.rfid.CancelAllSelectCriteria();
BleMvxApplication._reader.rfid.SetPowerSequencing(0);
// Set Geiger parameters
- BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
- BleMvxApplication._reader.rfid.SetTagDelayTime((uint)BleMvxApplication._config.RFID_CompactInventoryDelayTime); // for CS108 only
- BleMvxApplication._reader.rfid.SetIntraPacketDelayTime((uint)BleMvxApplication._config.RFID_IntraPacketDelayTime); // for CS710S only
+ //BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
+ //BleMvxApplication._reader.rfid.SetTagDelayTime((uint)BleMvxApplication._config.RFID_CompactInventoryDelayTime); // for CS108 only
+ //BleMvxApplication._reader.rfid.SetIntraPacketDelayTime((uint)BleMvxApplication._config.RFID_IntraPacketDelayTime); // for CS710S only
+ //BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
+ BleMvxApplication._reader.rfid.SetTagDelayTime(0);
+ BleMvxApplication._reader.rfid.SetIntraPacketDelayTime(0);
BleMvxApplication._reader.rfid.SetDuplicateEliminationRollingWindow(0);
- BleMvxApplication._config.RFID_FixedQParms.qValue = 1;
+ BleMvxApplication._reader.rfid.SetInventoryDuration(0);
+ BleMvxApplication._config.RFID_FixedQParms.qValue = 0;
BleMvxApplication._config.RFID_FixedQParms.toggleTarget = 1;
BleMvxApplication._reader.rfid.SetFixedQParms(BleMvxApplication._config.RFID_FixedQParms);
BleMvxApplication._reader.rfid.SetCurrentSingulationAlgorithm(CSLibrary.Constants.SingulationAlgorithm.FIXEDQ);
@@ -123,13 +130,13 @@ void InventorySetting()
BleMvxApplication._reader.rfid.SetCurrentLinkProfile(BleMvxApplication._config.RFID_Profile);
break;
}
- BleMvxApplication._reader.rfid.SetOperationMode(BleMvxApplication._config.RFID_OperationMode);
- BleMvxApplication._reader.rfid.SetTagGroup(BleMvxApplication._config.RFID_TagGroup);
+ BleMvxApplication._reader.rfid.SetOperationMode( CSLibrary.Constants.RadioOperationMode.CONTINUOUS);
+ BleMvxApplication._reader.rfid.SetTagGroup(Selected.ASSERTED, Session.S0, SessionTarget.A);
// Multi bank inventory
BleMvxApplication._reader.rfid.Options.TagRanging.flags = CSLibrary.Constants.SelectFlags.SELECT;
BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = false;
- BleMvxApplication._reader.rfid.Options.TagRanging.focus = BleMvxApplication._config.RFID_Focus;
+ BleMvxApplication._reader.rfid.Options.TagRanging.focus = false;
BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 1;
BleMvxApplication._reader.rfid.Options.TagRanging.bank1 = CSLibrary.Constants.MemoryBank.USER;
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/PageMQTTInventory.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/PageMQTTInventory.xaml
new file mode 100644
index 0000000..3647a0d
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/PageMQTTInventory.xaml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/PageMQTTInventory.xaml.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/PageMQTTInventory.xaml.cs
new file mode 100644
index 0000000..337b8ba
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/PageMQTTInventory.xaml.cs
@@ -0,0 +1,40 @@
+using BLE.Client.ViewModels;
+using MvvmCross.Forms.Presenters.Attributes;
+using MvvmCross.Forms.Views;
+using Xamarin.Forms;
+
+namespace BLE.Client.Pages
+{
+ public partial class PageMQTTInventory : MvxContentPage
+ {
+ static public string[] _displatFormtOptions = {"0. Hex",
+ "1. UPC",
+ "2. SGTIN-96",
+ };
+
+ public PageMQTTInventory()
+ {
+ InitializeComponent();
+
+ if (Device.RuntimePlatform == Device.iOS)
+ {
+ this.Icon = new FileImageSource();
+ this.Icon.File = "icons8-RFID Tag-104-30x30.png";
+ }
+ }
+
+ public async void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
+ {
+ var answer = await DisplayAlert("Select Tag", "Selected Tag for Read/Write and Geiger search", "OK", "Cancel");
+
+ if (answer)
+ {
+ //BLE.Client.ViewModels.ViewModelInventorynScan.TagInfo Items = (BLE.Client.ViewModels.ViewModelInventorynScan.TagInfo)e.SelectedItem;
+ BLE.Client.ViewModels.TagInfoViewModel Items = (BLE.Client.ViewModels.TagInfoViewModel)e.SelectedItem;
+
+ BleMvxApplication._SELECT_EPC = Items.EPC_ORG;
+ BleMvxApplication._SELECT_PC = Items.PC;
+ }
+ }
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/ViewModelMQTTInventory.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/ViewModelMQTTInventory.cs
new file mode 100644
index 0000000..b3ef57a
--- /dev/null
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MQTT/ViewModelMQTTInventory.cs
@@ -0,0 +1,1463 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Collections.Generic;
+using Acr.UserDialogs;
+using System.Windows.Input;
+using Xamarin.Forms;
+using Xamarin.Essentials;
+using System.Threading.Tasks;
+using System.Threading;
+
+using Plugin.BLE.Abstractions;
+using Plugin.BLE.Abstractions.Contracts;
+
+using System.Net.Http;
+
+using Plugin.Share;
+using MvvmCross.ViewModels;
+using TagDataTranslation;
+using MQTTnet;
+using MQTTnet.Server;
+using MQTTnet.Client;
+using System.Net;
+
+
+using System;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading.Tasks;
+
+
+namespace BLE.Client.ViewModels
+{
+ //public class ViewModelInventory : BaseViewModel
+
+ public class ViewModelMQTTInventory : BaseViewModel
+ {
+ private readonly IUserDialogs _userDialogs;
+ //readonly IPermissions _permissions;
+
+ #region -------------- RFID inventory -----------------
+
+ public ICommand OnStartInventoryButtonCommand { protected set; get; }
+ public ICommand OnStartMQTTBrokerButtonCommand { protected set; get; }
+ public ICommand OnStopMQTTBrokerButtonCommand { protected set; get; }
+
+ public ICommand OnClearButtonCommand { protected set; get; }
+ public ICommand OnHEXButtonCommand { protected set; get; }
+ public ICommand OnUPCButtonommand { protected set; get; }
+ public ICommand OnSGTINButtonCommand { protected set; get; }
+
+ private ObservableCollection _TagInfoList = new ObservableCollection();
+ public ObservableCollection TagInfoList { get { return _TagInfoList; } set { SetProperty(ref _TagInfoList, value); } }
+
+ private System.Collections.Generic.SortedDictionary TagInfoListSpeedup = new SortedDictionary();
+ private System.Collections.Generic.SortedDictionary TagInfoListSpeedup1 = new SortedDictionary();
+
+ public bool _InventoryScanning = false;
+ public bool _KeyDown = false;
+
+ public string FilterIndicator { get { return (BleMvxApplication._PREFILTER_Enable | BleMvxApplication._POSTFILTER_MASK_Enable | BleMvxApplication._RSSIFILTER_Type != CSLibrary.Constants.RSSIFILTERTYPE.DISABLE) ? "Filter On" : ""; } }
+
+ private string _startInventoryButtonText = "Start Inventory";
+ public string startInventoryButtonText { get { return _startInventoryButtonText; } }
+
+ bool _tagCount = false;
+
+ private string _tagPerSecondText = "0/0/0 internal/new/tags/s ";
+ public string tagPerSecondText { get { return _tagPerSecondText; } }
+ private string _numberOfTagsText = " 0 tags";
+ public string numberOfTagsText { get { return _numberOfTagsText; } }
+ private string _labelVoltage = "";
+ public string labelVoltage { get { return _labelVoltage; } }
+ public string labelVoltageTextColor { get { return BleMvxApplication._batteryLow ? "Red" : "Black"; } }
+
+ private int _ListViewRowHeight = -1;
+ public int ListViewRowHeight { get { return _ListViewRowHeight; } }
+
+ DateTime InventoryStartTime;
+ private double _InventoryTime = 0;
+ public string InventoryTime { get { return ((uint)_InventoryTime).ToString() + "s"; } }
+
+ public string _DebugMessage = "";
+ public string DebugMessage { get { return _DebugMessage; } }
+
+ string _EPCHeaderText;
+ public string EPCHeaderText { get { return _EPCHeaderText; } }
+ string _RSSIHeaderText;
+ public string RSSIHeaderText { get { return _RSSIHeaderText; } }
+
+ bool _cancelVoltageValue = false;
+
+ //bool _waitingRFIDIdle = false;
+
+ // Tag Counter for Inventory Alert
+ uint _tagCount4Display = 0;
+ uint _tagCount4BeepSound = 0;
+ uint _newtagCount4BeepSound = 0;
+ uint _newtagCount4Vibration = 0;
+ bool _Vibrating = false;
+ uint _noNewTag = 0;
+ uint _newTagPerSecond = 0;
+
+ int _displayFormat = 0; // Display format, 0=HEX, 1=UPC, 2=GTIN
+
+ #endregion
+
+ public ViewModelMQTTInventory(IAdapter adapter, IUserDialogs userDialogs) : base(adapter)
+ {
+ _userDialogs = userDialogs;
+
+ OnStartInventoryButtonCommand = new Command(StartInventoryClick);
+ OnStartMQTTBrokerButtonCommand = new Command(StartMQTTBrokerClick);
+ OnStopMQTTBrokerButtonCommand = new Command(StopMQTTBrokerClick);
+ OnClearButtonCommand = new Command(ClearClick);
+
+ OnSendDataCommand = new Command(SendDataButtonClick);
+ OnShareDataCommand = new Command(ShareDataButtonClick);
+ OnSaveDataCommand = new Command(SaveDataButtonClick);
+ OnHEXButtonCommand = new Command(HEXButtonClick);
+ OnUPCButtonommand = new Command(UPCButtonClick);
+ OnSGTINButtonCommand = new Command(SGTINButtonClick);
+
+ _EPCHeaderText = "EPC";
+ _RSSIHeaderText = "RSSI";
+
+ InventorySetting();
+ SetEvent(true);
+ }
+
+ private void SetEvent(bool enable)
+ {
+ // Cancel RFID event handler
+ BleMvxApplication._reader.rfid.ClearEventHandler();
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.ClearEventHandler();
+
+ if (enable)
+ {
+ // RFID event handler
+ BleMvxApplication._reader.rfid.OnAsyncCallback += new EventHandler(TagInventoryEvent);
+ BleMvxApplication._reader.rfid.OnStateChanged += new EventHandler(StateChangedEvent);
+ BleMvxApplication._reader.rfid.OnInventoryTagRateCallback += new EventHandler(InventoryTagRateCallback);
+
+ // Key Button event handler
+ BleMvxApplication._reader.notification.OnKeyEvent += new EventHandler(HotKeys_OnKeyEvent);
+ BleMvxApplication._reader.notification.OnVoltageEvent += new EventHandler(VoltageEvent);
+ }
+ }
+
+ public override void ViewAppearing()
+ {
+ base.ViewAppearing();
+ }
+
+ public override void ViewDisappearing()
+ {
+ base.ViewDisappearing();
+ }
+
+ protected override void InitFromBundle(IMvxBundle parameters)
+ {
+ base.InitFromBundle(parameters);
+ }
+
+ private void ClearClick()
+ {
+ InvokeOnMainThread(() =>
+ {
+ lock (TagInfoList)
+ {
+ ClearClickImmediately();
+ }
+ });
+ }
+
+ private void ClearClickImmediately()
+ {
+ _InventoryTime = 0;
+ RaisePropertyChanged(() => InventoryTime);
+
+ _DebugMessage = "";
+ RaisePropertyChanged(() => DebugMessage);
+
+ TagInfoList.Clear();
+ TagInfoListSpeedup.Clear();
+ TagInfoListSpeedup1.Clear();
+ _numberOfTagsText = " " + _TagInfoList.Count.ToString() + " tags";
+ RaisePropertyChanged(() => numberOfTagsText);
+
+ _tagCount4Display = 0;
+ _tagPerSecondText = "0/" + _newTagPerSecond.ToString() + "/" + _tagCount4Display.ToString() + " internal/new/tags/s ";
+
+ RaisePropertyChanged(() => tagPerSecondText);
+ }
+
+ void SetConfigPower()
+ {
+ if (BleMvxApplication._reader.rfid.GetAntennaPort() == 1)
+ {
+ if (BleMvxApplication._config.RFID_PowerSequencing_NumberofPower == 0)
+ {
+ BleMvxApplication._reader.rfid.SetPowerSequencing(0);
+ BleMvxApplication._reader.rfid.SetPowerLevel(BleMvxApplication._config.RFID_Antenna_Power[0]);
+ }
+ else
+ BleMvxApplication._reader.rfid.SetPowerSequencing(BleMvxApplication._config.RFID_PowerSequencing_NumberofPower, BleMvxApplication._config.RFID_PowerSequencing_Level, BleMvxApplication._config.RFID_PowerSequencing_DWell);
+ }
+ else
+ {
+ uint port = BleMvxApplication._reader.rfid.GetAntennaPort();
+
+ for (uint cnt = 0; cnt < port; cnt++)
+ {
+ BleMvxApplication._reader.rfid.SetPowerLevel(BleMvxApplication._config.RFID_Antenna_Power[cnt], cnt);
+ }
+ }
+ }
+
+ void InventorySetting()
+ {
+ BleMvxApplication._reader.rfid.CancelAllSelectCriteria();
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags = CSLibrary.Constants.SelectFlags.ZERO;
+
+ BleMvxApplication._reader.rfid.SetInventoryDuration(BleMvxApplication._config.RFID_Antenna_Dwell);
+ BleMvxApplication._reader.rfid.SetTagDelayTime((uint)BleMvxApplication._config.RFID_CompactInventoryDelayTime); // for CS108 only
+ BleMvxApplication._reader.rfid.SetIntraPacketDelayTime((uint)BleMvxApplication._config.RFID_IntraPacketDelayTime); // for CS710S only
+ BleMvxApplication._reader.rfid.SetDuplicateEliminationRollingWindow(BleMvxApplication._config.RFID_DuplicateEliminationRollingWindow); // for CS710S only
+ BleMvxApplication._reader.rfid.SetCurrentLinkProfile(BleMvxApplication._config.RFID_Profile);
+ BleMvxApplication._reader.rfid.SetTagGroup(BleMvxApplication._config.RFID_TagGroup);
+
+ if (BleMvxApplication._config.RFID_Algorithm == CSLibrary.Constants.SingulationAlgorithm.DYNAMICQ)
+ {
+ BleMvxApplication._config.RFID_DynamicQParms.toggleTarget = BleMvxApplication._config.RFID_ToggleTarget ? 1U : 0;
+ BleMvxApplication._reader.rfid.SetDynamicQParms(BleMvxApplication._config.RFID_DynamicQParms);
+ }
+ else
+ {
+ BleMvxApplication._config.RFID_FixedQParms.toggleTarget = BleMvxApplication._config.RFID_ToggleTarget ? 1U : 0;
+ BleMvxApplication._reader.rfid.SetFixedQParms(BleMvxApplication._config.RFID_FixedQParms);
+ }
+
+ // Select Criteria filter
+ if (BleMvxApplication._PREFILTER_Enable)
+ {
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags |= CSLibrary.Constants.SelectFlags.SELECT;
+ BleMvxApplication._reader.rfid.Options.TagSelected.flags = CSLibrary.Constants.SelectMaskFlags.ENABLE_TOGGLE;
+ if (BleMvxApplication._PREFILTER_Bank == 1)
+ {
+ BleMvxApplication._reader.rfid.Options.TagSelected.bank = CSLibrary.Constants.MemoryBank.EPC;
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMask = new CSLibrary.Structures.S_MASK(BleMvxApplication._PREFILTER_MASK_EPC);
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMaskOffset = BleMvxApplication._PREFILTER_MASK_Offset;
+ BleMvxApplication._reader.rfid.Options.TagSelected.epcMaskLength = (uint)(BleMvxApplication._PREFILTER_MASK_EPC.Length) * 4;
+ }
+ else
+ {
+ BleMvxApplication._reader.rfid.Options.TagSelected.bank = (CSLibrary.Constants.MemoryBank)(BleMvxApplication._PREFILTER_Bank);
+ BleMvxApplication._reader.rfid.Options.TagSelected.Mask = CSLibrary.Tools.Hex.ToBytes(BleMvxApplication._PREFILTER_MASK_EPC);
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskOffset = BleMvxApplication._PREFILTER_MASK_Offset;
+ BleMvxApplication._reader.rfid.Options.TagSelected.MaskLength = (uint)(BleMvxApplication._PREFILTER_MASK_EPC.Length) * 4;
+ }
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PREFILTER);
+ BleMvxApplication._reader.rfid.Options.TagRanging.flags |= CSLibrary.Constants.SelectFlags.SELECT;
+ }
+
+ BleMvxApplication._reader.rfid.SetRSSIdBmFilter(BleMvxApplication._RSSIFILTER_Type, BleMvxApplication._RSSIFILTER_Option, BleMvxApplication._RSSIFILTER_Threshold_dBm);
+
+ BleMvxApplication._reader.rfid.Options.TagRanging.multibanks = 0;
+ BleMvxApplication._reader.rfid.Options.TagRanging.compactmode = true;
+ BleMvxApplication._reader.rfid.Options.TagRanging.focus = BleMvxApplication._config.RFID_Focus;
+ BleMvxApplication._reader.rfid.Options.TagRanging.fastid = BleMvxApplication._config.RFID_FastId;
+
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_PRERANGING);
+
+ // Set Power setting and clone antenna 0 setting to other antennas
+ // the command MUST in last inventory setting if use power sequencing
+ SetConfigPower();
+ }
+
+ void StartInventory()
+ {
+ if (_InventoryScanning)
+ {
+ _userDialogs.ShowSuccess("Configuring Reader, Please Wait", 1000);
+ return;
+ }
+
+ StartTagCount();
+ _InventoryScanning = true;
+ _startInventoryButtonText = "Stop Inventory";
+
+ _ListViewRowHeight = 40 + (int)(BleMvxApplication._reader.rfid.Options.TagRanging.multibanks * 10);
+ RaisePropertyChanged(() => ListViewRowHeight);
+
+ InventoryStartTime = DateTime.Now;
+
+ _Vibrating = false;
+ _noNewTag = 0;
+ if (BleMvxApplication._config.RFID_Vibration)
+ BleMvxApplication._reader.barcode.VibratorOn(CSLibrary.BarcodeReader.VIBRATORMODE.INVENTORYON, BleMvxApplication._config.RFID_VibrationTime);
+
+ BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_RANGING);
+ ClassBattery.SetBatteryMode(ClassBattery.BATTERYMODE.INVENTORY);
+ _cancelVoltageValue = true;
+
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ async void InventoryStopped()
+ {
+ if (!_InventoryScanning)
+ return;
+
+ if (BleMvxApplication._config.RFID_Vibration)
+ BleMvxApplication._reader.barcode.VibratorOff();
+ //_waitingRFIDIdle = true;
+ _InventoryScanning = false;
+ _tagCount = false;
+ _startInventoryButtonText = "Start Inventory";
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ async void StopInventory ()
+ {
+ if (!_InventoryScanning)
+ return;
+
+ BleMvxApplication._reader.rfid.StopOperation();
+ if (BleMvxApplication._config.RFID_Vibration)
+ BleMvxApplication._reader.barcode.VibratorOff();
+ //_waitingRFIDIdle = true;
+ _InventoryScanning = false;
+ _tagCount = false;
+ _startInventoryButtonText = "Start Inventory";
+ RaisePropertyChanged(() => startInventoryButtonText);
+ }
+
+ void StartInventoryClick()
+ {
+ if (!_InventoryScanning)
+ {
+ StartInventory();
+ }
+ else
+ {
+ StopInventory();
+ }
+ }
+
+ MqttServer _mqttServer;
+ IMqttClient _mqttClient;
+
+ async void StartMQTTBrokerClick()
+ {
+ //await StartListening(1883);
+
+ await StartMqttServer();
+ //await ConnectToMqttBrokerAsync();
+ }
+
+ async Task StartMqttServer()
+ {
+/*
+ var mqttFactory = new MqttFactory();
+
+ // Due to security reasons the "default" endpoint (which is unencrypted) is not enabled by default!
+ var mqttServerOptions = mqttFactory.CreateServerOptionsBuilder().WithDefaultEndpoint().Build();
+ _mqttServer = mqttFactory.CreateMqttServer(mqttServerOptions);
+ await _mqttServer.StartAsync();
+*/
+ var optionsBuilder = new MqttServerOptionsBuilder()
+ .WithDefaultEndpointBoundIPV6Address(IPAddress.None);
+ var mqttServerOptionsBuilder = new MqttServerOptionsBuilder().WithDefaultEndpoint();
+ var mqttServerOptions = mqttServerOptionsBuilder.Build();
+
+ var factory = new MqttFactory();
+ _mqttServer = factory.CreateMqttServer(mqttServerOptions);
+
+ //await _mqttServer.StartAsync(optionsBuilder.Build());
+ await _mqttServer.StartAsync();
+ }
+
+ public async Task ConnectToMqttBrokerAsync()
+ {
+ // 創建 MQTT 客戶端
+ var factory = new MqttFactory();
+ _mqttClient = factory.CreateMqttClient();
+
+ // 創建 MQTT 連接選項
+ var options = new MqttClientOptionsBuilder()
+ .WithClientId("YourClientId")
+ .WithTcpServer("127.0.0.1", 1883) // MQTT broker 的地址和端口
+ .WithCleanSession()
+ .Build();
+
+ // 連接到 MQTT broker
+ await _mqttClient.ConnectAsync(options, CancellationToken.None);
+
+ /*
+ var message = new MqttApplicationMessageBuilder()
+ .WithTopic("YourTopic") // 您要發布的主題
+ .WithPayload("YourPayload") // 您要發布的數據
+ .WithQualityOfServiceLevel(MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce) // 消息的服務質量等級
+ .WithRetainFlag() // 是否保留消息
+ .Build();
+
+ // 發布消息
+ await mqttClient.PublishAsync(message, CancellationToken.None);*/
+ }
+
+ void StopMQTTBrokerClick()
+ {
+
+ }
+
+ void StartTagCount()
+ {
+ _tagCount = true;
+
+ _tagCount4Display = 0;
+ _tagCount4BeepSound = 0;
+ _newtagCount4BeepSound = 0;
+ //_tagCount4Vibration = 0;
+ _newtagCount4Vibration = 0;
+
+ // Create a timer that waits one second, then invokes every second.
+ Xamarin.Forms.Device.StartTimer(TimeSpan.FromMilliseconds(1000), () =>
+ {
+/* if (BleMvxApplication._config.RFID_Vibration && !BleMvxApplication._config.RFID_VibrationTag)
+ {
+ if (_newtagCount4Vibration > 0)
+ {
+ _newtagCount4Vibration = 0;
+ _noNewTag = 0;
+ if (!_Vibrating)
+ {
+ _Vibrating = true;
+ BleMvxApplication._reader.barcode.VibratorOn(CSLibrary.BarcodeReader.VIBRATORMODE.INVENTORYON, BleMvxApplication._config.RFID_VibrationTime);
+ }
+ }
+ else
+ {
+ if (_Vibrating)
+ {
+ _noNewTag++;
+
+ if (_noNewTag > BleMvxApplication._config.RFID_VibrationWindow)
+ {
+ _Vibrating = false;
+ BleMvxApplication._reader.barcode.VibratorOff();
+ }
+ }
+ }
+ }*/
+
+ _InventoryTime = (DateTime.Now - InventoryStartTime).TotalSeconds;
+ RaisePropertyChanged(() => InventoryTime);
+
+ _DebugMessage = CSLibrary.InventoryDebug._inventoryPacketCount.ToString () + " OK, " + CSLibrary.InventoryDebug._inventorySkipPacketCount.ToString() + " Fail";
+ RaisePropertyChanged(() => DebugMessage);
+
+ _tagCount4BeepSound = 0;
+
+ //_numberOfTagsText = " " + newTagPerSecond.ToString() + @"\" + _TagInfoList.Count.ToString() + " tags";
+ _numberOfTagsText = " " + _TagInfoList.Count.ToString() + " tags";
+ RaisePropertyChanged(() => numberOfTagsText);
+
+ _tagPerSecondText = _readerInventoryTagRate.ToString() + "/" + _newTagPerSecond.ToString() + "/" + _tagCount4Display.ToString() + " internal/new/tags/s ";
+ //_tagPerSecondText = _tagCount4Display.ToString() + " tags/s ";
+ RaisePropertyChanged(() => tagPerSecondText);
+ _tagCount4Display = 0;
+ _newTagPerSecond = 0;
+
+ if (_tagCount)
+ return true;
+
+ return false;
+ });
+ }
+
+ void StopInventoryClick()
+ {
+ BleMvxApplication._reader.rfid.StopOperation();
+ _Vibrating = false;
+ //_waitingRFIDIdle = true;
+ }
+
+ void TagInventoryEvent(object sender, CSLibrary.Events.OnAsyncCallbackEventArgs e)
+ {
+ if (e.type != CSLibrary.Constants.CallbackType.TAG_RANGING)
+ return;
+
+ //if (_waitingRFIDIdle) // ignore display tags
+ // return;
+
+ //InvokeOnMainThread(() =>
+ //{
+ _tagCount4Display++;
+ _tagCount4BeepSound++;
+
+ if (_tagCount4BeepSound == 1)
+ {
+ if (BleMvxApplication._config.RFID_InventoryAlertSound)
+ {
+ InvokeOnMainThread(() =>
+ {
+ if (_newtagCount4BeepSound > 0)
+ Xamarin.Forms.DependencyService.Get().SystemSound(3);
+ else
+ Xamarin.Forms.DependencyService.Get().SystemSound(2);
+ });
+ _newtagCount4BeepSound = 0;
+ }
+ }
+ else if (_tagCount4BeepSound >= 40) // from 5
+ _tagCount4BeepSound = 0;
+
+
+ switch (_displayFormat)
+ {
+ case 1:
+ AddOrUpdateTagDataUPC(e.info);
+ break;
+
+ case 2:
+ AddOrUpdateTagDataGTIN(e.info);
+ break;
+
+ default:
+ AddOrUpdateTagData(e.info);
+ break;
+ }
+ //});
+ }
+
+ void StateChangedEvent(object sender, CSLibrary.Events.OnStateChangedEventArgs e)
+ {
+ InvokeOnMainThread(() =>
+ {
+ switch (e.state)
+ {
+ case CSLibrary.Constants.RFState.IDLE:
+ ClassBattery.SetBatteryMode(ClassBattery.BATTERYMODE.IDLE);
+ _cancelVoltageValue = true;
+ //_waitingRFIDIdle = false;
+
+ if (BleMvxApplication._reader.rfid.GetModelName() == "CS710S")
+ {
+ switch (BleMvxApplication._reader.rfid.LastMacErrorCode)
+ {
+ case 0x00: // normal end
+ break;
+
+ default:
+ _userDialogs.Alert("Last error : 0x" + BleMvxApplication._reader.rfid.LastMacErrorCode.ToString("X4"));
+ break;
+ }
+ }
+ else
+ {
+ switch (BleMvxApplication._reader.rfid.LastMacErrorCode)
+ {
+ case 0x00: // normal end
+ break;
+
+ case 0x0309: //
+ _userDialogs.Alert("Too near to metal, please move CS108 away from metal and start inventory again.");
+ break;
+
+ default:
+ _userDialogs.Alert("Mac error : 0x" + BleMvxApplication._reader.rfid.LastMacErrorCode.ToString("X4"));
+ break;
+ }
+ }
+
+ InventoryStopped();
+ break;
+ }
+ });
+ }
+
+ uint _readerInventoryTagRate = 0;
+ void InventoryTagRateCallback(object sender, CSLibrary.Events.OnInventoryTagRateCallbackEventArgs e)
+ {
+ _readerInventoryTagRate = e.inventoryTagRate;
+ }
+
+ private void AddOrUpdateTagData(CSLibrary.Structures.TagCallbackInfo info)
+ {
+ InvokeOnMainThread(() =>
+ {
+ lock (TagInfoList)
+ {
+ if (_displayFormat != 0)
+ return;
+
+#if not_binarysearch
+ for (cnt = 0; cnt < TagInfoList.Count; cnt++)
+ {
+ if (TagInfoList[cnt].EPC == info.epc.ToString())
+ {
+ TagInfoList[cnt].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ TagInfoList[cnt].Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+ TagInfoList[cnt].RSSI = info.rssi;
+ //TagInfoList[cnt].Phase = info.phase;
+ //TagInfoList[cnt].Channel = (byte)info.freqChannel;
+
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ TagInfoViewModel item = new TagInfoViewModel();
+
+ item.timeOfRead = DateTime.Now;
+ item.EPC = info.epc.ToString();
+ item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ item.Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+ item.RSSI = info.rssi;
+ //item.Phase = info.phase;
+ //item.Channel = (byte)info.freqChannel;
+ item.PC = info.pc.ToUshorts()[0];
+
+ //TagInfoList.Add(item);
+ TagInfoList.Insert(0, item);
+
+ _newTagFound = true;
+
+ Trace.Message("EPC Data = {0}", item.EPC);
+
+ _newTag = true;
+ }
+#else
+ string epcstr = info.epc.ToString();
+
+ try
+ {
+ TagInfoListSpeedup.Add(epcstr, (TagInfoList.Count, null));
+
+ TagInfoViewModel item = new TagInfoViewModel();
+
+ item.timeOfRead = DateTime.Now;
+ item.EPC = info.epc.ToString();
+ item.EPC_ORG = item.EPC;
+// if (BleMvxApplication._reader.rfid.Options.TagRanging.fastid)
+// {
+// item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.FastTid);
+// }
+// else
+// {
+ item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ item.Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+// }
+ item.RSSI = info.rssidBm;
+ //item.Phase = info.phase;
+ //item.Channel = (byte)info.freqChannel;
+ item.PC = info.pc.ToUshorts()[0];
+
+ //TagInfoList.Add(item);
+ if (BleMvxApplication._config.RFID_NewTagLocation)
+ TagInfoList.Insert(0, item);
+ else
+ TagInfoList.Add(item);
+
+ _newtagCount4BeepSound++;
+ _newtagCount4Vibration++;
+ _newTagPerSecond++;
+
+ Trace.Message("EPC Data = {0}", item.EPC);
+
+ var message = new MqttApplicationMessageBuilder()
+ .WithTopic("EPC") // 您要發布的主題
+ .WithPayload(item.EPC) // 您要發布的數據
+ .WithQualityOfServiceLevel(MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce) // 消息的服務質量等級
+ .WithRetainFlag() // 是否保留消息
+ .Build();
+
+ // 發布消息
+ _mqttClient.PublishAsync(message, CancellationToken.None);
+
+
+ //_newTag = true;
+ }
+ catch (Exception ex)
+ {
+ if (TagInfoListSpeedup.TryGetValue(epcstr, out var values))
+ {
+ if (BleMvxApplication._config.RFID_NewTagLocation)
+ {
+ values.index = TagInfoList.Count - values.index;
+ values.index--;
+ }
+
+// if (BleMvxApplication._reader.rfid.Options.TagRanging.fastid)
+// {
+// TagInfoList[values.index].Bank1Data = CSLibrary.Tools.Hex.ToString(info.FastTid);
+// }
+// else
+// {
+ TagInfoList[values.index].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ TagInfoList[values.index].Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+// }
+
+ TagInfoList[values.index].RSSI = info.rssidBm;
+ }
+ else
+ {
+ // error found epc
+ }
+
+ }
+#endif
+ }
+ });
+ }
+
+ private void AddOrUpdateTagDataUPC(CSLibrary.Structures.TagCallbackInfo info)
+ {
+ string epcstr = info.epc.ToString();
+
+ if (epcstr.Substring(0, 2) != "30")
+ return;
+
+ InvokeOnMainThread(() =>
+ {
+ if (_displayFormat != 1)
+ return;
+
+ lock (TagInfoList)
+ {
+ try
+ {
+ string URI = null;
+ string PureURI;
+ string[] PureURIItems;
+ string UPC;
+ string Serial;
+
+ if (TagInfoListSpeedup.TryGetValue(epcstr, out var values))
+ {
+ return;
+ }
+ else
+ {
+ try
+ {
+ TDTEngine engine = new TDTEngine();
+ string epcIdentifier = engine.HexToBinary(epcstr);
+ string parameterList = @"tagLength=96";
+ URI = engine.Translate(epcIdentifier, parameterList, @"PURE_IDENTITY");
+ PureURI = URI.Split(':')[4];
+ PureURIItems = PureURI.Split('.');
+ UPC = PureURIItems[0] + PureURIItems[1];
+ Serial = PureURIItems[2];
+ }
+ catch (Exception ex)
+ {
+ TagInfoListSpeedup.Add(epcstr, (TagInfoList.Count, null));
+ return;
+ }
+
+ TagInfoListSpeedup.Add(epcstr, (TagInfoList.Count, URI));
+ }
+
+ if (TagInfoListSpeedup1.TryGetValue(UPC, out int index))
+ {
+ if (BleMvxApplication._config.RFID_NewTagLocation)
+ {
+ index = TagInfoList.Count - index;
+ index--;
+ }
+
+// if (BleMvxApplication._reader.rfid.Options.TagRanging.fastid)
+// TagInfoList[index].Bank1Data = CSLibrary.Tools.Hex.ToString(info.FastTid);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 0)
+ TagInfoList[index].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 1)
+ TagInfoList[index].Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+
+ TagInfoList[index].RSSI++;
+ }
+ else
+ {
+ TagInfoListSpeedup1.Add(UPC, TagInfoList.Count);
+
+ TagInfoViewModel item = new TagInfoViewModel();
+
+ item.timeOfRead = DateTime.Now;
+ item.EPC = UPC;
+ item.EPC_ORG = epcstr;
+
+// if (BleMvxApplication._reader.rfid.Options.TagRanging.fastid)
+// item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.FastTid);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 0)
+ item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 1)
+ item.Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+
+ item.displayFormat = 1;
+ item.RSSI = 1;
+ item.PC = info.pc.ToUshorts()[0];
+
+ if (BleMvxApplication._config.RFID_NewTagLocation)
+ TagInfoList.Insert(0, item);
+ else
+ TagInfoList.Add(item);
+
+ _newtagCount4BeepSound++;
+ _newtagCount4Vibration++;
+ _newTagPerSecond++;
+
+ Trace.Message("EPC Data = {0}", item.EPC);
+
+ var message = new MqttApplicationMessageBuilder()
+ .WithTopic("EPC") // 您要發布的主題
+ .WithPayload(item.EPC) // 您要發布的數據
+ .WithQualityOfServiceLevel(MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce) // 消息的服務質量等級
+ .WithRetainFlag() // 是否保留消息
+ .Build();
+
+ // 發布消息
+ _mqttClient.PublishAsync(message, CancellationToken.None);
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+ });
+ }
+
+ private void AddOrUpdateTagDataGTIN(CSLibrary.Structures.TagCallbackInfo info)
+ {
+ string epcstr = info.epc.ToString();
+
+ if (epcstr.Substring(0, 2) != "30")
+ return;
+
+ // EPC display convertion
+
+ InvokeOnMainThread(() =>
+ {
+ if (_displayFormat != 2)
+ return;
+
+ lock (TagInfoList)
+ {
+ try
+ {
+ string URI = null;
+ string TagURI = "";
+ if (TagInfoListSpeedup.TryGetValue(epcstr, out var values))
+ {
+ if (values.URI == null)
+ return;
+
+ URI = values.URI;
+ TagURI = URI.Split(':')[4];
+ }
+ else
+ {
+ try
+ {
+ TDTEngine engine = new TDTEngine();
+ string epcIdentifier = engine.HexToBinary(epcstr);
+ string parameterList = @"tagLength=96";
+ URI = engine.Translate(epcIdentifier, parameterList, @"TAG_ENCODING");
+ TagURI = URI.Split(':')[4];
+ }
+ catch (Exception ex)
+ {
+ TagInfoListSpeedup.Add(epcstr, (TagInfoList.Count, null));
+ return;
+ }
+
+ TagInfoListSpeedup.Add(epcstr, (TagInfoList.Count, URI));
+ }
+
+ if (TagInfoListSpeedup1.TryGetValue(TagURI, out int index))
+ {
+ if (BleMvxApplication._config.RFID_NewTagLocation)
+ {
+ index = TagInfoList.Count - index;
+ index--;
+ }
+
+// if (BleMvxApplication._reader.rfid.Options.TagRanging.fastid)
+// TagInfoList[index].Bank1Data = CSLibrary.Tools.Hex.ToString(info.FastTid);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 0)
+ TagInfoList[index].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 1)
+ TagInfoList[index].Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+
+ TagInfoList[index].RSSI = info.rssidBm;
+ }
+ else
+ {
+ TagInfoListSpeedup1.Add(TagURI, TagInfoList.Count);
+
+ TagInfoViewModel item = new TagInfoViewModel();
+
+ item.timeOfRead = DateTime.Now;
+ item.EPC = TagURI;
+ item.EPC_ORG = epcstr;
+
+// if (BleMvxApplication._reader.rfid.Options.TagRanging.fastid)
+// item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.FastTid);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 0)
+ item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks > 1)
+ item.Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+
+ item.RSSI = info.rssidBm;
+ item.PC = info.pc.ToUshorts()[0];
+
+ if (BleMvxApplication._config.RFID_NewTagLocation)
+ TagInfoList.Insert(0, item);
+ else
+ TagInfoList.Add(item);
+
+ _newtagCount4BeepSound++;
+ _newtagCount4Vibration++;
+ _newTagPerSecond++;
+
+ Trace.Message("EPC Data = {0}", item.EPC);
+
+ var message = new MqttApplicationMessageBuilder()
+ .WithTopic("EPC") // 您要發布的主題
+ .WithPayload(item.EPC) // 您要發布的數據
+ .WithQualityOfServiceLevel(MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce) // 消息的服務質量等級
+ .WithRetainFlag() // 是否保留消息
+ .Build();
+
+ // 發布消息
+ _mqttClient.PublishAsync(message, CancellationToken.None);
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+ });
+ }
+
+ void VoltageEvent(object sender, CSLibrary.Notification.VoltageEventArgs e)
+ {
+ InvokeOnMainThread(() =>
+ {
+ if (e.Voltage == 0xffff)
+ {
+ _labelVoltage = "Battery ERROR";
+ }
+ else
+ {
+ // to fix CS108 voltage bug
+ if (_cancelVoltageValue)
+ {
+ _cancelVoltageValue = false;
+ return;
+ }
+
+ double voltage = (double)e.Voltage / 1000;
+
+ {
+ var batlow = ClassBattery.BatteryLow(voltage);
+
+ if (BleMvxApplication._batteryLow && batlow == ClassBattery.BATTERYLEVELSTATUS.NORMAL)
+ {
+ BleMvxApplication._batteryLow = false;
+ RaisePropertyChanged(() => labelVoltageTextColor);
+ }
+ else
+ if (!BleMvxApplication._batteryLow && batlow != ClassBattery.BATTERYLEVELSTATUS.NORMAL)
+ {
+ BleMvxApplication._batteryLow = true;
+
+ if (batlow == ClassBattery.BATTERYLEVELSTATUS.LOW)
+ _userDialogs.AlertAsync("20% Battery Life Left, Please Recharge RFID Reader or Replace Freshly Charged Battery");
+ //else if (batlow == ClassBattery.BATTERYLEVELSTATUS.LOW_17)
+ // _userDialogs.AlertAsync("8% Battery Life Left, Please Recharge RFID Reader or Replace with Freshly Charged Battery");
+
+ RaisePropertyChanged(() => labelVoltageTextColor);
+ }
+ }
+
+ switch (BleMvxApplication._config.BatteryLevelIndicatorFormat)
+ {
+ case 0:
+ _labelVoltage = " //\t\t\t3.98v " + voltage.ToString("0.000") + "v"; // v
+ break;
+
+ default:
+ _labelVoltage = voltage.ToString("0.000") + "v " + ClassBattery.Voltage2Percent(voltage).ToString("0") + "%"; // %
+ //_labelVoltage = ClassBattery.Voltage2Percent((double)e.Voltage / 1000).ToString("0") + "% " + ((double)e.Voltage / 1000).ToString("0.000") + "v"; // %
+ break;
+ }
+ }
+
+ RaisePropertyChanged(() => labelVoltage);
+ });
+ }
+
+ public ICommand OnSendDataCommand { protected set; get; }
+ public ICommand OnShareDataCommand { protected set; get; }
+ public ICommand OnSaveDataCommand { protected set; get; }
+
+ private void SendDataButtonClick ()
+ {
+ var result = BackupData();
+
+ CSLibrary.Debug.WriteLine("BackupData : {0}", result.ToString());
+ }
+
+/* private void ShareDataButtonClick(object ind)
+ {
+ if (ind == null || (int)ind != 1)
+ return;
+
+ var result = ShareData();
+ CSLibrary.Debug.WriteLine("Share Data : {0}", result.ToString());
+ }
+*/
+ private void ShareDataButtonClick()
+ {
+ var result = ShareData();
+ CSLibrary.Debug.WriteLine("Share Data : {0}", result.ToString());
+ }
+ private void SaveDataButtonClick()
+ {
+ var result = SaveData();
+ CSLibrary.Debug.WriteLine("Save Data : {0}", result.ToString());
+ }
+
+ private void HEXButtonClick()
+ {
+ _displayFormat = 0;
+ _EPCHeaderText = "EPC";
+ _RSSIHeaderText = "RSSI";
+ RaisePropertyChanged(() => EPCHeaderText);
+ RaisePropertyChanged(() => RSSIHeaderText);
+ ClearClick();
+ }
+
+ private void UPCButtonClick()
+ {
+ _displayFormat = 1;
+ _EPCHeaderText = "UPC";
+ _RSSIHeaderText = "Unit Count";
+ RaisePropertyChanged(() => EPCHeaderText);
+ RaisePropertyChanged(() => RSSIHeaderText);
+ ClearClick();
+ }
+
+ private void SGTINButtonClick()
+ {
+ _displayFormat = 2;
+ _EPCHeaderText = "SGTIN";
+ _RSSIHeaderText = "RSSI";
+ RaisePropertyChanged(() => EPCHeaderText);
+ RaisePropertyChanged(() => RSSIHeaderText);
+ ClearClick();
+ }
+
+#region Key_event
+
+ void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e)
+ {
+ // try to get current page
+ if (e.KeyCode == CSLibrary.Notification.Key.BUTTON)
+ {
+ if (e.KeyDown)
+ {
+ if (!_KeyDown)
+ StartInventory();
+ _KeyDown = true;
+ }
+ else
+ {
+ if (_KeyDown == true)
+ StopInventory();
+ _KeyDown = false;
+ }
+ }
+ }
+#endregion
+
+ async void ShowDialog(string Msg)
+ {
+ var config = new ProgressDialogConfig()
+ {
+ Title = Msg,
+ IsDeterministic = true,
+ MaskType = MaskType.Gradient,
+ };
+
+ using (var progress = _userDialogs.Progress(config))
+ {
+ progress.Show();
+ await System.Threading.Tasks.Task.Delay(1000);
+ }
+ }
+
+ string GetJsonData ()
+ {
+ try
+ {
+ RESTfulHeader data = new RESTfulHeader();
+
+ data.sequenceNumber = BleMvxApplication._sequenceNumber++;
+ data.rfidReaderName = BleMvxApplication._reader.ReaderName;
+
+
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync();
+ if (data.rfidReaderSerialNumber == null)
+ _userDialogs.Alert("No Serial Number");
+
+ data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode();
+ data.numberOfTags = (UInt16)_TagInfoList.Count;
+
+ foreach (var tagitem in _TagInfoList)
+ {
+ RESTfulSDetail item = new RESTfulSDetail();
+ item.pc = tagitem.PC.ToString("X4");
+ item.epc = tagitem.EPC.ToString();
+ item.timeOfRead = tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff");
+ item.timeZone = tagitem.timeOfRead.ToString("zzz");
+ data.tags.Add(item);
+ }
+
+ string JSONdata = Newtonsoft.Json.JsonConvert.SerializeObject(data);
+ return JSONdata;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ string GetCSVData()
+ {
+ try
+ {
+ string CSVdata = "";
+
+ foreach (var tagitem in _TagInfoList)
+ {
+ CSVdata += tagitem.PC.ToString("X4") + ",";
+ CSVdata += tagitem.EPC.ToString() + ",";
+ CSVdata += tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff") + ",";
+ CSVdata += tagitem.timeOfRead.ToString("zzz");
+ CSVdata += System.Environment.NewLine;
+
+ /*
+ CSVdata += "\"" + tagitem.PC.ToString("X4") + "\",";
+ CSVdata += "\"" + tagitem.EPC.ToString() + "\",";
+ CSVdata += tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff") + "\",";
+ CSVdata += "\"" + tagitem.timeOfRead.ToString("zzz") + "\"";
+ CSVdata += System.Environment.NewLine;
+ */
+ }
+
+ return CSVdata;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ string GetExcelCSVData()
+ {
+ try
+ {
+ string CSVdata = "";
+
+ foreach (var tagitem in _TagInfoList)
+ {
+ CSVdata += "=\"" + tagitem.PC.ToString("X4") + "\",";
+ CSVdata += "=\"" + tagitem.EPC.ToString() + "\",";
+ CSVdata += tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss") + ",";
+ CSVdata += tagitem.timeOfRead.ToString("zzz");
+ CSVdata += System.Environment.NewLine;
+ }
+
+ return CSVdata;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ async System.Threading.Tasks.Task ShareData()
+ {
+ bool r = false;
+
+ switch (BleMvxApplication._config.RFID_ShareFormat)
+ {
+ case 0: // JSON
+ r = await CrossShare.Current.Share(new Plugin.Share.Abstractions.ShareMessage
+ {
+ Text = GetJsonData(),
+ Title = "tags list"
+ });
+ break;
+
+ case 1:
+ r = await CrossShare.Current.Share(new Plugin.Share.Abstractions.ShareMessage
+ {
+ Text = GetCSVData(),
+ Title = "tags list.csv"
+ });
+ break;
+
+ case 2:
+ r = await CrossShare.Current.Share(new Plugin.Share.Abstractions.ShareMessage
+ {
+ Text = GetExcelCSVData(),
+ Title = "tags list.csv"
+ });
+ break;
+ }
+
+ return r;
+ }
+
+ async System.Threading.Tasks.Task SaveData()
+ {
+ string fileExtName = "";
+ string Text = "";
+
+ switch (BleMvxApplication._config.RFID_ShareFormat)
+ {
+ case 0: // JSON
+ fileExtName = "json";
+ Text = GetJsonData();
+ break;
+
+ case 1:
+ fileExtName = "csv";
+ Text = GetCSVData();
+ break;
+
+ case 2:
+ fileExtName = "csv";
+ Text = GetExcelCSVData();
+ break;
+
+ default:
+ fileExtName = "txt";
+ break;
+ }
+
+ switch (Xamarin.Forms.Device.RuntimePlatform)
+ {
+ case Xamarin.Forms.Device.Android:
+ {
+
+ /* while (await _permissions.CheckPermissionStatusAsync() != Plugin.Permissions.Abstractions.PermissionStatus.Granted)
+ {
+ await _permissions.RequestPermissionAsync();
+ }
+ */
+
+ var status = await Permissions.CheckStatusAsync();
+ if (status != PermissionStatus.Granted)
+ {
+ status = await Permissions.RequestAsync();
+ }
+
+ //string documents = @"/storage/emulated/0/Download/";
+ //string filename = documents + "InventoryData-" + System.DateTime.Now.ToString("yyyyMMddHHmmss") + "." + fileExtName;
+ //var documents = DependencyService.Get().GetPath();
+
+ var documents = DependencyService.Get().GetPath();
+ var filename = System.IO.Path.Combine(documents, "InventoryData-" + System.DateTime.Now.ToString("yyyyMMddHHmmss") + "." + fileExtName);
+ //System.IO.File.WriteAllText(filename, Text);
+ using (var writer = System.IO.File.CreateText(filename))
+ {
+ await writer.WriteLineAsync(Text);
+ }
+ }
+ break;
+
+ default:
+ {
+ var documents = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
+ var filename = System.IO.Path.Combine(documents, "InventoryData-" + System.DateTime.Now.ToString("yyyyMMddHHmmss") + "." + fileExtName);
+ System.IO.File.WriteAllText(filename, Text);
+ }
+ break;
+ }
+
+ _userDialogs.AlertAsync("File saved, please check file in public folder");
+
+ return true;
+ }
+
+ async System.Threading.Tasks.Task BackupData()
+ {
+ try
+ {
+ RESTfulHeader data = new RESTfulHeader();
+
+ data.sequenceNumber = BleMvxApplication._sequenceNumber ++;
+ data.rfidReaderName = BleMvxApplication._reader.ReaderName;
+
+ data.rfidReaderSerialNumber = BleMvxApplication._reader.siliconlabIC.GetSerialNumberSync();
+ if (data.rfidReaderSerialNumber == null)
+ _userDialogs.Alert("No Serial Number");
+
+ data.rfidReaderInternalSerialNumber = BleMvxApplication._reader.rfid.GetPCBAssemblyCode();
+ data.numberOfTags = (UInt16)_TagInfoList.Count;
+
+ foreach (var tagitem in _TagInfoList)
+ {
+ RESTfulSDetail item = new RESTfulSDetail();
+ item.pc = tagitem.PC.ToString("X4");
+ item.epc = tagitem.EPC.ToString();
+ item.timeOfRead = tagitem.timeOfRead.ToString("yyyy/MM/dd HH:mm:ss.fff");
+ item.timeZone = tagitem.timeOfRead.ToString("zzz");
+ data.tags.Add(item);
+ }
+
+ string JSONdata = Newtonsoft.Json.JsonConvert.SerializeObject(data);
+
+ // Post to server when parameters
+ if (BleMvxApplication._config.RFID_SavetoCloud && BleMvxApplication._config.RFID_CloudProtocol == 1)
+ {
+ //string rootPath = @"https://www.convergence.com.hk:29090/WebServiceRESTs/1.0/req";
+ //string rootPath = @"https://192.168.25.21:29090/WebServiceRESTs/1.0/req";
+ string fullPath = BleMvxApplication._config.RFID_IPAddress;
+
+ if (fullPath.Length >= 28 && fullPath.Substring(8, 28) == "democloud.convergence.com.hk")
+ fullPath += @"/create-update-delete/update-entity/tagdata";
+
+ var uri = new Uri(fullPath + "?" + JSONdata);
+
+ HttpClient client = new HttpClient();
+ client.MaxResponseContentBufferSize = 102400;
+
+ HttpResponseMessage response = null;
+
+ try
+ {
+ response = await client.PostAsync(uri, new StringContent("", System.Text.Encoding.UTF8, "application/json"));
+ if (response.IsSuccessStatusCode)
+ {
+ var a = response.Content;
+ var b = await a.ReadAsStringAsync();
+ _userDialogs.Alert("Success Save to Cloud Server : " + b);
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ Trace.Message(ex.Message);
+ }
+
+ _userDialogs.Alert("Fail to Save to Cloud Server !!!!!");
+ }
+
+ // Post to server when body
+ if (BleMvxApplication._config.RFID_SavetoCloud && BleMvxApplication._config.RFID_CloudProtocol == 0)
+ {
+ //string rootPath = @"https://www.convergence.com.hk:29090/WebServiceRESTs/1.0/req";
+ //string rootPath = @"https://192.168.25.21:29090/WebServiceRESTs/1.0/req";
+ string fullPath1 = BleMvxApplication._config.RFID_IPAddress;
+
+ if (fullPath1.Length >= 28 && fullPath1.Substring(8, 28) == "democloud.convergence.com.hk")
+ fullPath1 += @"/create-update-delete/update-entity/tagdata";
+
+ var uri1 = new Uri(string.Format(fullPath1, string.Empty));
+ var content1 = new StringContent(JSONdata, System.Text.Encoding.UTF8, "application/json");
+
+ HttpClient client1 = new HttpClient();
+ client1.MaxResponseContentBufferSize = 102400;
+
+ HttpResponseMessage response1 = null;
+
+ try
+ {
+ response1 = await client1.PostAsync(uri1, content1);
+ //response = await client.PutAsync(uri, content);
+ if (response1.IsSuccessStatusCode)
+ {
+ var a = response1.Content;
+ var b = await a.ReadAsStringAsync();
+ _userDialogs.Alert("Success Save to Cloud Server : " + b);
+ return true;
+ }
+ }
+ catch (Exception ex1)
+ {
+ Trace.Message(ex1.Message);
+ }
+
+ _userDialogs.Alert("Fail to Save to Cloud Server !!!!!");
+ }
+
+ }
+ catch (Exception ex)
+ {
+ Trace.Message("data fail");
+ var a = ex.Message;
+ }
+
+ return false;
+ }
+
+
+
+
+
+
+ private TcpListener _listener;
+
+ public async Task StartListening(int port)
+ {
+ _listener = new TcpListener(IPAddress.Any, port);
+ _listener.Start();
+
+ while (true)
+ {
+ var client = await _listener.AcceptTcpClientAsync();
+ HandleClient(client);
+ }
+ }
+
+ private async void HandleClient(TcpClient client)
+ {
+ var buffer = new byte[1024];
+ var stream = client.GetStream();
+
+ while (true)
+ {
+ var bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length);
+ if (bytesRead == 0)
+ break;
+
+ var message = Encoding.UTF8.GetString(buffer, 0, bytesRead);
+ Console.WriteLine($"Received: {message}");
+ }
+
+ client.Close();
+ }
+
+
+
+
+ }
+}
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS2Inventory.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS2Inventory.cs
index be81196..7da3cd7 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS2Inventory.cs
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS2Inventory.cs
@@ -516,6 +516,9 @@ void StateChangedEvent(object sender, CSLibrary.Events.OnStateChangedEventArgs e
private void AddOrUpdateTagData(CSLibrary.Structures.TagCallbackInfo info)
{
+ if (info.Bank1Data.Length == 0)
+ return;
+
InvokeOnMainThread(() =>
{
bool found = false;
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS3Inventory.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS3Inventory.cs
index e8587b6..bdf88c6 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS3Inventory.cs
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MagnusS2orS3/ViewModelRFMicroS3Inventory.cs
@@ -529,6 +529,9 @@ void StateChangedEvent(object sender, CSLibrary.Events.OnStateChangedEventArgs e
private void AddOrUpdateTagData(CSLibrary.Structures.TagCallbackInfo info)
{
+ if (info.Bank1Data.Length == 0)
+ return;
+
InvokeOnMainThread(() =>
{
bool found = false;
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MultiBankInventory/ViewModelMultiBankInventory.cs b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MultiBankInventory/ViewModelMultiBankInventory.cs
index 59fb8cc..cd10ed6 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MultiBankInventory/ViewModelMultiBankInventory.cs
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/MultiBankInventory/ViewModelMultiBankInventory.cs
@@ -77,8 +77,6 @@ public ViewModelMultiBankInventory(IAdapter adapter, IUserDialogs userDialogs) :
OnStartInventoryButtonCommand = new Command(StartInventoryClick);
OnClearButtonCommand = new Command(ClearClick);
- OnClearBarcodeDataButtonCommand = new Command(ClearBarcodeDataButtonClick);
-
BleMvxApplication._reader.rfid.SetCountry(BleMvxApplication._config.RFID_Region, (int)BleMvxApplication._config.RFID_FixedChannel);
InventorySetting();
@@ -139,9 +137,6 @@ private void SetEvent(bool enable)
BleMvxApplication._reader.rfid.OnAsyncCallback += new EventHandler(TagInventoryEvent);
BleMvxApplication._reader.rfid.OnStateChanged += new EventHandler(StateChangedEvent);
- // Barcode event handler
- BleMvxApplication._reader.barcode.OnCapturedNotify += new EventHandler(Linkage_CaptureCompleted);
-
// Key Button event handler
BleMvxApplication._reader.notification.OnKeyEvent += new EventHandler(HotKeys_OnKeyEvent);
BleMvxApplication._reader.notification.OnVoltageEvent += new EventHandler(VoltageEvent);
@@ -419,66 +414,89 @@ private void AddOrUpdateTagData(CSLibrary.Structures.TagCallbackInfo info)
{
InvokeOnMainThread(() =>
{
- bool found = false;
+ try
+ {
+ bool found = false;
- int cnt;
+ int cnt;
- lock (TagInfoList)
- {
- for (cnt = 0; cnt < TagInfoList.Count; cnt++)
+ lock (TagInfoList)
{
- if (TagInfoList[cnt].EPC == info.epc.ToString())
+ try
+ {
+
+ for (cnt = 0; cnt < TagInfoList.Count; cnt++)
{
-/*
- if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1 && TagInfoList[cnt].Bank1Data != CSLibrary.Tools.Hex.ToString(info.Bank1Data))
- continue;
-
- if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks == 2 && TagInfoList[cnt].Bank2Data != CSLibrary.Tools.Hex.ToString(info.Bank2Data))
- continue;
-*/
- if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1)
- if (TagInfoList[cnt].Bank1Data.Length > 0)
- if (info.Bank1Data.Length > 0)
- if (TagInfoList[cnt].Bank1Data != CSLibrary.Tools.Hex.ToString(info.Bank1Data))
- continue;
-
- if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 2)
- if (TagInfoList[cnt].Bank2Data.Length > 0)
- if (info.Bank2Data.Length > 0)
- if (TagInfoList[cnt].Bank2Data != CSLibrary.Tools.Hex.ToString(info.Bank2Data))
- continue;
-
- if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1 && info.Bank1Data.Length > 0)
- TagInfoList[cnt].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
-
- if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 2 && info.Bank2Data.Length > 0)
- TagInfoList[cnt].Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
-
- TagInfoList[cnt].RSSI = info.rssidBm;
- found = true;
- break;
+ if (TagInfoList[cnt].EPC == info.epc.ToString())
+ {
+ /*
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1 && TagInfoList[cnt].Bank1Data != CSLibrary.Tools.Hex.ToString(info.Bank1Data))
+ continue;
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks == 2 && TagInfoList[cnt].Bank2Data != CSLibrary.Tools.Hex.ToString(info.Bank2Data))
+ continue;
+ */
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1)
+ if (TagInfoList[cnt].Bank1Data.Length > 0)
+ if (info.Bank1Data.Length > 0)
+ if (TagInfoList[cnt].Bank1Data != CSLibrary.Tools.Hex.ToString(info.Bank1Data))
+ continue;
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 2)
+ if (TagInfoList[cnt].Bank2Data.Length > 0)
+ if (info.Bank2Data.Length > 0)
+ if (TagInfoList[cnt].Bank2Data != CSLibrary.Tools.Hex.ToString(info.Bank2Data))
+ continue;
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 1 && info.Bank1Data.Length > 0)
+ TagInfoList[cnt].Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+
+ if (BleMvxApplication._reader.rfid.Options.TagRanging.multibanks >= 2 && info.Bank2Data.Length > 0)
+ TagInfoList[cnt].Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+
+ TagInfoList[cnt].RSSI = info.rssidBm;
+ found = true;
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("AddOrUpdateTagData xists Item : " + ex.Message);
}
- }
- if (!found)
- {
- TagInfoViewModel item = new TagInfoViewModel();
+ if (!found)
+ {
+ try
+ {
+ TagInfoViewModel item = new TagInfoViewModel();
- item.EPC = info.epc.ToString();
- item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
- item.Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
- item.RSSI = info.rssidBm;
- item.PC = info.pc.ToUshorts()[0];
+ item.EPC = info.epc.ToString();
+ item.Bank1Data = CSLibrary.Tools.Hex.ToString(info.Bank1Data);
+ item.Bank2Data = CSLibrary.Tools.Hex.ToString(info.Bank2Data);
+ item.RSSI = info.rssidBm;
+ item.PC = info.pc.ToUshorts()[0];
- TagInfoList.Insert(0, item);
+ TagInfoList.Insert(0, item);
- _newTagFound = true;
+ _newTagFound = true;
- Trace.Message("EPC Data = {0}", item.EPC);
+ Trace.Message("EPC Data = {0}", item.EPC);
- _newTag = true;
+ _newTag = true;
+
+ }
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("AddOrUpdateTagData New Item : " + ex.Message);
+ }
+ }
}
}
+ catch (Exception ex)
+ {
+ CSLibrary.Debug.WriteLine("AddOrUpdateTagData : " + ex.Message);
+ }
});
}
@@ -512,75 +530,6 @@ void VoltageEvent(object sender, CSLibrary.Notification.VoltageEventArgs e)
RaisePropertyChanged(() => labelVoltage);
}
-#region -------------------- Barcode Scan -------------------
-
- public ICommand OnStartBarcodeScanButtonCommand { protected set; get; }
- public ICommand OnClearBarcodeDataButtonCommand { protected set; get; }
-
- private string _startBarcodeScanButtonText = "Start Scan";
- public string startBarcodeScanButtonText { get { return _startBarcodeScanButtonText; } }
-
- public class BARCODERECORD
- {
- public string code { get; set; }
- public uint count { get; set; }
- }
-
- public ObservableCollection barcodeData { get; set; } = new ObservableCollection();
-
- private void ClearBarcodeDataButtonClick()
- {
- barcodeData.Clear();
- }
-
- void Linkage_CaptureCompleted(object sender, CSLibrary.Barcode.BarcodeEventArgs e)
- {
- InvokeOnMainThread(() =>
- {
- switch (e.MessageType)
- {
- case CSLibrary.Barcode.Constants.MessageType.DEC_MSG:
- AddOrUpdateBarcodeData((CSLibrary.Barcode.Structures.DecodeMessage)e.Message);
- //UpdateUI((DecodeMessage)e.Message, "Barcode Captured...");
- break;
- case CSLibrary.Barcode.Constants.MessageType.ERR_MSG:
- //UpdateUI(null, String.Format("Barcode Returned: {0}", e.ErrorMessage));
- break;
- }
- });
- }
-
- private void AddOrUpdateBarcodeData(CSLibrary.Barcode.Structures.DecodeMessage decodeInfo)
- {
- if (decodeInfo != null)
- {
- int cnt = 0;
- bool found = false;
-
- for (; cnt < barcodeData.Count; cnt++)
- {
- if (barcodeData[cnt].code == decodeInfo.pchMessage)
- {
- barcodeData[cnt].count++;
- found = true;
- break;
- }
- }
-
- if (!found)
- {
- BARCODERECORD item = new BARCODERECORD();
-
- item.code = decodeInfo.pchMessage;
- item.count = 1;
-
- barcodeData.Add(item);
- }
- }
- }
-
- #endregion
-
#region Key_event
void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e)
diff --git a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/PageSpecialFunctionsMenu.xaml b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/PageSpecialFunctionsMenu.xaml
index b33a598..44d72d7 100644
--- a/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/PageSpecialFunctionsMenu.xaml
+++ b/MobileMvxApp/BLE.Client/PagesViewModelsSet/SpecialFuction/PageSpecialFunctionsMenu.xaml
@@ -15,7 +15,11 @@
+
+
+
+