Commit Graph
699 Commits
Author SHA1 Message Date
Romuald Conty 7113d1418b Add FIXME to raise an E_NOTSUPPORTED error in future,
New issue
Summary: Catch unsupported command before sending to chip
Labels: Milestone-1.6.x
Actually, libnfc support PN531, PN532 and PN533 NFC chips, but the devices does not the same features. e.g. PN531 does not support ISO14443B modulation.
It should great to catch theses unsuported commands before sending to chip in order to prevent a chip error.
2010-07-30 11:45:59 +00:00
Romuald Conty 5ac580a241 Code cleanup: remove many debug prints, enhance comments and documentation. 2010-07-30 11:30:19 +00:00
Romain Tartiere daa178b18f Enhance error handeling.
- New API functions: nfc_strerror(), nfc_strerror_r() and nfc_perror();
  - Drivers now have a reference to chips callback methods;
  - Rename -pn53x_err2string to pn53x_strerror and add it to pn53x_callbacks_list.
2010-07-29 14:16:11 +00:00
Romuald Conty 18e6e1bc7c Add documentation for pn53x_InListPassiveTarget() 2010-07-29 12:48:59 +00:00
Romuald Conty fc15146bf2 Minor code cleanning. 2010-07-29 12:47:51 +00:00
Romain Tartiere 30e715cff0 Merge r470-477 from trunk. 2010-07-29 10:59:52 +00:00
Romain Tartiere 740b5b430d libnfc-error-handling: Remove boring debug stuff. 2010-07-29 10:53:14 +00:00
Romain Tartiere f01b73ab32 Move usb_reset(3) call.
As the documentation states, and as reported in isssue 81 (fixed in r421),
usb_reset()'s argument is invalid after the call and so usb_close(3) must be
called before usb_reset(3).
2010-07-29 10:47:53 +00:00
Emanuele Bertoldi f7e8ec0a95 nfc-sam: cleanup and Windows support improvements. 2010-07-29 10:18:19 +00:00
Roel Verdult 5129a37ec8 fixed typo, missed closing bracket ;) 2010-07-28 12:56:40 +00:00
Roel Verdult 20ed5e1a52 fixed wakeup preamble, change PN532 chip to normal mode after wakeup 2010-07-28 12:52:39 +00:00
Romuald Conty d63157a41d Fix mask to extract "Error Code" from status byte. 2010-07-27 09:29:54 +00:00
Romain Tartiere 9984e1bdcb Start of work on error handling. 2010-07-26 12:41:46 +00:00
Emanuele Bertoldi 9a7ffc38a1 Small improvements to nfc-sam stuff. 2010-07-26 08:55:43 +00:00
Romain Tartiere af584bd474 Fix packet length checksum computation.
The doc says LCS (aka abtTx[4]) must be set so that the lower byte of LCS+LEN
(aka abtTx[3]) is 0x00.  This has not to be related to the USB buffer size, so
that we can adjust it without breaking down the libnfc.
2010-07-25 16:31:53 +00:00
Romain Tartiere 7f9f907bc2 Silent down compiler. 2010-07-24 18:54:50 +00:00
Romain Tartiere e6d079d87a Fix a regression introduced at r461.
This prevents the ATR_REQ from being processed and some tags detection fails in
libfreefare.
2010-07-24 17:20:48 +00:00
Romain Tartiere 4ff66d125f Fix a regression introduced at r458.
Both abtInit and szInitLen are initialised using pbtInitData and szInitDataLen,
so we must use them when calling pn53x_InListPassiveTarget().
2010-07-24 16:30:44 +00:00
Romuald Conty 544bda197e Fix minor warning. 2010-07-23 13:31:33 +00:00
Romuald Conty edb62bd1cb Create pn53x_InDeselect function. 2010-07-23 13:30:06 +00:00
Romuald Conty 7eeb46ab68 Minor indentation fix. 2010-07-23 12:48:30 +00:00
Romuald Conty 7dd1053d03 Fix incorrect selected targets size in pn53x_InListPassive(). 2010-07-23 12:45:21 +00:00
Romuald Conty 3f17e5e032 Minor indentation fix. 2010-07-23 12:41:29 +00:00
Romuald Conty aca1eb40a8 Comment out extern symbol related to PN53x in nfc.c; The goal is to remove all of them from nfc.c 2010-07-22 16:24:24 +00:00
Romuald Conty d932cd8450 Move some PN53x related code from nfc.c to pn53x.c 2010-07-22 16:21:59 +00:00
Romuald Conty 424a48714f Minor documentation improvements. 2010-07-22 16:16:37 +00:00
Romuald Conty c4bb23631b Do not export nfc_parse_device_desc() in libnfc API. 2010-07-22 16:13:02 +00:00
Emanuele Bertoldi 4bc522cd1e First prototype of argument parsing for device description (issue #87). 2010-07-22 13:41:20 +00:00
Romain Tartiere 7945dd18fa Enhance 'make indent'.
- Complete indent(1)'s arguments list;
  - Ensure files to be indented have no local edit;
  - Hide indent command-line details.  Since everything is static, no need for V=1 support.
2010-07-21 22:32:02 +00:00
Romain Tartiere 67fb1330f8 Rework the indent target.
- Check indent is present at ./configure stage;
  - If gindent(1) is installed, use it instead of indent(1);
2010-07-21 13:09:48 +00:00
Romuald Conty 2688de6500 API change: nfc_initiator_select_tag() is now nfc_initiator_select_passive_target() AND nfc_initiator_deselect_tag() is now nfc_initiator_deselect_target() 2010-07-21 10:37:37 +00:00
Romuald Conty d97876714c Add indent directive in root Makefile. 2010-07-20 13:38:58 +00:00
Romuald Conty 0a87c18e7e nfc-mfultralight: we now can write OTP bytes if user want to. 2010-06-30 15:06:59 +00:00
Romuald Conty 379066f069 nfc-mfultralight: on write failure, continue if authenticate works. 2010-06-30 14:54:34 +00:00
Romain Tartiere d8f12035fc Add missing carriage return at EOF (yes, I have nothing better to do ATM). 2010-06-26 21:56:32 +00:00
Romuald Conty 596733bacc nfc-mfultralight: Fix messages, we read/write pages not blocks. 2010-06-24 11:04:05 +00:00
Romuald Conty 688ebe2324 Re-ident examples/nfc-mfultralight.c using "indent -br -ce --line-length120 -nut -i2 -ppi 2" command line. 2010-06-24 10:19:01 +00:00
Romuald Conty 470dd8be05 nfc-mfultralight: Fix read and write counters. Code cleanup. 2010-06-24 10:16:09 +00:00
Romuald Conty 2e1fa09166 Set svn:ignore property on nfc-sam example. 2010-06-16 12:12:31 +00:00
Emanuele Bertoldi e6d96333f7 nfc-sam: added some config operations. 2010-06-16 11:40:23 +00:00
Emanuele Bertoldi f748ec1c59 nfc-sam: added FIXME notes. 2010-06-16 11:34:55 +00:00
Emanuele Bertoldi 391d066095 nfc-sam: improved output and error messages. 2010-06-16 11:32:16 +00:00
Emanuele Bertoldi 3f6109af52 Cleanup. 2010-06-16 11:23:13 +00:00
Emanuele Bertoldi b2089e8bb0 nfc-sam: better connection management. 2010-06-16 11:21:27 +00:00
Emanuele Bertoldi d593a8e4c9 Added use of nfc-messages. 2010-06-16 09:48:26 +00:00
Romuald Conty f7c31885f5 Move all Mifare related code from libnfc API to examples: NFC is capable of Mifare, but Mifare is not NFC. 2010-06-15 15:33:22 +00:00
Romuald Conty db735ab224 Prevent from sources files being executable. 2010-06-15 15:32:58 +00:00
Emanuele Bertoldi 4b5d3913d9 Cleanup. 2010-06-15 15:10:11 +00:00
Emanuele Bertoldi 8e4bef9c90 Added draft of a new libnfc-based example: nfc-sam.
It tests the comunication with a connected SAM (Secure Access Module).
2010-06-15 15:05:40 +00:00
Romuald Conty ec48f04dd8 Bump package version to 1.3.9 since trunk looks like 1.4.x series. 2010-06-07 13:33:33 +00:00