Zebra FX7500/9600 Write Error Codes

T Trooper Murphy 1 week 5 days ago
422 0 0

Hello,

I have two FX7500 readers and one FX9600 reader, with firmware versions 2.7.19 (FX7500), 3.21.21 (FX7500), and 3.9.17 (FX9600). When using Zebra's Windows Java SDK for Fixed Readers, I encounter different error messages when writing to tags. Specifically, with the FX7500 on firmware 2.7.19, I receive "C1G2WriteOpSpecResult failed: Tag Memory Locked" when writing to the EPC memory bank if it's locked. However, on the FX7500 and FX9600 with newer firmware, the error message is "C1G2WriteOpSpecResult failed: The Tag does not support error-specific codes."

My use case requires specific error codes when writing to tags. I understand that downgrading the FX9600 might be an option, but for the FX7500 with firmware version 3.21.21 Zebra states that readers with firmware above 3.21.x cannot downgrade below that point. Is there a way to retrieve error-specific codes using Zebra's SDK, or is there a method to downgrade the newer firmware?

Here is a code snippet for writing to tags. The line e2.getVendorMessage() prints the error code:


checkPermalockingButton.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
        // Set the transmit power index to maximum
        antennaConfig.setTransmitPowerIndex((short) 200);

        String columnName = "PermaLock";
        // Check if the column exists
        int columnIndex = tableModel.findColumn(columnName);

        // If columnIndex is -1, the column doesn't exist, so add it
        if (columnIndex == -1) {
            tableModel.addColumn(columnName);
        }

        // Assuming you have an array or list of EPCs in your tableModel
        int rowCount = tableModel.getRowCount();

        for (int i = 0; i < rowCount; i++) {
            String currlockStatus = (String) tableModel.getValueAt(i, 2);
            if (currlockStatus == null) {
                currlockStatus = "null";
            }
            if (!currlockStatus.equals("Locked") && !currlockStatus.equals("Not Locked")) {
                String epc = (String) tableModel.getValueAt(i, 0);
                System.out.println("EPC: " + epc);

                try {
                    // Write user memory bank data

                    tagEPC = epc;

                    TagAccess tagAccess = new TagAccess();

                    TagAccess.WriteAccessParams writeAccessParams = tagAccess.new WriteAccessParams();

                    String writeDataString = tagEPC.substring(8,12);

                    // Convert the hexadecimal string to a byte array
                    byte[] writeData = hexStringToByteArray(writeDataString);

                    writeAccessParams.setAccessPassword(0x00);

                    writeAccessParams.setWriteDataLength(writeData.length);

                    writeAccessParams.setMemoryBank(MEMORY_BANK.MEMORY_BANK_EPC);

                    writeAccessParams.setByteOffset(8);

                    writeAccessParams.setWriteData(writeData);

                    // antenna Info is null – performs on all antenna

                    System.out.println(Arrays.toString(writeData));
                    System.out.println(tagEPC);
                    System.out.println(Arrays.toString(tagEPC.getBytes()));
                    System.out.println(writeAccessParams.getAccessPassword());

                    // antenna Info is null – performs on all antenna

                    reader.Actions.TagAccess.writeWait(tagEPC, writeAccessParams, null);

                    allTagsAreLocked = false;
                    tableModel.setValueAt("Not Locked", i, 2);

                } catch (InvalidUsageException e2) {
                    //e2.printStackTrace();
                    System.out.println(e2.getInfo());
                    allTagsAreLocked = false;
                    tableModel.setValueAt("Error IN", i, 2);
                } catch (OperationFailureException e2) {
                    //e2.printStackTrace();
                    if (!(e2.getVendorMessage().contains("Tag Memory Locked"))) {
                        TagAccess tagAccess2 = new TagAccess();

                        TagAccess.WriteAccessParams writeAccessParams2 = tagAccess2.new WriteAccessParams();

                        String writeDataString2 = tagEPC.substring(8,12);

                        // Convert the hexadecimal string to a byte array
                        byte[] writeData2 = hexStringToByteArray(writeDataString2);

                        writeAccessParams2.setAccessPassword(0x00);

                        writeAccessParams2.setWriteDataLength(writeData2.length);

                        writeAccessParams2.setMemoryBank(MEMORY_BANK.MEMORY_BANK_EPC);

                        writeAccessParams2.setByteOffset(8);

                        writeAccessParams2.setWriteData(writeData2);

                        try {
                            reader.Actions.TagAccess.writeWait(tagEPC, writeAccessParams2, null);

                            allTagsAreLocked = false;
                            tableModel.setValueAt("Not Locked", i, 2);
                        } catch (InvalidUsageException ex) {
                            //e2.printStackTrace();
                            System.out.println(ex.getInfo());
                            allTagsAreLocked = false;
                            tableModel.setValueAt("Error IN", i, 2);
                        } catch (OperationFailureException ex) {
                            if (!(e2.getVendorMessage().contains("Tag Memory Locked"))) {
                                allTagsAreLocked = false;
                                tableModel.setValueAt("Error OP", i, 2);
                            } else {
                                tableModel.setValueAt("Locked", i, 2);
                            }
                        }
                    } else {
                        tableModel.setValueAt("Locked", i, 2);
                    }

                    System.out.println(e2.getResults());
                    System.out.println(e2.getStatusDescription());
                    System.out.println(e2.getTimeStamp());
                    System.out.println(e2.getVendorMessage());
                    System.out.println(e2.getLocalizedMessage());
                }
            }
        }
    }
});

 

Thanks,

Trooper

CONTACT
Can’t find what you’re looking for?