Common: - password checks extended,

CUST: - password file read out and logged,
- password write and verify implemented,
- initial login avoid marking of password file not installed before switching OFF the pulse adaptor
This commit is contained in:
Thomas Wiedebusch 2023-10-12 01:00:28 +02:00
parent f5f7da4382
commit 21dafc97fc
10 changed files with 447 additions and 132 deletions

View File

@ -12,7 +12,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// </summary>
public class MeterPwdFile
{
private const String StrPasswordFileName = "0\\password";
// The FwUpdateSw references this string
public const String StrPasswordFileName = "0\\password";
private readonly GenesisMeter _genesisMeter;
private readonly MeterFile _meterFile;
private Byte[] _hashedPasswordFile;
@ -286,16 +287,21 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// <summary>
/// Verify Meter password file
/// generated password file has to be present
/// Verify Meter password file.
/// <param name="hashedPwdFile">optional hashed password file with constant length as byte array </param>
/// <returns>true if the read value is identical with the preset or given hashed value</returns>
/// </summary>
/// <returns></returns>
/// <remarks date="2023-JAn-24" author="Thomas Wiedebusch/Roland Drabesch">
/// <remarks date="2023-Jan-24" author="Thomas Wiedebusch/Roland Drabesch">
/// - Initial.
/// </remarks>
public Boolean VerifyMeterPwdFile()
public Boolean VerifyMeterPwdFile(Byte[] hashedPwdFile = null)
{
if (hashedPwdFile != null)
{
if (!SetHashedPwdFile(hashedPwdFile)) return false;
}
if (_hashedPasswordFile == null)
{
return false;

View File

@ -23,7 +23,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisPwd
/// <summary>
/// Each password will generate a 20 bytes hash constant due to SHA1 algorithm
/// </summary>
private const Int32 HashedPwdLength = 20;
public const Int32 HashedPwdLength = 20;
/// <summary>
/// password file length is 160 bytes (8 passwords a 20 bytes hashed)

View File

@ -1,5 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PCB/@EntryIndexedValue">PCB</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=adaptor/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Applic/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=applist/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Approver/@EntryIndexedValue">True</s:Boolean>

View File

@ -40,73 +40,37 @@
//
// rtbHistory
//
this.rtbHistory.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbHistory.Location = new System.Drawing.Point(3, 53);
resources.ApplyResources(this.rtbHistory, "rtbHistory");
this.rtbHistory.Name = "rtbHistory";
this.rtbHistory.Size = new System.Drawing.Size(378, 673);
this.rtbHistory.TabIndex = 31;
this.rtbHistory.Text = "";
this.rtbHistory.TextChanged += new System.EventHandler(this.rtbHistory_TextChanged);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.rtbHistory, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 111F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(384, 729);
this.tableLayoutPanel1.TabIndex = 38;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.picBoxLogo, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(378, 44);
this.tableLayoutPanel2.TabIndex = 36;
//
// picBoxLogo
//
resources.ApplyResources(this.picBoxLogo, "picBoxLogo");
this.picBoxLogo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.picBoxLogo.Dock = System.Windows.Forms.DockStyle.Right;
this.picBoxLogo.ErrorImage = null;
this.picBoxLogo.Image = ((System.Drawing.Image)(resources.GetObject("picBoxLogo.Image")));
this.picBoxLogo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.picBoxLogo.InitialImage = null;
this.picBoxLogo.Location = new System.Drawing.Point(270, 3);
this.picBoxLogo.Name = "picBoxLogo";
this.picBoxLogo.Size = new System.Drawing.Size(105, 38);
this.picBoxLogo.TabIndex = 35;
this.picBoxLogo.TabStop = false;
//
// FrmHistory
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(384, 729);
this.Controls.Add(this.tableLayoutPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimumSize = new System.Drawing.Size(400, 768);
this.Name = "FrmHistory";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "FW-Update Process History";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmHistory_FormClosing);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);

View File

@ -118,14 +118,69 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="rtbHistory.Size" type="System.Drawing.Size, System.Drawing">
<value>428, 673</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>434, 729</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>434, 729</value>
<data name="picBoxLogo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
/9j/4AAQSkZJRgABAQEAYABgAAD/4QC8RXhpZgAATU0AKgAAAAgABAESAAMAAAABAAEAAAE7AAIAAAAH
AAAAPodpAAQAAAABAAAARpydAAEAAAAOAAAApgAAAABUaG9tYXMAAAAEkAMAAgAAABQAAAB8kAQAAgAA
ABQAAAC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JLNM3c0SLHHK5xkuqKqhuoUY6VqP8PtCk
TRFbR9NK+GnEmkg26401hE0IMPH7vEbsny4+ViKKKj21Rqzk/v8AK35aehosLQTclBXfku9/z19dTDuf
2c/AV3f6bdSeD/DrXGjzSXFlJ9gj3W0kk/2h2U44Jn/eZ/v/ADdeajt/2afh9aX9ndReC/Dcdxp5mNs6
WEamHzWd5Mcd2kkb2LsRjJooq/rVbbnf3sz/ALPwt7+yj/4CulrdPJfcux2Omabb6Np1vZ2kMdva2saw
wxRrtSJFACqo7AAAAUUUVhvqzsSSVkf/2Q==
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -144,7 +199,4 @@
AB/+AAAf/AAAD/gAAA/4AAAf+AAAP/wYDH/+OA7///gP///4D///+A///////w==
</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>FW-Update Info</value>
</data>
</root>

View File

@ -117,7 +117,125 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="picBoxLogo.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Right</value>
</data>
<data name="&gt;&gt;rtbHistory.Type" xml:space="preserve">
<value>System.Windows.Forms.RichTextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>FW-Update Info</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>38</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="picBoxLogo.InitialImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3d3cAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAA
AAAABwAAAAAAAAAAAAAAAAB3cAcAAAAAAAAAAAAHcHAAd3AHAABwAAAAAAAAdwAHAHhwAAAABwAAAAAA
B3CAAAd4dwAAcABwAAAAAAcIiAd3d3d3B3cABwAAAAAAj4iHf///B3iHcAcAAAAAAAiIiPiIiP8IhwBw
AAAAAAAAiAiIh3d48HAAcAAAAAd3CIiIiAAHd493AHd3cABwAAjwiAB3dwd/BwAAAHAHAACPCIgIAAd3
ePdwAABwBwiIjwiA8I+AcHj3d3cAcAcI+I8HgPBw8HB494h3AHAHCIiPB4Dwd4BwiPd3dwBwBwAAjweI
/wAICIj3cAAAcAAAAAjweA//8AiPdwBwAAAAAAAI8HeIAAiIiHcAcAAAAAAAAI8HeIiIiAhwAHAAAAAA
AAiP8Ad3iAiIhwAHAAAAAACPiI/wAAD4eIdwBwAAAAAHCPgIj///iAeHAHAAAAAAB3CAAAiIiAAAcAcA
AAAAAAB3AHAAiIAHAABwAAAAAAAAB3cAAI+ABwAHAAAAAAAAAAAAAACIgAcAAAAAAAAAAAAAAAAAAAAH
AAAAAAAAAAAAAAAAB3d3dwAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////wP///8D///+A////gP//4Y
Dn/8AAQ/+AAAH/gAAA/4AAAP/AAAH/4AAB/gAAABwAAAAYAAAAGAAAABgAAAAYAAAAGAAAAB/AAAH/wA
AB/+AAAf/AAAD/gAAA/4AAAf+AAAP/wYDH/+OA7///gP///4D///+A///////w==
</value>
</data>
<data name="rtbHistory.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="rtbHistory.Size" type="System.Drawing.Size, System.Drawing">
<value>578, 673</value>
</data>
<data name="rtbHistory.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="&gt;&gt;picBoxLogo.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="rtbHistory.Text" xml:space="preserve">
<value />
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>584, 729</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>FrmHistory</value>
</data>
<data name="rtbHistory.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 53</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>400, 768</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="picBoxLogo.ErrorImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="picBoxLogo.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 38</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>584, 729</value>
</data>
<data name="picBoxLogo.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>Manual</value>
</data>
<data name="&gt;&gt;rtbHistory.Name" xml:space="preserve">
<value>rtbHistory</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;picBoxLogo.Name" xml:space="preserve">
<value>picBoxLogo</value>
</data>
<data name="picBoxLogo.Location" type="System.Drawing.Point, System.Drawing">
<value>470, 3</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="&gt;&gt;picBoxLogo.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="picBoxLogo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
/9j/4AAQSkZJRgABAQEAYABgAAD/4QC8RXhpZgAATU0AKgAAAAgABAESAAMAAAABAAEAAAE7AAIAAAAH
@ -182,21 +300,58 @@
wxRrtSJFACqo7AAAAUUUVhvqzsSSVkf/2Q==
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3d3cAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAA
AAAABwAAAAAAAAAAAAAAAAB3cAcAAAAAAAAAAAAHcHAAd3AHAABwAAAAAAAAdwAHAHhwAAAABwAAAAAA
B3CAAAd4dwAAcABwAAAAAAcIiAd3d3d3B3cABwAAAAAAj4iHf///B3iHcAcAAAAAAAiIiPiIiP8IhwBw
AAAAAAAAiAiIh3d48HAAcAAAAAd3CIiIiAAHd493AHd3cABwAAjwiAB3dwd/BwAAAHAHAACPCIgIAAd3
ePdwAABwBwiIjwiA8I+AcHj3d3cAcAcI+I8HgPBw8HB494h3AHAHCIiPB4Dwd4BwiPd3dwBwBwAAjweI
/wAICIj3cAAAcAAAAAjweA//8AiPdwBwAAAAAAAI8HeIAAiIiHcAcAAAAAAAAI8HeIiIiAhwAHAAAAAA
AAiP8Ad3iAiIhwAHAAAAAACPiI/wAAD4eIdwBwAAAAAHCPgIj///iAeHAHAAAAAAB3CAAAiIiAAAcAcA
AAAAAAB3AHAAiIAHAABwAAAAAAAAB3cAAI+ABwAHAAAAAAAAAAAAAACIgAcAAAAAAAAAAAAAAAAAAAAH
AAAAAAAAAAAAAAAAB3d3dwAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////wP///8D///+A////gP//4Y
Dn/8AAQ/+AAAH/gAAA/4AAAP/AAAH/4AAB/gAAABwAAAAYAAAAGAAAABgAAAAYAAAAGAAAAB/AAAH/wA
AB/+AAAf/AAAD/gAAA/4AAAf+AAAP/wYDH/+OA7///gP///4D///+A///////w==
</value>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="picBoxLogo.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>578, 44</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;rtbHistory.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="rtbHistory" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100,Absolute,20" /&gt;&lt;Rows Styles="Absolute,50,Percent,100,Absolute,111" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;rtbHistory.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;picBoxLogo.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="$this.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="picBoxLogo" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,50,Percent,50" /&gt;&lt;Rows Styles="Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -52,6 +52,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
// Genesis (legacy and program internal name for Cordonel)
private GenesisMeter _currentGenesis;
private readonly MeterBatch _meterBatch;
private Byte[] _hashedPwdFile;
// port settings
private MeterPortScanner _serialPortScanner;
@ -163,6 +164,9 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
// directory information
private List<String> _readMeterFiles;
// remind customer serial number for logging
private String _customerSerialNumber = "?";
/// <summary>
/// Timer for progress update
/// </summary>
@ -365,7 +369,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
case ProcessState.FirmwareUpdateSuccess:
ReleaseDisplay();
RestoreRegisters();
RestorePulseModeRegisters();
FwUpdateSuccessMessage();
_processState = ProcessState.Idle;
break;
@ -1533,6 +1537,43 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
#endregion --------------------------------------- User Interaction -------------------------------------------
#region ------------------------------------------ Tools ------------------------------------------------------
/// <summary>
/// Logging of password file read from meter.
/// </summary>
/// <remarks date="2023-Oct-11" author="Thomas Wiedebusch">
/// - Initial.
/// </remarks>
private Boolean ReadAndLogHashedPasswordFileFromMeter()
{
if (_currentGenesis == null)
return false;
_currentGenesis.ReLogin();
Boolean retVal;
try
{
// log the password file content
var meterFile = new MeterFile(_currentGenesis);
retVal = meterFile.ReadMeterFile(MeterPwdFile.StrPasswordFileName, out var hashedMeterPwdFile);
if (retVal)
{
LogText(Resources.StrMessageHashedPwdFile);
for (var idx = 0; idx < hashedMeterPwdFile.Count; idx += MeterPwdDb.HashedPwdLength )
{
var hashedPwd = BitConverter.ToString(hashedMeterPwdFile.GetRange(idx,
MeterPwdDb.HashedPwdLength).ToArray());
LogText(hashedPwd);
}
}
}
catch (Exception)
{
LogErrorText(Resources.StrPasswordFileReadoutFailed);
retVal = false;
}
_currentGenesis.Logout();
return retVal;
}
/// <summary>
/// Set data and time.
/// </summary>
@ -1605,7 +1646,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
_currentGenesis.Logout();
// give the radio app the time to store and restart in customer mode
Thread.Sleep(500);
Thread.Sleep(1000);
// login for read back of new mode which shouldn't be 0x01
_currentGenesis.ReLogin();
@ -1690,12 +1731,12 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
return retVal;
}
/// <summary>
/// Restore all listed registers.
/// Restore all listed pulse mode registers.
/// </summary>
/// <remarks date="2023-Mar-07" author="Roland Drabesch/Thomas Wiedebusch">
/// - Initial.
/// </remarks>
private Boolean RestoreRegisters()
private Boolean RestorePulseModeRegisters()
{
var retVal = true;
try
@ -1754,7 +1795,8 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
/// - Initial.
/// </remarks>
/// <remarks date="2022-Jul-22" author="Thomas Wiedebusch">
/// - Store configuration genesisflow after display release.
/// - Store configuration genesisflow after display release. This is essential if a reboot will occure
/// to have the correct display of the accumulated volume and flow rate!
/// </remarks>
private void ReleaseDisplay()
{
@ -1810,6 +1852,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
return;
LogText(StrSeparator);
LogText($"PCB ID: {_currentGenesis.PcbId}");
LogText($"{Resources.StrMessageCustomerSerialNumber} {_customerSerialNumber}");
LogText($"FW Version: {_currentGenesis.FwVersion}");
LogText($"{Resources.StrMessageSystemCoreRevision} {GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision)}");
LogText($"{Resources.StrMessageSystemRegion} {_currentGenesis.Region}");
@ -2799,9 +2842,11 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
/// and for login with skeleton key:
/// - Initial login without register readout being able to quick switch off the pulse mode,
/// - Switch off the pulse mode on initial connection,
/// - Activate the radio,
/// - Activate the radio in customer mode,
/// - Release the display to normal operation,
/// - Store all configurations on initial connection.
/// - Setup date and time,
/// - Store all configurations on initial connection,
/// - Logs the password file content if not initial connected.
/// </summary>
/// <param name="password">lvl8 or skeleton</param>
/// <param name="initialLogin">initial connection</param>
@ -2818,26 +2863,22 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
// the pulse mode OFF before reading all installed apps, which will be unpredictable on activated
// pulse module
var retVal = _currentGenesis.Login(password, skipReadMeterFwAndAssignRegisters: initialLogin);
if (!retVal)
return false;
if (!retVal) return false;
// switch the pulse module inactive
if (initialLogin)
DeactivatePulseModule();
if (initialLogin) DeactivatePulseModule();
// login with reading out all installed applications
retVal = _currentGenesis.Login(password);
if (_currentGenesis.RadioFrequencyMhz != null)
ActivateRadio();
if (_currentGenesis.RadioFrequencyMhz != null) ActivateRadio();
// display to normal operation
ReleaseDisplay();
SetDateTime();
// safe all settings from RAM to FLASH to keep those for reboot
if (initialLogin)
{
// safe all settings from RAM to FLASH to keep those for reboot
StoreConfigurations();
}
@ -2845,6 +2886,21 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
}
/// <summary>
/// Execution of connect to water-meter.
/// Sequence:
/// - Check if pcbId of meter is set, if not this is an initial login. On initial login it has to require
/// the pcbId (read it from the meter) and mark this initial access as this will execute some special
/// steps <see cref="LoginAndSpecialSetupProcedure"/>,
/// - Create the report files for the detected pcbId,
/// - Searches for update information extracted from the FW update safe and extract password level 8 and
/// the skeleton key,
/// - Delays 3s as a previous login may have failed to avoid blocking of login procedure,
/// - Tries to login with password ( this is the level 8 pwd), exit here if successfully logged in,
///
/// - If login with password level 8 failed:
/// - If this is not the initial login, the password file may be corrupted or not installed - sets reminder
/// for this,
/// - Delays 5s,
/// - Tries to login with skeletonKey and exit if successfully logged in, else mark procedure as failed.
/// </summary>
/// <returns>true if successfully executed</returns>
/// <remarks date="2020-Dec-09" author="Thomas Wiedebusch">
@ -2887,10 +2943,18 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
/// <remarks date="2023-Aug-22" author="Thomas Wiedebusch">
/// - Create report file early to catch radio and pulse mode activity.
/// </remarks>
/// <remarks date="2023-Oct-11" author="Thomas Wiedebusch">
/// - AVOID marking of _passwordFile is corrupted on initial login as the pulse output may be active
/// and needs to be switched OFF first in the <see cref="LoginAndSpecialSetupProcedure"/>,
/// - Verifies password file of meter by reading it out and comparing it with the password file
/// from the FW update safe, remind the hashedPwdFile being able to restore it if not installed,
/// - Additional logging of password login or skeleton login,
/// - Report customer serial number.
/// </remarks>
private Boolean ExecConnect()
{
var initialLogin = false;
// read out the PCB ID from water-meter to open the password container of this device
// Read out the PCB ID from water-meter needed to open the password container of this device
if (string.IsNullOrEmpty(_currentGenesis.PcbId))
{
// if the PcbId is unknown, it is an initial login
@ -2898,10 +2962,10 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
_currentGenesis.GetPcbId();
}
// create report file
// Create report file
BuildReportFiles();
// search the PCB ID and extract password for login
// Search the PCB ID and extract password for login
String password = null;
String skeletonKey = null;
_genesisInUpdateList = false;
@ -2911,6 +2975,12 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
{
skeletonKey = device.PwdContainer.SkeletonKey;
password = device.PwdContainer.PasswordLvl8;
if (!string.IsNullOrEmpty(device.CustomerSerialNumber))
_customerSerialNumber = device.CustomerSerialNumber;
_hashedPwdFile = new Byte[MeterPwdDb.PwdFileLength];
_hashedPwdFile = device.PwdContainer.EncryptedPasswordFile;
_genesisInUpdateList = true;
break;
}
@ -2922,35 +2992,47 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
return false;
}
// delay needed if repeated login trial given by Cordonel, the next communication has to
// Delay needed if repeated login trial given by Cordonel, the next communication has to
// wait that long, otherwise the Cordonel locks for 2s, 4s, 8s, 16s and so on on every retry!
Thread.Sleep(3000);
// this login may be time consuming on readout of application information
// This login may be time consuming on readout of application information
// first try to login with password Level 8, this is needed if the password file is installed
if (LoginAndSpecialSetupProcedure(password, initialLogin))
{
LogText(Resources.StrLoginPwdLevel8);
ReadAndLogHashedPasswordFileFromMeter();
SetDateTime();
_passwordFileIsCorrupted = false;
return true;
}
// here the password file is corrupted or not installed, try to login with skeletonKey
_passwordFileIsCorrupted = true;
// ATTENTION:
// AVOID marking of _passwordFile is corrupted on initial login as the pulse output may be active
// and needs to be switched OFF first using the LoginAndSpecialSetupProcedure
if (!initialLogin)
{
// Here the password file may be corrupted or not installed, read it out and compare it with
// the content specified in the FW update safe
var pwdFile = new MeterPwdFile(_currentGenesis);
_passwordFileIsCorrupted = _hashedPwdFile == null || !pwdFile.VerifyMeterPwdFile(_hashedPwdFile);
}
// On final login EXPLICIT login with password level 8 to validate password file
// On final login EXPLICIT login with password level 8 to validate password file, log password file
if (_finalLoginAfterUpdate)
{
_processState = ProcessState.Error;
return false;
}
// delay needed if repeated login trial given by Cordonel, the next communication has to
// Delay needed if repeated login trial given by Cordonel, the next communication has to
// wait that long, otherwise the Cordonel locks for 2s, 4s, 8s, 16s and so on on every retry!
Thread.Sleep(5000);
// use the skeleton key for login as the password file may not be installed or invalid
// Use the skeleton key for login as the password file may not be installed or invalid
if (LoginAndSpecialSetupProcedure(skeletonKey, initialLogin))
{
LogText(Resources.StrLoginSkeletonKey);
return true;
}
@ -3526,6 +3608,9 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
/// <remarks date="2022-Mai-10" author="Thomas Wiedebusch">
/// - Release display removed.
/// </remarks>
/// <remarks date="2023-Oct-11" author="Thomas Wiedebusch">
/// - Hashed password file read on connect from FW update safe.
/// </remarks>
private void PwdFileRestore(ProcessState successExitState, ProcessState errorExitState = ProcessState.Error)
{
// remind the invoker being able to generate error messages based on the last state
@ -3542,49 +3627,41 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
return;
}
//TODO THW avoid installation of password file if hash of level 3 equals level 8
//TODO THW avoid installation if password file level 3 is unequal hashed skeletonKey
//TODO THW avoid installation if password file level 8 is unequal hashed password
InfoProcessActive(lblPasswordFileCheck, Resources.StrPasswordFileRestoreActive);
// try to install password, first get the password file from device info
var pwdFileObject = new MeterPwdFile(_currentGenesis);
var hashedPwdFile = new Byte[MeterPwdDb.PwdFileLength];
if (_cordonelDeviceInfos != null)
if (_hashedPwdFile != null && _hashedPwdFile.Length == MeterPwdDb.PwdFileLength)
{
foreach (var device in _cordonelDeviceInfos.Where(device => _currentGenesis.PcbId == device.PcbId))
SetControlsCommunicationActive();
_currentGenesis?.ReLogin();
if (pwdFileObject.UnlockEraseWriteMeterPwdFile())
{
hashedPwdFile = device.PwdContainer.EncryptedPasswordFile;
break;
}
if (hashedPwdFile != null && hashedPwdFile.Length == MeterPwdDb.PwdFileLength)
{
SetControlsCommunicationActive();
_currentGenesis?.ReLogin();
if (pwdFileObject.UnlockEraseWriteMeterPwdFile())
if (pwdFileObject.WriteAndVerifyMeterPwdFile(_hashedPwdFile))
{
if (pwdFileObject.WriteMeterPwdFile(hashedPwdFile))
{
// a reconnect will check for proper installed password file and check the Level 8 pwd.
_processState = ProcessState.Connect;
_passwordFileIsCorrupted = false;
InfoProcessSuccess(lblPasswordFileCheck, Resources.StrPasswordFileRestoreSucceeded);
}
// a reconnect will check for proper installed password file and check the Level 8 pwd.
_processState = ProcessState.Connect;
_passwordFileIsCorrupted = false;
InfoProcessSuccess(lblPasswordFileCheck, Resources.StrPasswordFileRestoreSucceeded);
}
else
{
InfoProcessFailed(lblPasswordFileCheck, Resources.StrPasswordFileRestoreFailed);
_processState = errorExitState;
}
_currentGenesis?.Logout();
}
// the password file is NOT in the password container
else
{
InfoProcessFailed(lblPasswordFileCheck, Resources.StrPasswordNotDelivered);
_processState = errorExitState;
}
// change first the process state, otherwise the timer may switch the bar on again
SetOverallProgressDisplayOff();
return;
_currentGenesis?.Logout();
}
// the password file is NOT in the password container
else
{
InfoProcessFailed(lblPasswordFileCheck, Resources.StrPasswordNotDelivered);
_processState = errorExitState;
}
InfoProcessFailed(lblPasswordFileCheck, Resources.StrPasswordFileRestoreFailed);
_processState = errorExitState;
// change first the process state, otherwise the timer may switch the bar on again
SetOverallProgressDisplayOff();
}
@ -3891,7 +3968,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
var customerOrderSplit =
_basePath.CustomerAndOrderNumber.Split(FwUpdateConfig.FwUpdateFileFieldSeparator);
LogText(StrSeparator);
InfoProcessSuccess(null, $"{Resources.StrTestReportDate} {DateTime.Now.ToShortDateString()}");
InfoProcessSuccess(null, $"{Resources.StrTestReportDate} {DateTime.UtcNow:dddd, dd-MMM-yyyy HH:mm:ss} UTC");
InfoProcessSuccess(null, $"{Resources.StrTestReportSwNameVersion} " +
$"{_version.Major}.{_version.Minor}.{_version.Build}");
InfoProcessSuccess(null, $"{Resources.StrTestReportCustomerName} {customerOrderSplit[0]}");

View File

@ -556,6 +556,24 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Successfully logged in with password level 8..
/// </summary>
internal static string StrLoginPwdLevel8 {
get {
return ResourceManager.GetString("StrLoginPwdLevel8", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Successfully logged in with skeletonKey..
/// </summary>
internal static string StrLoginSkeletonKey {
get {
return ResourceManager.GetString("StrLoginSkeletonKey", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not installed.
/// </summary>
@ -565,6 +583,24 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Customer serial number:.
/// </summary>
internal static string StrMessageCustomerSerialNumber {
get {
return ResourceManager.GetString("StrMessageCustomerSerialNumber", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hashed password file:.
/// </summary>
internal static string StrMessageHashedPwdFile {
get {
return ResourceManager.GetString("StrMessageHashedPwdFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Installed applications:.
/// </summary>

View File

@ -550,4 +550,16 @@
<data name="StrDateTimeSetupSucceeded" xml:space="preserve">
<value>Datum und Zeit erfolgreich eingestellt</value>
</data>
<data name="StrLoginPwdLevel8" xml:space="preserve">
<value>Erfolgreich angemeldet mit Paßwort Level 8.</value>
</data>
<data name="StrLoginSkeletonKey" xml:space="preserve">
<value>Erfolgreich angemeldet mit SkeltonKey.</value>
</data>
<data name="StrMessageCustomerSerialNumber" xml:space="preserve">
<value>Kundenseriennummer:</value>
</data>
<data name="StrMessageHashedPwdFile" xml:space="preserve">
<value>Hashed Paßwortdatei:</value>
</data>
</root>

View File

@ -550,4 +550,16 @@
<data name="StrDateTimeSetupSucceeded" xml:space="preserve">
<value>Date time successfully set</value>
</data>
<data name="StrLoginPwdLevel8" xml:space="preserve">
<value>Successfully logged in with password level 8.</value>
</data>
<data name="StrLoginSkeletonKey" xml:space="preserve">
<value>Successfully logged in with skeletonKey.</value>
</data>
<data name="StrMessageCustomerSerialNumber" xml:space="preserve">
<value>Customer serial number:</value>
</data>
<data name="StrMessageHashedPwdFile" xml:space="preserve">
<value>Hashed password file:</value>
</data>
</root>