| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The NFC HAL in libhardware allows us to store and retrieve
product-specific settings. This patch moves two product-specific
settings to the HAL: the device port, and the usage of the i2c
workaround we had for crespo. This means configuring the port
no longer needs to be done from JNI land.
Change-Id: I2e19b6f188f808bc2f2a1f1abc28f2a6c47e6a4c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a 100ms timeout in uart_read() when reading LLC payload only.
Allow 200 retries on host.
Note that we use pn544 timeout retransmit instead of an explicit REJ
(do not use CRC_ERROR_REJ). The reason is that after a
dropped frame, a host timeout on read() is the only reliable way to recover
frame alignment, but if we send an immediate REJ then we are constantly reading
and can never regain frame alignment.
Also note that the pn544 timeout (200ms) is higher than the host (100ms). This
allows the host to abort a partial read and return to known state before the
pn544 re-transmits.
We have to turn off timeout for FW mode. Typical read time is ~100ms, but some
are 1 second+
Modify DAL & LLC layer to more reliably handle partial frames by searching for
a LLC length byte again, and log the various error paths.
Also introduce debugging tools:
debug.nfc.LOW_LEVEL_TRACES 2
Will enable LLC header decoding in the trace output.
Only read at NFC init time, use /data/local.prop to enable.
debug.nfc.UART_ERROR_RATE X
Will randomly inject errors at the uart transport, with a probability of X/1000
for every byte. 50% of those errors will be a dropped byte, 50% will be
corrupted. Recommend X=10. FW mode can't handle any errors. Can be enabled
after boot.
adb shell dumpsys nfc
Will now print the number of errors detected at the LLC layer.
Change-Id: I739ed193e3d4caa563a866b6a9d834c154917962
|
|
|
|
|
|
|
|
|
|
| |
Patch to add Secure Download Mechanism in the libnfc
This patch permit to support secure download update and
also to avoid locking states in case of download failures
Bug: 5331837
Change-Id: Ia5b6d9baf57231b0193bbbe85c88c7df557017c6
|
|\
| |
| |
| | |
Change-Id: I9807e540bad19933452f4a9f86b74021265f29cf
|
| |\
| | |
| | |
| | |
| | | |
* commit 'df82c4dd7c6d5ad232b5628edf73aa9ea3f8c2c0':
Patch to add an API to load a FW image in the libnfc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This new API permit to load the PN544 FW image when a download is needed
at boot time.
Change-Id: I2b3406d7ae0f0211123bd680ef914e9948c81eef
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Modified implementation for Felica card handling includes following:
- SENSF_REQ with RC=0x00 during discovery
- T3T NDEF detection with SC = 0x12FC
- If card is not NDEF then poll for primary SC
- NFC-F presence check with check for expected IDm
Change-Id: I8e7e83a36ec2c6e8e423df751c4bc73badb6edb5
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This event is used in the SE SetMode API to be able to enable/disable
card emulation with not writting the EEPROM area.
Change-Id: I80047d678f683c4dd364544c690440eb8d807793
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
devices are moving in to the range and moving out of the range quickly
Change-Id: I090367ad17de443c6af41c9ad507557e3eaaf7f9
|
| | | |
| | | |
| | | |
| | | | |
This reverts commit 39038381fd4a9922cdd07251ce1a0a8840681bcd.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
This event is used in the SE SetMode API to be able to enable/disable
card emulation with not writting the EEPROM area.
Change-Id: Iace438c3625f6a084c8bcc66d787a7a60d56b8f8
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added for check of first 4 bytes 0x00 before performing NDEF format of ISO15693 tag.
Updated with usage of Read one block.
Change-Id: I7a5299edb67ca70f7af5ef5a0909225c0bdf8cb0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This indicates the pn544 trim values were over-written by the faulty FW
procedure, I have a FW to reset trim values to default.
Revert this commit before ship. It should only be needed for dev phones.
Change-Id: I77d3d66b6937f181c83022a0e0791a44974c51ae
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The LLCP stack was holding onto the "I'm allowed to send" token
for the full link time-out, even if there was nothing to send. This
caused very bad round-trip delays. This fix just gives the token
back immediately if there's nothing to send.
Change-Id: Ib7bf87bd5fada2b682d28c9502b5ef010cd39815
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I94f16770d1803f89370df5a798a6c76670581a63
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In some situations, the working buffer may be full and some packets
are stored in the receive window when trying to read from upper
layer.
In this case, the receive function first reads data from the working
buffer and if possible, also tries to read data stored in the receive
window. The previous receive window data extraction algorithm could
lead to an infinite loop. With this fix, we can ensure that this won't
happen any more.
Change-Id: Iddb412213f4e9cb5fb42691bd282dbf0a21a936e
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Send failures on LLCP sockets were not dealt with at all - the transport
was just left in a state where it thought there was a pending send
and a pending callback. Before we typically only did one send and
it didn't bite us so much, but now with multiple sockets we run
into this frequently.
This really just fixes part of the problem - we should also look
if state rollbacks are necessary, as those are not done either
on send failures.
Change-Id: I484ca598e043ead835251aedaabe47d3a1da7a8f
|
|\ \ \ \
| |/ / /
|/| / /
| |/ /
| | |
| | |
| | | |
on Multiple protocol TAG
* commit '0c4a5508f22e067ab9b31581807b53406d161501':
Patch to support multiple connection on Multiple protocol TAG
|
| |\ \
| | |/
| | |
| | |
| | | |
* commit '34caeca8a5ec2aedade68a77393d0aff03f9bd72':
Patch to support multiple connection on Multiple protocol TAG
|
| | |
| | |
| | |
| | | |
Change-Id: I0f09869458ebbc6d77363338975754335569b6a6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed the SAP automatic allocation algorithm which could previously
allocate the same SAP twice in some situations (e.g.: if first socket
in socket table was bound to SAP 0x21 and second socket to 0x20, then
autobind was allocating SAP 0x21 again).
Change-Id: Ic94bbc7eaca260c69cb0ce22931e9241f459bbf5
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: 4492175
Change-Id: I7f85fc32bfaabeac8fa4da6c1509992d5523afa3
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
This is to support 32 byte FW download.
Change-Id: Id27e7d2673c37aab02d98fcbac9031af6153fea0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 294b456a3692cd69f45713bc8e9700132a0e5aec.
@#$% the pn544.
This patch to execute FW download mode with 64 byte frames has some kind of
side-affect. It causes the pn544 to send
> NFC I2C Received buffer: 0xB2 0x83 0x53 0xC9 0x6B
every 2 seconds. We do not yet know what this command means, it is undocumented.
This side affect appear permanent - even after reverting to a 512 byte FW
download, the NFC controller continues to send these messages.
Reverting ASAP to minimize damage.
Change-Id: I139a4a76c045f580df9760dc11d1c6df7b317a50
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was preventing reliable FW download.
Change-Id: I28e5cb1e5855974f51578f5d45f2c581a75b2d07
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch permit to decrease the max packet size to 64 bytes from 512 bytes and
to fix an issue faced in response_data buffer with the new packet size.
Change-Id: Ifc5cc9910b3b1a71b88624cd04c2bada7f1a413f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LLCP specification mentions that SAP numbers are allocated as follows:
- from 0x00 to 0x0F, used for well-known services
- from 0x10 to 0x1F, used for SDP advertised services
- from 0x20 to 0x3F, used for *non* SDP advertised services
This patch enforce this restriction.
Change-Id: Idd8ab4da4cfa9ad9e2dbf7eddc3c66900bcf9ff8
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
firmware events
* commit '51c0ca53011b86464dcf14aeb33944a69861a8f4':
Patch to support the new PN544 firmware events
|
| |\ \
| | |/
| | |
| | |
| | | |
* commit '967359c892ff74962b4f4243d989f447ffe4ae11':
Patch to support the new PN544 firmware events
|
| | |
| | |
| | |
| | | |
Change-Id: I6e5a976721fb52f2da30081276bb2ac15d27d186
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch enables windowing of LLC packets send from chipset to host.
The host will now wait for up to 4 LLC packets from the chipset before
sending an ACK (S-Frame RR).
Change-Id: I6a70e1d780847a104e3ec8e403593a69e222aec9
|
| | |
| | |
| | |
| | | |
Change-Id: Id1ab6a1176fe4e7c559e2348261d0902bdffb03c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
o Fix most libnfc warnings, from 360 to 18
o Make DAL_DEBUG much less verbose and more useful
o Clean up Android.mk
Done with minimal textual diff to minimize merge conflicts.
Change-Id: I918645500723ff7bb092ad9959628fcabac45bec
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also clean up some UART and I2C DAL functions.
o Re-enable FW download
o Use /system/vendor/firmware for pn544 firmware now
o Clean up read() and write() paths for both I2C and UART
o Use new sysfs entry for power and FW control on I2C platforms
o Remove userspace sleep()'s on power control toggle. They are now
done in the kernel as they should be.
Change-Id: I39956d36e02c1eb526a5c546bd3cb74edce4ff18
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
o Fix uart read() implementation
o Temporarily disable firmware update
o Rename ttySx to ttyOx (this should be properly abstracted later)
o Bug fix in #ifdef code
o Update verbose logging arguments
Change-Id: I87814e2be9ddbf5036d5586a2fd82311d56ec47f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds an interface for setting the NfcA timeout, which
is called "mifare raw" in libnfc. Also changed the default,
since it was set to only 2 ms, which is too short for most
commands. Current setting is around 600ms.
Change-Id: I00ccd85cd47a70895a3aca0f0bc34e1b0eab82c7
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
firmware cannot be loaded."
* commit '055a5f9542ba8fcfd2972111b707049732255ebe':
Prevent NFC crash-loop if firmware cannot be loaded.
|
| |\ \
| | |/
| |/|
| | |
| | | |
* commit '80c2d4090d6292a3fd2e20a18a981bc19e0a0429':
Prevent NFC crash-loop if firmware cannot be loaded.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Don't crash - just run off whatever firmware is in the chip now.
Change-Id: I0d24c13452271aed63a5a0aea236db7b1cbd432c
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | | |
Change-Id: I1a88ae0807d5ba53a635e31f3c5284906bd40ea2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Always add a ISO14443-3A device handle for tags that are
found through the A-gate. This allows the upper stack
to connect and maintain a connection to the NfcA technology,
even if the tag has IsoDep on top of NfcA. The reason this
can work is that libnfc does do the IsoDep activation in
software, and if the NfcA target is on a separate handle
this activation will not take place if you connect to
this handle.
Bug: 4195403
Change-Id: I00015e74bdadc6666c2971f8102244670a76e340
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At some points, the V(RA) socket counter (used for Receive Window
checking in connection-oriented sockets) was not properly updated,
thus leading to sometimes reject (FRMR) inbound I-frames with valid
sequence numbers.
This patch factorize the I-frame emission and update V(RA) in the
factorized code to ensure this is done at any time.
Change-Id: Ic7ef92cb136c32e524a14e31a8d350f7b165c367
|
| |
| |
| |
| |
| |
| |
| | |
This patch permit to display the NFC frames exchanged through the I2C line.
To enable that, you just need to enable LOW_LEVEL_TRACES macro.
Change-Id: Ica2ff2e6d111b76c056161ec557346f23d21ada0
|
|/
|
|
|
|
|
|
| |
Valid LLCP Service Access Point values are 0x00 to 0x3F, not 0x2F.
Before this patch, a socket with a local SAP between 0x30 and 0x3F
was unable to communicate (operation callbacks were never called).
Change-Id: Ic3f9b9f353a01e2682e28575152f171d7ec421e4
|