Skip to content

Conversation

@kenspeckle1
Copy link

This is just an update of the libusb10 branch.
The master branch was merged into libusb10 and the resulting merge conflicts were resolved

snowy13 and others added 30 commits August 19, 2016 18:37
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 <o.schinagl@ultimaker.com>
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 <o.schinagl@ultimaker.com>
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 <oliver@schinagl.nl>
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 <oliver@schinagl.nl>
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 <oliver@schinagl.nl>
Synchronized with nfc.h with all API functions
Fixed file name "README" in cmakelists.txt
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 <oliver@schinagl.nl>
README-Windows.txt -> README-Windows.md
README-Windows.txt => README-Windows.md
drivers: pn532_i2c: Errata on i2c timing
gelotus and others added 27 commits July 8, 2020 13:26
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)
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.
@neomilium
Copy link
Member

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.