Commit graph

1923 commits

Author SHA1 Message Date
Mike Auty
ebe6335fc1 Rerun usb_find_busses() and usb_find_devices() without recalling usb_init()
Fixes issue #252
2013-06-22 20:03:45 +02:00
Philippe Teuwen
03e1f23a40 Make use of new PN53x_ACK_FRAME__LEN 2013-06-15 23:14:54 +02:00
Laurent Latil
005713921e Update PN532/I2C sample config file for rev2.0 boards. Add a note regarding the change of I2C bus routing on R-Pi board rev 2.0. 2013-06-15 22:53:45 +02:00
Laurent Latil
80a41010fb Fix various problems in I2C support of PN532: - Fix a memory leak in pn532_i2c_wait_rdyframe() - Remove unused parameters and local variables - Fix all other compilation warnings
Note: a new constant (PN53x_ACK_FRAME__LEN) has been defined in
pn53x-internal.h file to avoid hard coding the ACK frame length.
2013-06-15 22:53:35 +02:00
Philippe Teuwen
957bebfd48 make style 2013-06-15 22:51:53 +02:00
Philippe Teuwen
9de66d463b UART: add support for BeagleBone serial ports
Thanks to Johan Henselmans!
2013-06-15 22:01:28 +02:00
Philippe Teuwen
d99bcb79fa I2C: add i2c support to CMake 2013-06-15 00:41:20 +02:00
Philippe Teuwen
5cc3f3551a I2C: add i2c to cppcheck 2013-06-15 00:37:08 +02:00
Philippe Teuwen
35da0c0b8a Update ChangeLog & NEWS 2013-06-15 00:35:18 +02:00
Philippe Teuwen
4c707e04ad I2C: add conf example 2013-06-15 00:25:08 +02:00
Philippe Teuwen
77445f1672 I2C: remove unneeded I2C_DRIVERS_ENABLED 2013-06-15 00:20:04 +02:00
Philippe Teuwen
3cd26a18f1 I2C: add Laurent Latil as author 2013-06-15 00:04:06 +02:00
Philippe Teuwen
238be3f068 make style 2013-06-15 00:01:25 +02:00
Laurent Latil
1b11450312 Add I2C protocol support for PN532. 2013-06-14 23:59:46 +02:00
Philippe Teuwen
6038aca7d1 acr122_usb: remove ACR122<>TOUCHATAG model distinction 2013-06-14 23:58:55 +02:00
Philippe Teuwen
c6bda74f44 acr122_usb: ACR122U does not need PCSC Escape anymore
ACR122U:
Through PCSC we couldn't send APDUs to the reader if there was no card
but now that we communicate directly with the reader, we can send APDUs
even if there is no card, so we don't need the Escape mechanism anymore
2013-06-14 23:39:43 +02:00
Philippe Teuwen
c2fa73b404 acr122_usb: retry a few times if init failed 2013-06-14 23:28:03 +02:00
Philippe Teuwen
f0471ebc89 acr122_usb: capture more specifically the expected error SW=637f 2013-06-13 21:01:08 +02:00
Philippe Teuwen
7638e9ea87 mifare_classic_block_manufacturer: clearer struct members
Fixes issue 250
2013-06-13 20:14:22 +02:00
Romuald Conty
af7eef0c54 acr122_usb: check received Status Word (Touchatag)
Test if SW1 is 0x61 (means more bytes have to be read) before using SW2 as length.

Update issue 251
The driver now check that Status Word (SW1) is equals to 0x61 (more data available) before using SW2 as length.
If SW is not as expected, it show SW1 and SW2.
2013-06-13 15:56:39 +02:00
Romuald Conty
5757fafe0c acr122_usb: check if received frame is long enough (Touchatag)
This prevents from potential out-of-memory read.
2013-06-13 15:49:48 +02:00
Romain Tartière
27c43e8b8a Improve a bit shell scripts portability.
- Use /bin/sh: bash is not required here;
  - Avoid Perl regexp in grep(1): this is a GNU extension;
  - While here, make ReadNavigo.sh fail earlier if pn53x-tamashell
    fails at first invocation.

Reported by:	Ganael Laplanche <martymac@FreeBSD.org>
2013-05-25 13:29:38 +02:00
Ludovic Rousseau
16a5fc419c Use PKG_PROG_PKG_CONFIG
Remove ad-hoc code and use the standard macro instead.

Closes issue #249
2013-05-24 20:30:23 +02:00
Romain Tartière
0a5199a737 Avoid clash with system's htole32 if it exists.
Fix build on FreeBSD.

Reported by:    Ganael Laplanche
2013-05-20 17:02:24 +02:00
Romain Tartière
c1db25c05b Include <stdlib.h>, required for getenv(3).
Fix build if -Werror is set, avoid coredumping at runtime otherwise.

