Skip to content

Commit 9b92150

Browse files
WallaceSitWallaceSit
WallaceSit
authored and
WallaceSit
committed
v2.14.38-54
v2.14.38-54: • Library: add protection code for possible software crash related to filter settings v2.14.38-53: • App, Library: Solve “Ucode8, switch to utrace to do utrace, switch directly to scan without going to configure tab, cannot scan” problem • App: revise debug messages • Library, Library108: revise debug messages, relocate some codes, rename some variables, remove some unused codes v2.14.37-51: • App: Solve “Protect read, then read/write config in protected mode, Scan protected again, some unprotected tags are shown” problem. • App/Library: relocate some codes, revise debug messages • App: removed some unused codes v2.14.36-50: • App: Solve “do 3 times, software crash” problem in AuraSense tag, Coldchain temperature reading, Fm13Dt160 tag temperature reading, Impinj tag, kiloway tag, S2_S3_Xerves tag read, Lock/Kill operation, Xerves_UcodeDNA authenticate • App, Library: Solve “Ucode8 EPC+Tid, EPC+brand not work” problem • App: Solve “After normal inventory, then read sgtin tag, inventory page does not clear and hardly see sgtin tag” problem • App: Solve “775, cannot read protected tag configuration word” problem • App, Library, Library108: revise debug messages, relocate some codes • Library: remove some unused codes, rename some variables • Library: reduce mac code writing for 0x900 v2.14.35-48: • App: Correct “barcode scan has special character heading” problem • App: Correct “in impinj protect configuration read, after several time, software breaks” problem • Library: revise debug messages v2.14.34-47: • Library: Correct “target is changed when filter is set” problem. • Library: revise debug messages
1 parent 3c5778f commit 9b92150

38 files changed

+522
-445
lines changed

app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212
minSdk 23
1313
targetSdk 35
1414
versionCode 42
15-
versionName "2.14.34"
15+
versionName "2.14.38"
1616
}
1717
}
1818

