paulobunga / c72-rfid-scanner

RFID Scanner module for Chainway C72 Scanner
12 stars 5 forks source link

Lock Tag #50

Open ItxAltaf opened 1 week ago

ItxAltaf commented 1 week ago

Hello Mr. @paulobunga I want to implement lock RFID tag functionality but facing issues here is my code : @ReactMethod public void uhfBlockPermalock(String targetEpc,String pwdStr, final Promise promise) { // epc += password; // epc += "00000000"; //old // Access Password, Bank Enum (EPC(1), TID(2),...), Pointer, Count, Data //Boolean uhfWriteState = mReader.writeData_Ex("00000000", BankEnum.valueOf("UII"), 2, 6, epc); // boolean result=mContext.mReader.uhfBlockPermalock(pwdStr,filter_bank,filter_ptr,filter_len,filter_data,readLock,bank,prt,uRange,mastBuff); // targetEpc += pwdStr;

    try {

        byte[] maskBytes = StringUtility.hexString2Bytes(targetEpc);

        Boolean result=mReader.uhfBlockPermalock(pwdStr,IUHF.Bank_EPC,0,0,targetEpc,1,IUHF.Bank_EPC,2,1,maskBytes); //,readLock,bank,prt,uRange,mastBuff
        // Boolean result=mReader.lockMem(targetEpc,1,2,3,pwdStr,""); 

        promise.resolve(result);
        // Log.d("UHF_SCANNER", String.valueOf(uhfPower));

    } catch (Exception ex) {
        Log.d("UHF_SCANNER", ex.getLocalizedMessage());
        promise.reject(UHF_READER_OTHER_ERROR, ex.getLocalizedMessage());
    }
    }
paulobunga commented 1 week ago

What issues are you experiencing?

[image: Mailtrack] https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11& Sender notified by Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11& 25/06/24, 17:00:58

On Tue, Jun 25, 2024 at 3:24 PM Altaf H. @.***> wrote:

Hello Mr. @paulobunga https://github.com/paulobunga I want to implement lock RFID tag functionality but facing issues here is my code : @ReactMethod public void uhfBlockPermalock(String targetEpc,String pwdStr, final Promise promise) { // epc += password; // epc += "00000000"; //old // Access Password, Bank Enum (EPC(1), TID(2),...), Pointer, Count, Data //Boolean uhfWriteState = mReader.writeData_Ex("00000000", BankEnum.valueOf("UII"), 2, 6, epc); // boolean result=mContext.mReader.uhfBlockPermalock(pwdStr,filter_bank,filter_ptr,filter_len,filter_data,readLock,bank,prt,uRange,mastBuff); // targetEpc += pwdStr;

try {

    byte[] maskBytes = StringUtility.hexString2Bytes(targetEpc);

    Boolean result=mReader.uhfBlockPermalock(pwdStr,IUHF.Bank_EPC,0,0,targetEpc,1,IUHF.Bank_EPC,2,1,maskBytes); //,readLock,bank,prt,uRange,mastBuff
    // Boolean result=mReader.lockMem(targetEpc,1,2,3,pwdStr,"");

    promise.resolve(result);
    // Log.d("UHF_SCANNER", String.valueOf(uhfPower));

} catch (Exception ex) {
    Log.d("UHF_SCANNER", ex.getLocalizedMessage());
    promise.reject(UHF_READER_OTHER_ERROR, ex.getLocalizedMessage());
}
}

— Reply to this email directly, view it on GitHub https://github.com/paulobunga/c72-rfid-scanner/issues/50, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOP4W2AZNL6CLSNHVBHN6TZJFOQPAVCNFSM6AAAAABJ3VRQPKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3TENBYHEZDSNY . You are receiving this because you were mentioned.Message ID: @.***>

ItxAltaf commented 1 week ago

uhfBlockPermalock

I have tried both uhfBlockPermalock and lockMem but both returns false.

e.g: Boolean result=mReader.uhfBlockPermalock(pwdStr,IUHF.Bank_EPC,0,0,targetEpc,1,IUHF.Bank_EPC,2,1,maskBytes);

e.g: Boolean result=mReader.lockMem(targetEpc,1,2,3,pwdStr,"")

I want to permanently lock the tag so that no one can modify it.

paulobunga commented 1 week ago

Will definitely look into it within the coming weeks. If you would love expeditated assistance on this issue, I could look into it soon for a small donation.

ItxAltaf commented 1 week ago

I appreciate your willingness to look into the issue. Unfortunately, I'm not in a position to make a donation at this time. However, if you could provide a hint or some helpful material, it would be greatly appreciated. Any guidance you can offer would be very helpful.