Traduzioni di questa pagina:

Esporta pagina in formato Open Document

MarelWiFiTestSolution

The solution is developed to test the dishwasher WiFi module. It is composed by the following software:

  • MarelWiFiTestService : service running on server machine;
  • MarelWiFiTestManager : desktop application to manage test sequences and to view the status of the service, running and also archived tests;
  • MarelWiFiTestRepair : desktop application to start a WiFi test of the product in the repair station.
  • DW_EndLineTest : DWEndLine_Test is the existing end of line test software that is updated with some new features for the WiFi test.

The solution work with WiFiTest SQL Server database also in express edition.

MarelWiFiTestService

This software do the following tasks:

  • BARCODE MANAGER: Save into WiFiTest database Model, Serial, MAC and SAID extracted from two distinct barcodes scanned at the beginning of the line with a fixed barcode reader;
  • AP MANAGER : Manage data read from Phoenix Contact Wlan 5100 Access Point to retrieve RSSI signal of wireless clients;
  • MQTT MANAGER : Manage MQTT handshake between MQTT Gateway and wireless clients;
  • CLIENTS MANAGER : Accept TCP connection from clients (repair station, test line station) to exchange data;
  • TEST MANAGER : Perform the WiFi test according with selected existing test sequence.

Features of BARCODE MANAGER and MQTT MANAGER are not currently used.

Configuration

The software configuration is stored into MarelWiFiTestService.exe.config file:

Main configuration items are:

<add key="Language" value="IT"/>
<!--0=only errors, 1=all-->
<add key="LogMode" value="1"/>
<add key="LogEvents" value="1000"/>
<add key="DBConnectionString" value="Data Source=(local)\SQLEXPRESS;Initial Catalog=WiFiTest;User ID=sa;Password=dwmarel;"/>
<!--local answering ip address and connection port for remote scanner and stations-->
<add key="LocalIPAddress" value="172.18.1.68"/>
<add key="ScannerTCPPort" value="1000"/>
<add key="StationsTCPPort" value="2000"/>

Language : IT, EN, PL according with the existing .po files. It's possible to create additional language translation file maintaining the file structure, simply translating the msgstr items;

Log Mode : messages are stored into the MarelWiFiTestService.log file. Value can be setup to 0=only errors or 1=all;

LogEvents : maximum log entries stored into the file;

DBConnectionString : database connection string;

LocalIPAddress : local answering ip address for remote scanner and stations;

ScannerTCPPort : local answering port number for scanners;

StationsTCPPort : local answering port number for test and repair stations;

Others items for BARCODE MANAGER:

<add key="Barcode_Length" value="76"/>
<add key="Barcode_ModelStart" value="1"/>
<add key="Barcode_ModelLength" value="12"/>
<add key="Barcode_SerialStart" value="13"/>
<add key="Barcode_SerialLength" value="12"/>
<add key="Barcode_MACStart" value="39"/>
<add key="Barcode_MACLength" value="17"/>
<add key="Barcode_SAIDStart" value="62"/>
<add key="Barcode_SAIDLength" value="13"/>
<!--specified as hexadecimal values CRLF = 0D0A-->
<add key="Barcode_TerminatorChars" value="0D0A"/>

Others items for MQTT MANAGER:

<!--MQTT test-->
<add key="TopicToApp" value="iot-2/cmd/@@api@@/fmt/rvl/"/>  <!-- Topic for command to appliance -->
<add key="TopicFromApp" value="iot-2/evt/@@api@@/fmt/rvl/"/>  <!-- Topic for response from appliance -->
<add key="TopicProdInfoFromApp" value="iot-2/evt/prodInfo/fmt/json"/>  <!-- Topic for receiving product information message from appliance (after connecting to the MQTT broker) -->
<add key="AcceptedResponseOpCode" value="19|141|159"/>  <!-- Accepted operation code received in response: codes must be separated by a '|' (vertical bar) -->
<add key="MQTTBrokerHost" value="192.168.1.200"/>

Others items for AP MANAGER:

<!--access point parameters-->
<add key="AccessPointRoot" value="http://192.168.1.2/"/> <!--separe by comma ','-->
<add key="AccessPointRefreshPage" value="php/dyn_conn.php"/>
<add key="AccessPointDiagnosticInfoPage" value="php/getClientRssi.php"/>
<add key="AccessPointShared" value="1"/> <!--0=one for each line, 1=shared between lines-->

AccessPointRoot : http address of the access point. It's possible to specify more access points with ',' comma.

AccessPointShared : if more than one access point are present, this flag define if use them as one for each line or in shared between them.

Start/Stop service