Reported by:	Ganael Laplanche
2013-05-20 17:01:49 +02:00
Romuald Conty
936210c076 pn53x: only create a current target when at least one have been found. 2013-05-13 09:43:46 +02:00
Romuald Conty
07dfed8a08 Debian: update symbols which changed in rc7 2013-05-13 09:41:45 +02:00
Romuald Conty
205aef9739 Add missing thanks to ChangeLog 2013-05-13 09:41:07 +02:00
Philippe Teuwen
c97c70f5d5 Fix typo in libnfc.conf.sample
Fixes issue 247
2013-04-30 21:48:33 +02:00
Philippe Teuwen
41ec6d49f6 Add ISO14443-4 chaining support for RX (MI) 2013-04-28 23:52:15 +02:00
Romuald Conty
b84ac324ff pn532_uart: fix 'operation abort' feature with this driver 2013-04-18 13:49:10 +02:00
Philippe Teuwen
0841a94c65 nfc-mfclassic: allow option f for read operation too 2013-04-09 23:42:55 +02:00
Philippe Teuwen
29c7ef19a9 Debian: rc6 -> rc7 2013-04-05 16:18:12 +02:00
Romuald Conty
27f3c4973d Prepare release candidate 1.7.0 RC7 2013-04-05 16:01:36 +02:00
Philippe Teuwen
b950eacfdf drivers USB: check usb_open() result
Fixes issue 245
2013-04-05 15:42:57 +02:00
Philippe Teuwen
9cb9e0e6da Fix cppcheck warning: The scope of the variable X can be reduced. 2013-04-05 14:38:03 +02:00
Philippe Teuwen
fc144fe389 nfc-anticol: add option -t for timed exchanges 2013-04-05 14:33:16 +02:00
Philippe Teuwen
d319e87ff8 HACKING: refer to make cppcheck 2013-04-05 11:43:47 +02:00
Philippe Teuwen
a3475cc896 make cppcheck: add PN532_SPI 2013-04-05 11:42:57 +02:00
Romuald Conty
e6ab66037d Better support for some special chinese cards
Fixes issue 190
2013-04-05 11:29:31 +02:00
Romuald Conty
c958201148 New custom "make cppcheck" target: run a cppcheck with usual args 2013-04-05 11:12:39 +02:00
Ludovic Rousseau
7d986844c4 Fix compiler warnings
doc/quick_start_example1.c:24: warning: unused parameter ‘argc’
doc/quick_start_example2.c:21: warning: unused parameter ‘argc’
2013-04-03 17:55:40 +02:00
Ludovic Rousseau
a57793fe5a Do not build pn532_spi if spi is not available
Check if the include file linux/spi/spidev.h is available and, only if
the header file is present, add the driver pn532_spi for "default" and
"all" driver configuration.

This Linux header file is not present on Mac OS X for example.
2013-04-03 16:08:34 +02:00
Alex Lian
8b8b8d49a7 Windows packaging improvement
- Stepped away from NSIS, to just be a plain zip file
- Fixed a bug (though when trying NSIS) of dealing with slashes in windows paths
- Had package add .lib file instead of .dll.a file, since lib files tend to be more useful for Windows developers
2013-04-03 01:06:03 -04:00
Ludovic Rousseau
a8f91c05d2 Fix autoreconf warning
libnfc/buses/Makefile.am:16: warning: EXTRA_DIST multiply defined in
condition TRUE ...
libnfc/buses/Makefile.am:9: ... 'EXTRA_DIST' previously defined here
2013-04-01 18:26:23 +02:00
Philippe Teuwen
0625544cc3 Merge branch 'pn532_spi'
* pn532_spi:
  SPI: remove dead code
  SPI: add 1ms sleep in wakeup()
  SPI: update NEWS & Changelog
  Add connstring example for SPI on RPi
  Add PN532 SPI driver to CMake
  spi: fix doc typos
  spi: remove spi_posix.c, exotic platform implementations will have to be done in their respective contrib subdir
  Only include SPI related files when (at least) one SPI driver is enabled
  pn532_spi: missing malloc() checks, spi_close(), nfc_device_close() on some error handling branches
  pn532_spi: fix missing free(ndd.port)
  pn532_spi: fix double free() of spi port info
  Add pn532_spi author to AUTHORS
  Unify copyright notices
  pn532_spi: use new connstring_decode()
  Fix cppcheck warning "Non reentrant function 'readdir' called"
  Fix cppcheck warning "scanf without field width limits can crash with huge input data"
  Fix cppcheck warning "Obsolete function 'usleep' called"
  spi driver: remove compilation warnings
  make style
  Adding a SPI driver for pn532
2013-04-01 13:24:28 +02:00
Philippe Teuwen
0b1bf105be Revert 1c67c3f92a
Fixes issue 244
errorlibnfc.driver.acr122_usbToo small reply
2013-03-30 17:51:06 +01:00
Philippe Teuwen
1b45bd4ee1 SPI: remove dead code 2013-03-28 00:20:03 +01:00
Philippe Teuwen
f9bd5d79d2 SPI: add 1ms sleep in wakeup()
Without this delay I had troubles with a Raspberry-Pi:
With debug enabled I could go as high as 7.8MHz but without debug I had to go lower than 500kHz otherwise I got following error:
  errorlibnfc.driver.pn532_spiUnable to wait for SPI data. (RX)
  pn53x_check_communication: Timeout
It could work occassionally faster but very unreliable.
So the delay introduced by printf() was enough to "fix" the problem, therefore this little extra sleep() in wakeup().
2013-03-28 00:19:29 +01:00
Philippe Teuwen
c8e50b6852 SPI: update NEWS & Changelog 2013-03-27 23:33:02 +01:00