-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update libusb10 branch to match master branch #672
Closed
kenspeckle1
wants to merge
402
commits into
nfc-tools:libusb10
from
kenspeckle1:update_libusb10_branch
Closed
Update libusb10 branch to match master branch #672
kenspeckle1
wants to merge
402
commits into
nfc-tools:libusb10
from
kenspeckle1:update_libusb10_branch
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There have been changes to the Raspberry Pi 3's usage of serial ports with the addition of a Bluetooth LE module. This configuration uses the mini UART without disabling any devices except for the linux serial console.
This patch allows for using the CMakefile to generate debian packages. While CPack is far from perfect for generating debian packages, it is a minimal change and quite helpful for quick deployment on debian based systems. Signed-off-by: Olliver Schinagl <[email protected]>
Currently we only inform the user with the error logging mechanism that we received a different number of bytes than expected. Thus in case of an error, we say that we sent/received -1 bytes. However -1 indicates an error and errno is set to indicate the error state. This patch extends the logging to also print the actual error. Additionally the same debugging printing was added to read, which is now silently returned to the caller. Signed-off-by: Olliver Schinagl <[email protected]>
The pn532 documentation differs slightly from the included ascii art documentation on how a packet looks like. The preamble was omitted however the postamble is mentioned. This patch adds the Preamble to the ascii frame documentation. The code later refers incorrectly to the start byte as the preamble. This variable was renamed to more descriptively state that it is the preambe and the start bytes. Signed-off-by: Olliver Schinagl <[email protected]>
The pn532 user manual states that after a i2c stop condition and before a i2c start condition there should be a delay of minimally 1.3 milliseconds. This is probably a limitation of the i2c peripheral or the firmware. In any case, each i2c_read and i2c_write creates the packets which are complemented with start/stop markers. It is thus required to take care of timing in these two functions. We solve this by wrapping the lower i2c_read and i2c_write functions for the pn532, as this requirement is not for all chips. Currently, we keep time using local variable, and thus the code is not thread-safe. With libnfc being single threaded and only one instances of libnfc can open a bus anyway, this is not yet a problem. Signed-off-by: Olliver Schinagl <[email protected]>
Currently, we very occasionally can EXNIO errors from pn532_i2c_write() -> i2c_write() -> write(). This may happen about once every 30 seconds. Based from the kernel sources, EXNIO happens if the chip no longer responds to its own address. To make sure we do not loose any sent packets, we retry to send PN532_SEND_RETRIES number of times. Since we miss 1 every 30 or so seconds, doing 1 retry should be fine. This might be considered a hack as the failure may be some other timing related issue. Signed-off-by: Olliver Schinagl <[email protected]>
Synchronized with nfc.h with all API functions
Fixed file name "README" in cmakelists.txt
Respect pn532 i2c timing
The datasheet is wrong for the pn532_i2c. After having constant issues with the device failing to respond on the bus and after contacting NXP about this, it turns out 1.3 ms is too tight. The official timing spec is unknown for now, but we tested 4 and 5 ms without problems. Thus we have choosen 5 ms as a safe delay. Signed-off-by: Olliver Schinagl <[email protected]>
README-Windows.txt -> README-Windows.md
README-Windows.txt => README-Windows.md
drivers: pn532_i2c: Errata on i2c timing
Update Makefile.am
Fix typo in nfc.h
Fix typo in nfc.c
Update README.md
windows compiling with native tools and clang, macos catalina compiling, added travis ci build tests
There is a small typo in contrib/win32/libnfc/buses/uart.c, libnfc/drivers/acr122_usb.c, libnfc/drivers/acr122s.c, libnfc/drivers/arygon.c, libnfc/drivers/pn532_uart.c, libnfc/drivers/pn53x_usb.c. Should read `mechanism` rather than `mecanism`.
docs: fix simple typo, mecanism -> mechanism
Follow the NXP Contactless card IC rules to be compatible with Feitian new and old R502 reader.
Modify code to add compatibility of readers
Fix typo in variable name in pcsc.c
The project moved from .alioth.debian.org to .apdu.fr
This new example allows to operate on some ISO-14443-B ST25TB* and legacy SR* cards (read, write, info)
Add nfc-st25b example
Include unistd.h (required because of usleep())
Fix - assignment instead of comparison (PCSC driver)
Without this patch the cmake config assume that every UNIX system that is not APPLE is automatically a linux system. This however causes problems on FreeBSD and properly on other BSD systems. We now explicitly check if the CMAKE_SYSTEM_NAME is set to Linux.
Fix builds on FreeBSD
Same as #673 , this PR could be merged if its reviewable. Could someone rebase this code on main branch and produce atomic commits? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is just an update of the libusb10 branch.
The master branch was merged into libusb10 and the resulting merge conflicts were resolved