At startup the service will log some events into the Windows Registry and also will save same information's into the private log file MarelWiFiTestServce.log. The status and the log can be viewed with the MarelWiFiTestManager application.

This service is necessary to perform wifi test and must be running. Closing and restarting the service, running test will be restarted.

MarelWiFiTestManager

MarelWiFiTestManager application allows operators to view the status of the service, open archived tests and manage test sequences.

Configuration

Application MarelWiFiTestManager.exe.config file, contains the following items:

  <add key="Language" value="it" />
  <!--database connection string-->
  <add key="DBConnectionString" value="Data Source=(local)\SQLEXPRESS;Initial Catalog=WiFiTest;User ID=sa;Password=dwmarel;" />
  <add key="ServerIPAddress" value="172.18.1.68" />
  <add key="StationsTCPPort" value="2000" />
  <add key="RequestTimeout" value="3000" />
  <!--refresh time interval (seconds)-->
  <add key="RefreshTime" value="10" />

Language : IT, EN, PL according with the existing .po files. It's possible to create additional language translation file maintaining the file structure, simply translating the msgstr items;

DBConnectionString : database connection string;

ServerIPAddress : ip address of the remote or local WiFiTestManagerService service;

StationsTCPPort : remote or local answering WiFiTestManagerService service port;

RequestTimeout : TCPIP message answer timeout;

RefreshTime : time interval to automatically refresh list of active test and service infos.

Application

Once the application starts, it will try to connect to the service and will show the list of currently initialized (waiting to start) or running tests:

Other pages : Service Info and Archived Test are accessible from icons in the toolbar.

Toolbar

The toolbar contains buttons for quick access to all program features:

Icon Icon Toolbar
Close application
View list of initialized/running tests
View service and devices info
View test archive
Enable / Disable password-protected functions
Edit test sequences (password protected)
Start/Stop refresh timer
Force refresh
View service application log file

Tests Infos

Use the icon to switch to this page. From this page is possible to see tests in the following states:

  1. waiting : barcodes was read at the beginning of the line from fixed barcode scanners;
  2. ready to start : just few instants if service run correctly;
  3. running : test in progress until all sequence comands are executed or a timeout occur.

Data is updated with running timer or when forced by operator with button .

Delete a test

A test can be deleted following this steps:

  1. Pause the refresh timer;
  2. Select the test to remove;
  3. When current test is is showed, press icon to definitively remove it.

Service Info

Use the icon to switch to this page. Some information's about connected clients and devices are reported as follow:

As for Tests Info page, data is updated with running timer or when forced by operator with button .

Tests archive

Use the icon to switch to this page.

To search for a test result of a particular product follows this steps:

  1. Insert entire model, serial or part of them;
  2. Press the button;
  3. Double click on viewed test list item to open to see details:

Use the icon to remove filters and to close all opened details panels.

Test state and result

The test can finish due to a sequence timeout or when all commands are executed according with parameters of them. In some circumstance test can go in a undefined state.

Status are summarized in the following table:

STATUS VALUE DESCRIPTION
TEST LOADED 0 MODEL, SERIAL, MAC and SAID are acquired
TEST READY TO START 1 A valid sequence code is sent by the client to start a test
TEST IN PROGRESS 10 Test is started and service software is managing the sequence commands
TEST COMPLETED 99 All commands are executed within sequence timeout time
TEST COMPLETED WITH TIMEOUT 199 Not all commands are executed within sequence timeout
TEST COMPLETED WITH UNDEFINED STATE 255 Test was closed with some errors

For the commands that return values to check, results can be :

ERROR DESCRIPTION
0 (not specified ) value is OK
1 value is NOT OK
2 command execution TIMEOUT
9 IRRELEVANT value. Not ok but not valid for test result

Test result will be positive if match the following list:

  • at least one command that return a value has OK result;
  • there aren't NOT OK commands.

Irrelevant values are not considered for the test result 

Test sequence editor

Use the to unlock admin features ed insert the 1234 password when requested:

Press the icon to open the sequence editor window:

Create new sequence

To create a new sequence:

  1. Select the icon on the left panel;
  2. Insert required fiels in the showed windows:

  1. Press OK to confirm.

Fields description:

  • Code: test sequence code, used by remote clients to start the test. The code must be unique.
  • Description: a sequence description non used for functional purpose;
  • Timeout : test timeout in seconds to complete the sequence;
  • Antenna : antenna type for MQTT purpose;
  • Led : led number for MQTT purpose.

Modify a sequence

A test sequence fields can be modified with button .

Code can't be modified. If you need to modify the code, you have to create a copy of existing sequence.

