AdamLaurie / RFIDIOt

python RFID / NFC library & tools
http://www.rfidiot.org/
1.04k stars 224 forks source link

Problems with emulate ACR122 #49

Open alhkytran opened 3 years ago

alhkytran commented 3 years ago

I tried to use pn532mitm.py with 2 acr122 to read and emulated. The part to read no have problem, wait for a card and when the card is closed read and wait for emulated, in this step get trouble in

emulator.acs_send_apdu(PN532_APDU['TG_INIT_AS_TARGET']+mode+sens_res+uid+sel_res+felica+nfcid+lengt+gt+lentk+tk

The error is:

Traceback (most recent call last):
  File "pn532mitm.py", line 315, in <module>
    status= emulator.acs_send_apdu(PN532_APDU['TG_INIT_AS_TARGET']+mode+sens_res+uid+sel_res+felica+nfcid+lengt+gt+lentk+tk)
  File "$HOME/RFIDIOt/rfidiot/RFIDIOt.py", line 1212, in acs_send_apdu
    result, sw1, sw2= self.acs_transmit_apdu(apduout)
  File "$HOME/RFIDIOt/rfidiot/RFIDIOt.py", line 1258, in acs_transmit_apdu
    sw1 = response[-2]
IndexError: list index out of range

The readers information is:

Reader NXP PN532 Firmware:
       IC: 32
      Rev: 1.6

And the command that used was python pn532mitm.py -r 0 1

Can someone help me with this problem??

AlfonsoLopezContreras commented 2 years ago

I have the same issue, anyone found a solution?