23 Jul, 2014

7 commits

  • Support for Initiator and Target mode with ISO18092 commands support:
    - ATR_REQ/ATR_RES
    - PSL_REQ/PSL_RES
    - DEP_REQ/DEP_RES

    Work based on net/nfc/digital_dep.c.
    st21nfca is using:
    - Gate reader F for P2P in initiator mode.
    - Gate card F for P2P in target mode.

    Felica tag and p2p are differentiated with NFCID2.
    When starting with 01FE it is acting in p2p mode.

    On complete_target_discovered on ST21NFCA_RF_READER_F_GATE
    supported_protocols is set to NFC_PROTO_NFC_DEP_MASK
    for P2P.

    Tested against: Nexus S, Galaxy S2, Galaxy S3, Galaxy S3 Mini,
    Nexus 4 & Nexus 5.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • Send DM_DISCONNECT command to disconnect Terminal Host from the HCI network.

    - The persistent states of the terminal host pipes, including registry values,
    are not modifies. Therefore, there is no NVRAM update to disconnect the
    terminal host.
    - The terminal host RF card gates are disabled which means that there will be no event
    related to card RF gates until communication has been restored.
    - The terminal host RF reader request is reset so the RF reader polling for terminal
    host is disabled.

    To restore the communication, the terminal host can send any HCI command or event.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • A DEP_RES with a SUPERVISOR PDU can be up to 16 bytes long.

    In order to avoid useless read during p2p, extend first read
    sequence to 16 and reduce third sequence to 12 to keep same
    total on the full sequence.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • A start of frame is 7E 00 not only 7E. Make sure the first read sequence is
    starting with 7E 00.
    For example: 7E FF FF FF FF is as a correct crc but it is a bad frame.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • In case no data are retrieve through i2c or one specific case is not handled.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • Add driver for STMicroelectronics ST21NFCB NFC controller.
    ST21NFCB is using NCI protocol and a proprietary low level transport
    protocol called NDLC used on top.

    NDLC:
    The protocol defines 2 types of frame:
    - One type carrying NCI data (referred as DATAFRAME frames).
    - One type carrying protocol information used for flow control and error
    control mechanisms (referred as SUPERVISOR frames).

    After each frame transmission to the NFC controller, the device host
    SHALL waitfor an ACK (SUPERVISOR frame) reception before sending a
    new frame.
    The NFC controller MAY send a frame at anytime to the device host.
    The NFC controller MAY send a specific WAIT supervisor frame to indicate
    to device host that a NCI data packet has been received but that it could
    take significant time before the NFC controller sends an ACK and thus
    allows next data reception.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     

26 May, 2014

2 commits


20 May, 2014

3 commits


05 May, 2014

6 commits


22 Apr, 2014

22 commits