nfcpy icon indicating copy to clipboard operation
nfcpy copied to clipboard

tag activate and target with only atr_res and atr_req

Open ephraim opened this issue 9 months ago • 0 comments

Hi!

I have a problem with the sense_dep and it's needed return.

In the help of the device.py for the sense_dep method states: ` Arguments:

      target (nfc.clf.RemoteTarget): Supplies bitrate and the
        mandatory **atr_req** for target discovery. The bitrate
        may be one of '106A', '212F', or '424F'.

    Returns:

      nfc.clf.RemoteTarget: Response data received from a remote
        target if found. The only response data attribute is
        **atr_res**. The actually sent and potentially modified
        ATR_REQ is also included as **atr_req** attribute.`

But when I return a Target with e.g. 106A, atr_res and the atr_req, the tag activate function (https://github.com/nfcpy/nfcpy/blob/8a195262fe86167845d282ba5bc9cdaadf6441c4/src/nfc/tag/init.py#L425) will die, as neither sens_res nor sel_res are set.

On the other hand, when I set the sens_res and sel_res to something, nfcpy does not recognize the tag as an dep (ISO15693) tag and uses the normal send_recv with 0x30 0x00 athough the read of a iso15693 is 0x21 0x00, for the first block.

What do I do wrong?

Cheers! Thilo PS: Is there a better place to discuss? If yes, sorry for the noise and a link would be wonderfull!

ephraim avatar Mar 17 '25 15:03 ephraim