Copy a sequence

Press the button to create a copy of the selected sequence. When requested insert the code for the new one.

Delete a sequence

To delete a test sequence, select it from the list and press the button .

Verify that the sequence is currently no more used. 

Please consider to leave no more used sequence to have a details of archived tests saved. 

Sequence commands

Once created a new sequence is possible to add/modify copy or delete command from right panel. The next table summarize the available icon functions:

Icon Icon Toolbar
Add new command
Modify selected command
Copy selected command
Delete selected command
Move up selected command
Move down selected command

Once selected the function to add/modify or copy a command the software will show this panel:

Fields description:
  • Number : item number in the sequence;
  • Mode : command execution mode:
Mode Description
Simple Command is executed but no data will be retrieved
GetValue Command is executed within timeout and a return data will be acquired
Recurring Command is executed each timeout milliseconds and all returned data will be acquired until sequence timeout expire or max iteration is reached
RecurringGood Command is executed each Timeout milliseconds and all returned data will be acquired until the return data is not in the range or max iteration is reached
  • Type : available command types:
Type Protocol Description
NA Empty command (do nothing)
ExtendFactoryTestMode MQTT Extend factory test mode
SetModelNumber MQTT Write model number into wifi device. Require @@model@@ field
GetModelNumber MQTT Read model number from wifi device.
SetSerialNumber MQTT Write model number into wifi device. Require @@sn@@ field
GetSerialNumber MQTT Read serial number from wifi device.
GetRSSIValue MQTT Read RSSI signal strength from wifi device (antenna type is specified in the sequence)
RegisterForPowerReadings MQTT Register wifi device for power reading function
GetPowerReadings MQTT perform a power reading function
BlinkLed MQTT ON/OFF device led (specified in the sequence) with 500 ms interval
DisableAutoFactoryTest MQTT Exit factory test mode
GetRSSIValueFromAP Read device RSSI signal strength from Access Point
  • Timeout : it can specify a command timeout or a time between command re transmission;
  • Max iterations : maximum number of command execution;
  • Compare type : results comparison type:
Type Description
PlainText Compare return string with First value field
Number Compare return value with First Value field
Range Compare return value within range specified between First Value and Second value fields
  • First value : used in conjunction of Compare type field;
  • Second value : used in conjunction of Compare type field.

MarelWiFiTestRepair

MarelWiFiTestRepair application allow operators of repair station, to manually start a wifi test.

Configuration

Application MarelWiFiTestManager.exe.config file, contains the following items:

  <add key="Language" value="it" />
  <!--0=only errors, 1=all-->
  <add key="LogMode" value="1" />
  <add key="LogEvents" value="1000" />
  <!--0=no touch, 1=touch-->
  <add key="TouchScreen" value="1" />
  <!--database connection string-->
  <add key="DBConnectionString" value="Data Source=172.18.1.68\SQLEXPRESS;Initial Catalog=WiFiTest;User ID=sa;Password=dwmarel;" />
  <!-- manual scanner serial communication port -->
  <add key="ScannerCommPort" value="29" />
  <add key="Line" value="1" />
  <add key="Station" value="0" />
  <add key="TestSequenceCode" value="001" />
  <add key="ServerIPAddress" value="172.18.1.68" />
  <add key="StationsTCPPort" value="2000" />
  <add key="RequestTimeout" value="3000" />

Language : IT, EN, PL according with the existing .po files. It's possible to create additional language translation file maintaining the file structure, simply translating the msgstr items;

Log Mode : messages are stored into the MarelWiWiTestService.log file. Value can be setup to 0=only errors or 1=all;

LogEvents : maximum log entries stored into the file;

TouchScreen : 0=messages viewed as desktop mode, 1=messages viewed with big keys for touch screen;

DBConnectionString : database connection string;

ScannerCommPort : serial communication port with the manual scanner;

Line : line id number;

Station : station id number;

TestSequenceCode : default WiFi test sequence code;

ServerIPAddress : ip address of the remote WiFiTestManagerService service;

StationsTCPPort : remote answering WiFiTestManagerService service port;

RequestTimeout : TCPIP message answer timeout;

Others items for BARCODE MANAGER:

  <!--barcode configuration-->
  <add key="Barcode_ProductLength" value="36" />
  <add key="Barcode_ModelStart" value="2" />
  <add key="Barcode_ModelLength" value="12" />
  <add key="Barcode_SerialStart" value="14" />
  <add key="Barcode_SerialLength" value="12" />
  <add key="Barcode_WifiLength" value="42" />
  <add key="Barcode_MACStart" value="6" />
  <add key="Barcode_MACLength" value="17" />
  <add key="Barcode_SAIDStart" value="29" />
  <add key="Barcode_SAIDLength" value="13" />
  