app/src/main/java/com/csl/cs108ademoapp/AccessTask.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public AccessTask(Button button, boolean invalidRequest, boolean selectOne,
7373
}
7474
preExecute();
7575
}
76-
public AccessTask(Button button, TextView textViewWriteCount, boolean invalidRequest,
76+
public AccessTask(Button button, TextView textViewWriteCount, boolean invalidRequest, boolean selectOne,
7777
String selectMask, int selectBank, int selectOffset,
7878
String strPassword, int powerLevel, RfidReaderChipData.HostCommands hostCommand,
7979
int qValue, int repeat, boolean resetCount, boolean bSkipClearFilter,
@@ -87,6 +87,7 @@ public AccessTask(Button button, TextView textViewWriteCount, boolean invalidReq
8787
this.registerTotal = registerTotalView;
8888

8989
this.invalidRequest = invalidRequest; MainActivity.csLibrary4A.appendToLog("invalidRequest = " + invalidRequest);
90+
this.selectOne = selectOne;
9091
this.selectMask = selectMask;
9192
this.selectBank = selectBank;
9293
this.selectOffset = selectOffset;
@@ -97,6 +98,7 @@ public AccessTask(Button button, TextView textViewWriteCount, boolean invalidReq
9798
if (repeat > 255) repeat = 255;
9899
this.repeat = repeat;
99100
this.bSkipClearFilter = bSkipClearFilter;
101+
if (bSkipClearFilter) this.selectOne = false;
100102
if (resetCount) {
101103
total = 0;
102104
tagList.clear();
@@ -152,7 +154,6 @@ else if (hostCommand == RfidReaderChipData.HostCommands.CMD_18K6CKILL) {
152154
invalidRequest = true; MainActivity.csLibrary4A.appendToLog("setAccessRetry is failed");
153155
}
154156
}
155-
MainActivity.csLibrary4A.appendToLog("setSelectCriteria: invalidRequest = " + invalidRequest + ", repeat = " + repeat + ", bSkipClearFilter = " + bSkipClearFilter + ", powerLevel = " + powerLevel + ", skipSelect = " + skipSelect);
156157
if (invalidRequest == false) {
157158
if (DEBUG) MainActivity.csLibrary4A.appendToLog("AccessTask(): powerLevel = " + powerLevel);
158159
int matchRep = 1;
@@ -163,7 +164,7 @@ else if (hostCommand == RfidReaderChipData.HostCommands.CMD_18K6CKILL) {
163164
}
164165
if (powerLevel < 0 || powerLevel > 330) invalidRequest = true;
165166
else if (skipSelect == false) {
166-
MainActivity.csLibrary4A.appendToLog("BtDataOut: AccessTask.preExecute goes to setSelectTag");
167+
MainActivity.csLibrary4A.appendToLog("AccessTask.preExecute goes to setSelectTag");
167168
if (MainActivity.csLibrary4A.setSelectedTag(selectOne, selectMask, selectBank, selectOffset, powerLevel, qValue, matchRep) == false) {
168169
invalidRequest = true; MainActivity.csLibrary4A.appendToLog("setSelectedTag is failed with selectMask = " + selectMask + ", selectBank = " + selectBank + ", selectOffset = " + selectOffset + ", powerLevel = " + powerLevel);
169170
}
@@ -179,6 +180,7 @@ else if (skipSelect == false) {
179180
if (MainActivity.csLibrary4A.checkHostProcessorVersion(MainActivity.csLibrary4A.getMacVer(), 2, 6, 8)) {
180181
MainActivity.csLibrary4A.setInvModeCompact(false);
181182
}
183+
//MainActivity.csLibrary4A.setTagRead(0);
182184
MainActivity.csLibrary4A.sendHostRegRequestHST_CMD(hostCommand);
183185
}
184186
}
@@ -227,6 +229,7 @@ else if (rx000pkgData != null) {
227229
if (rx000pkgData.decodedError != null) { endingMessaage = rx000pkgData.decodedError; ending = true; }
228230
else if (repeat > 0 && resultError.length() == 0) {
229231
resultError = "";
232+
if (true) MainActivity.csLibrary4A.appendToLog("Debug_InvCfg: AccessTask.doInBackground goes to setMatchRep with repeat = " + repeat);
230233
MainActivity.csLibrary4A.setMatchRep(repeat);
231234
MainActivity.csLibrary4A.sendHostRegRequestHST_CMD(hostCommand);
232235
} else {

app/src/main/java/com/csl/cs108ademoapp/CustomIME.java

+1
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ void startStopHandler() {
215215
inventoryBarcodeTask.execute();
216216
} else {
217217
MainActivity.csLibrary4A.setPowerLevel(MainActivity.csLibrary4A.getWedgePower());
218+
MainActivity.csLibrary4A.appendToLog("Debug_Compact: CustomIME.startStopHandler");
218219
MainActivity.csLibrary4A.startOperation(RfidReaderChipData.OperationTypes.TAG_INVENTORY_COMPACT);
219220
inventoryRfidTask = new InventoryRfidTask();
220221
inventoryRfidTask.execute();

app/src/main/java/com/csl/cs108ademoapp/InventoryRfidTask.java

+17-7
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public enum TaskCancelRReason {
6363
Handler handler = new Handler(); boolean bValidVibrateNewAll = false; boolean bUseVibrateMode0 = false;
6464

6565
void inventoryHandler_setup() {
66+
MainActivity.csLibrary4A.appendToLog("InventoryRfidTask.inventoryHandler_setup set runningInventoryRfidTask as true ");
6667
MainActivity.sharedObjects.runningInventoryRfidTask = true;
6768
total = 0; allTotal = 0; yield = 0;
6869
if (tagsList != null) {
@@ -165,6 +166,7 @@ protected String doInBackground(Void... a) {
165166
if (rx000pkgData.decodedError != null) endingMessaage = rx000pkgData.decodedError;
166167
if (continousRequest) {
167168
MainActivity.csLibrary4A.batteryLevelRequest();
169+
MainActivity.csLibrary4A.appendToLog("Debug_Compact: InventoryRfidTask.doInBackground");
168170
MainActivity.csLibrary4A.startOperation(RfidReaderChipData.OperationTypes.TAG_INVENTORY_COMPACT);
169171
} else ending = true;
170172
}
@@ -293,14 +295,15 @@ void tagHandler() {
293295
if (DEBUG) MainActivity.csLibrary4A.appendToLog("InventoryRfidTask: !!! rx000pkgData.Pc length = " + strPc.length());
294296
continue;
295297
}
296-
int extraLength = 0;
298+
/*int extraLength = 0;
297299
if (extra1Bank != -1 && rx000pkgData.decodedData1 != null) extraLength += rx000pkgData.decodedData1.length;
298300
if (extra2Bank != -1 && rx000pkgData.decodedData2 != null) extraLength += rx000pkgData.decodedData2.length;
299301
if (extraLength != 0) {
300302
byte[] decodedEpcNew = new byte[rx000pkgData.decodedEpc.length - extraLength];
301303
System.arraycopy(rx000pkgData.decodedEpc, 0, decodedEpcNew, 0, decodedEpcNew.length);
302304
rx000pkgData.decodedEpc = decodedEpcNew;
303-
}
305+
}*/
306+
MainActivity.csLibrary4A.appendToLog("ApData: decodedEpc = " + MainActivity.csLibrary4A.byteArrayToString(rx000pkgData.decodedEpc) + ", data1,2 = " + MainActivity.csLibrary4A.byteArrayToString(rx000pkgData.decodedData1) + ", " + MainActivity.csLibrary4A.byteArrayToString(rx000pkgData.decodedData2));
304307
String strEpc = MainActivity.csLibrary4A.byteArrayToString(rx000pkgData.decodedEpc);
305308
if (DEBUG) MainActivity.csLibrary4A.appendToLog("HelloC: decodePc = " + strPc + ", decodedEpc = " + strEpc + ", iFlags = " + String.format("%2X", iFlag));
306309
portstatus = INVALID_CODEVALUE; backport1 = INVALID_CODEVALUE; backport2 = INVALID_CODEVALUE; codeSensor = INVALID_CODEVALUE; codeRssi = INVALID_CODEVALUE; codeTempC = INVALID_CODEVALUE; brand = null;
@@ -335,15 +338,19 @@ void tagHandler() {
335338
}
336339

337340
boolean bFastId = false; boolean bTempId = false;
341+
MainActivity.csLibrary4A.appendToLog("bFastId is false with MainActivity.mDid = " + MainActivity.mDid + ", getFastId = " + MainActivity.csLibrary4A.getFastId());
338342
if (MainActivity.mDid != null) {
339-
MainActivity.csLibrary4A.appendToLog("mDid = " + MainActivity.mDid);
340343
if (MainActivity.mDid.indexOf("E28011") == 0) {
341344
int iValue = Integer.valueOf(MainActivity.mDid.substring("E28011".length()), 16);
342345
MainActivity.csLibrary4A.appendToLog(String.format("iValue = 0x%02X", iValue));
343-
if ((iValue & 0x20) != 0) bFastId = true;
346+
if ((iValue & 0x20) != 0) {
347+
bFastId = true; MainActivity.csLibrary4A.appendToLog("bFastId is true");
348+
}
344349
if (DEBUG) MainActivity.csLibrary4A.appendToLog("HelloK: iValue = " + String.format("%02X", iValue));
345350
}
346-
} else if (MainActivity.csLibrary4A.getFastId() > 0) bFastId = true;
351+
} else if (MainActivity.csLibrary4A.getFastId() > 0) {
352+
bFastId = true; MainActivity.csLibrary4A.appendToLog("bFastId is true");
353+
}
347354
if (DEBUG) MainActivity.csLibrary4A.appendToLog("HelloK: strMdid = " + strMdid + ", MainMdid = " + MainActivity.mDid + ", bFastId = " + bFastId);
348355

349356
int iPc = Integer.parseInt(strPc, 16);
@@ -549,13 +556,14 @@ else if (readerDevice.getstrExtra2() != null) {
549556
if (ALLOW_WEDGE) MainActivity.sharedObjects.serviceArrayList.add(strEpc);
550557

551558
boolean bAddDevice = true; String strValue = null;
559+
MainActivity.csLibrary4A.appendToLog("bProtectOnly = " + bProtectOnly);
552560
if (bSgtinOnly) {
553561
strValue = MainActivity.csLibrary4A.getUpcSerial(strEpc);
554562
MainActivity.csLibrary4A.appendToLog("bSgtinOnly = " + bSgtinOnly + ", strValue = " + (strValue == null ? "null" : strValue));
555563
if (strValue == null) bAddDevice = false;
556564
} else if (bProtectOnly) {
565+
bAddDevice = false;
557566
if (strExtra1 != null) {
558-
bAddDevice = false;
559567
strValue = strExtra1.substring(strExtra1.length() - 1);
560568
int iValue = Integer.parseInt(strValue, 16);
561569
MainActivity.csLibrary4A.appendToLog("bProtectOnly = " + bProtectOnly + ", strExtra1 = " + (strExtra1 == null ? "null" : strExtra1) + ", iValue = " + iValue);
@@ -833,7 +841,9 @@ void DeviceConnectTask4InventoryEnding(TaskCancelRReason taskCancelReason) {
833841
MainActivity.csLibrary4A.appendToLog("INVENDING: Toasting");
834842
if (mytoast != null) mytoast.show();
835843
}
836-
if (button != null) button.setText("Start"); MainActivity.sharedObjects.runningInventoryRfidTask = false;
844+
if (button != null) button.setText("Start");
845+
MainActivity.csLibrary4A.appendToLog("InventoryRfidTask.DeviceConnectTask4InventoryEnding set runningInventoryRfidTask as false ");
846+
MainActivity.sharedObjects.runningInventoryRfidTask = false;
837847
if (endingMessaage != null) {
838848
CustomPopupWindow customPopupWindow = new CustomPopupWindow(MainActivity.mContext);
839849
customPopupWindow.popupStart(endingMessaage, false);

0 commit comments

Comments
 (0)