This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TRF7970A: Java Applet Activation

Part Number: TRF7970A


Hi,
I am using the chip above with a MCU in an application in whisch I am trying to get some data from a JavaCard. I manage to do the entire procedure (anticollision, select, RATS), but when i send the Java Applet activation command I do not get any answer from the card, not even an error or something.
The chip is configured as it followes ISO_CTRL_REG has value 0x08 (iso14443 A 106kbps) and the rest of registers that are part of the communication package are as default.
After I do the anticollision procedure I activate the CRC in ISO_CTRL_REG as needed and send the commands with CRC (direct command 0x11)
As a mention using another device I do manage to activate the Java Applet using the exact comand that I am trying to send via TRF7970A.
The command is: 0x02 0x00 0xA4 0x04 0x00 0x09 <9bytes applet ID>.

  • Hello Dan,

    this is a problem that went beyond the standard ISO commands we can support. I know there were questions regarding Java Applets answered in the past, but these collogues are no more available.

    Sorry for not having a better answer for you.

    Best Regards,

    Helfried

  • I would like to add some detailes. I am using the chip in conjunction with a MCU and trying to activate the Java Applet on a tag, so I use the TRF+MCU as a initiator so I can read from a tag that has an Java Applet on it.

    This are the functions that use to send the information:

    uint8_t trf7970a_sendToTag(uint8_t interface, uint8_t crc, uint8_t *buf, uint8_t len)
    {
        trf7970a_command(interface, TRF7970A_CMD_FIFO_RESET);
        (crc)?(trf7970a_command(interface, TRF7970A_CMD_TRANSMIT)):(trf7970a_command(interface, TRF7970A_CMD_TRANSMIT_NO_CRC));
        trf7970a_write_continous(interface, TRF7970A_TX_LENGTH_BYTE1, buf,len);
        return 1;
    }

    uint8_t trf7970a_command(uint8_t interface, uint8_t cmd)
    {
        cmd |= TRF7970A_CMD_BIT_CTRL;
        ChipSelect(interface);
        SPITransaction(SPI_GetAddress(interface), cmd);
        ChipDeSelect(interface);
        return 1;
    }
    uint8_t trf7970a_write_continous(uint8_t interface, uint8_t reg, uint8_t *val, uint8_t len)
    {
        uint8_t ret=1,i;

        reg|=TRF7970A_CMD_BIT_CONTINUOUS;

        ChipSelect(interface);
        SPITransaction(SPI_GetAddress(interface), reg);
        for(i=0;i<len;i++)
            SPITransaction(SPI_GetAddress(interface), val[i]);
        ChipDeSelect(interface);

    /*For debug purposes*/
        uint8_t buf[4];
        hex2str(reg,buf,1);
        USART_AddBuffer(iDEBUG,(uint8_t *)&buf[2],2,DEBUG_MSG);
        for(i=0;i<len;i++)
        {
        hex2str(val[i],buf,1);
        USART_AddBuffer(iDEBUG,(uint8_t *)&buf[2],2,DEBUG_MSG);
        }
        USART_AddBuffer(iDEBUG,(uint8_t *)"\r\n",2,DEBUG_MSG);
        USART_TransmitBuffers(iDEBUG);

    }

    And below I have attached an sequence of commands between me and a JavaCard. The card is of Type A.

    Reg Len Cmd
    3D 000F 26
       0200                                                              
    3D 0020 9320                                                                
       7D13281355                                                          
    3D 0070 93707D13281355                                                     
       20                                                                  
    3D 0020 E010                                                                
       0578F7B102                                                         
    3D 0030 D01100                                                              
       D0                                                                  
    3D 0070 0200A404000100
                                                              
    Timeout
                                                                           
    3D 0020 5000                                                                                                                               
    3D 0020 5000                                                                 

    The problem I have is with the Timeout I get after the command starting with 02. This timeout means I waited for 7ms and received nothing. From testes I have done on with other devices I should have at least got an error for exact this command on the exact same card that I tested for this sequence.

    What is not obvious from above is that the activation command, the one with which I have problems is sent with CRC.
                                                                           

  • Hello Dan,

    because I have no experience with the handling of a JavaCard I cannot judge if the commands are ok. One thing you can check is, if the card is permanent powered. When the carrier is switch of in-between, the card is no more selected. Just an idea.

    Regards,

    Helfried

  • Yes, the card is powered cause after I select the card if i do not use the HALT command the card will no longger respond to REQA, except after I take it out of the field so that it can reset. From my point of view if the card would have run out of power I would have been able to get a REQA response even if I did not send the HLTA command.

  • You are right. That makes sense. It was just a thought to explain the strange behavior.

    Regards,

    Helfried