Configuring barcodes label length, remember to add extra chars added from scanner at the end of the received string

With default configuration, Datalogic PowerScan add CR at the end of the barcode data.

Application

Once the application starts, it will try to open the scanner communication port and will try to connect to the connect to the service.

During normal work, the application can be reduced to icon; when a new barcode is read, it will be automatically restored.

Toolbar

The toolbar contains buttons for quick access to all program functions:

Icon Icon Toolbar
Close application
Reduce the application as icon in the task bar
Enable / Disable password-protected functions
Open tools function for test purpose (password protected)
View application information's
View application log file

Start a new test

To perform a new test the operator has to perform the following steps:

  • with barcode scanner, read the product model + serial barcode;
  • read also the MAC + SAID barcode;
  • press the Start Button:

Once read the product barcode, the software automatically load all executed tests for the product. Once read also the WiFi label, a blue check will showed if MAC and SAID are not changed from values reads with fixed barcode at the beginning of the line, otherwise a green icon will be displayed.

After the test is started a test control details will be visible on the right indicating the test timeout progress. When the test is finished a message with result will appear.

Before to start the test, is possible to modify the test sequence code:

  1. click on the code;
  2. modify the text value;
  3. click on the right button to confirm.

Test sequence code must be valid and must mach one of the sequences available in server application.

DW_EndLineTest

The software is updated with the following new commands:

  • Sistema_WiFi_Start;

and also the following verifies:

  • Sistema_WiFi_Info.
  • Prodotto_Verifica_SuperDll_Ex;

Sistema_WiFi_Start

This command start the wifi test sending all required data to the service:

  • MAC address : MAC address of the wifi module read from board. Must be read and assigned to a variable before this call;
  • SAID : SAID label read from board, Must be read and assigned to a variable before this call;
  • Test sequence code : code of the test sequence to start. This must be a valid code of one between existing.

Sistema_WiFi_Info

This verify reads the status of the running test:

  • Completato : check this flag to test if the test is finished.
  • Log : check this flag to log results.

To read the test info more times, insert the verify into a command with a maximum timeout longer then the sequence timeout.

Prodotto_Verifica_SuperDll_Ex

This verify is like Prodotto_Verifica_SuperDll but with two extra parameters:

  • Lunghezza array : this allow to specify the parameter with the number of returned bytes;
  • Tipo stringa : check this flag to manage return data as string “123” and not as byte encoded string (2 bytes each digit) “313233”.

To read location of the MAC ADDRESS (position ) or SAID (position 10) is possible to call PLT_GenericMemRead specifying different parameters:

Also to read the MAC ADDRESS (or SAID) and to assign it to a variable is possible to call PLT_GenericMemRead specifying different parameters:

the difference is that specifying a variable starting '@' the value remain also declared in the dll memory for all the test.

Test results

Results of the wifi test will be reported in the log file at the end of the test. The data is formatted as string using this format:

POSITIVE RESULT

LETTURE Sistema_WiFiInfo True: OK#99#|-1|RSSI (AP)=0|-1|RSSI (AP)=0|9|RSSI (AP)=-44|9|RSSI (AP)=-40|0|RSSI (AP)=-31

Sistema_WiFiInfo True: : Result of Sistema_WiFiInfo is positive and it means the service responds;

OK#99# : Test result is positive and is not closed with timeout (99);

-1|RSSI (AP)=0 : RSSI value from AP not available (-1);

9|RSSI (AP)=-44 : RSSI value from AP is not in the range (9) but is not an error for the test result;

0|RSSI (AP)=-31 : RSSI value from AP is in the range (0).

NEGATIVE RESULT

ERRORI (Sistema_WiFiInfo True, NON OK#199#|-1|RSSI (AP)=0|-1|RSSI (AP)=0|-1|RSSI (AP)=0|-1|RSSI (AP)=0|-1|RSSI (AP)=0|-1|RSSI (AP)=0|-1|RSSI (AP)=0|-1|RSSI (AP)=0)

Sistema_WiFiInfo True: : Result of Sistema_WiFiInfo is positive and it means the service responds;

NON OK#199# : Test result is negative and it is closed with timeout (199);

-1|RSSI (AP)=0 : RSSI value from AP not available (-1).

In this case there aren't valid RSSI reads to assign a positive result.

 
en/marelwifitestsolution.txt · Ultima modifica: 2018/01/23 11:43 da paolopiccioli
 

wiki.marelsoftware.com © 2008-2011 Marel srl