arygon.c File Reference

ARYGON readers driver. More...

#include "../drivers.h"
#include "../bitutils.h"
#include <stdio.h>
#include "arygon.h"
#include <nfc/nfc-messages.h>
#include "../buses/uart.h"
#include <unistd.h>

Go to the source code of this file.

Defines

#define DEV_ARYGON_PROTOCOL_ARYGON_ASCII   '0'
 High level language in ASCII format. (Common µC commands and Mifare® commands).
#define DEV_ARYGON_PROTOCOL_TAMA   '2'
 Philips protocol (TAMA language) in binary format.
#define DEV_ARYGON_PROTOCOL_TAMA_WAB   '3'
 Philips protocol (TAMA language) in binary With AddressingByte for party line.

Functions

nfc_device_tarygon_connect (const nfc_device_desc_t *pndd)
bool arygon_transceive (const nfc_device_spec_t nds, const byte_t *pbtTx, const size_t szTxLen, byte_t *pbtRx, size_t *pszRxLen)

Detailed Description

ARYGON readers driver.

This driver can handle ARYGON readers that use UART as bus. UART connection can be direct (host<->arygon_uc) or could be provided by internal USB to serial interface (e.g. host<->ftdi_chip<->arygon_uc)

Definition in file arygon.c.


Function Documentation

nfc_device_t* arygon_connect ( const nfc_device_desc_t pndd  ) 
Note:
ARYGON-ADRA (PN531): ???,n,8,1
ARYGON-ADRB (PN532): 9600,n,8,1
ARYGON-APDA (PN531): 9600,n,8,1
ARYGON-APDB1UA33N (PN532): 115200,n,8,1
ARYGON-APDB2UA33 (PN532 + ARYGON µC): 9600,n,8,1

Definition at line 90 of file arygon.c.

bool arygon_transceive ( const nfc_device_spec_t  nds,
const byte_t *  pbtTx,
const size_t  szTxLen,
byte_t *  pbtRx,
size_t *  pszRxLen 
)

Note:
PN532 (at 115200 bauds) need 20ms between sending and receiving frame. No information regarding this in ARYGON datasheet... It seems to be a required delay to able to send from host to device, plus the device computation then device respond transmission
PN532 (at 115200 bauds) need 30ms more to be stable (report correctly present tag, at each try: 20ms seems to be enought for one shot...) PN532 seems to work correctly with 50ms at 115200 bauds.
Unfortunately, adding delay is not enought for ARYGON readers which are equipped with an ARYGON µC + PN532 running at 9600 bauds. There are too many timing problem to solve them by adding more and more delay. For more information, see Issue 23 on development site : http://code.google.com/p/libnfc/issues/detail?id=23

Definition at line 158 of file arygon.c.


Generated on 4 Sep 2010 for libnfc by  doxygen 1.6.1