From e92b8ab76f874e946d581c0ba527fc73cefcc2be Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Thu, 3 Sep 2009 12:26:54 +0000 Subject: [PATCH] ARYGON APDB1UA33N works with the revision. --- src/dev_arygon.c | 8 ++++++++ src/rs232.c | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dev_arygon.c b/src/dev_arygon.c index df25eee..adfe04c 100644 --- a/src/dev_arygon.c +++ b/src/dev_arygon.c @@ -28,6 +28,8 @@ along with this program. If not, see #ifdef __APPLE__ #define SERIAL_STRING "/dev/tty.SLAB_USBtoUART" #else + // unistd.h is needed for udelay() fct. + #include "unistd.h" #define SERIAL_STRING "/dev/ttyUSB" #endif #endif @@ -134,6 +136,12 @@ bool dev_arygon_transceive(const dev_spec ds, const byte_t* pbtTx, const uint32_ return false; } + /** @note ARYGON-APDB need 20ms between sending and receiving frame. No information regarding this in ARYGON datasheet... */ + usleep(20000); + + /** @note ARYGON-APDB need 20ms more to be able to report (correctly) present tag. */ + usleep(20000); + if (!rs232_receive((serial_port)ds,abtRxBuf,&uiRxBufLen)) { ERR("Unable to receive data. (RX)"); return false; diff --git a/src/rs232.c b/src/rs232.c index afbde4a..60e036a 100644 --- a/src/rs232.c +++ b/src/rs232.c @@ -87,7 +87,6 @@ serial_port rs232_open(const char* pcPortName) */ /** @todo provide this settings dynamically */ #define DEBUG__TRY_ARYGON_APDB - #ifdef DEBUG__TRY_ARYGON_APDB cfsetispeed(&(sp->tiNew), B115200); cfsetospeed(&(sp->tiNew), B115200);