RC S380, Peer to Peer only work when the peer device is working in NFC Technology A passtive mode?

Asked by Mr.shen

   When I used RC S380 to work as peer to peer, I find that only the peer device working in NFC Technology A passtive mode it works.If the peer devices only working in NFC Technology A active mode or NFC Technology F active mode or NFC Technology F passtive mode, RC S380 do not work and the debug log is CommunicationError RF_OFF_ERROR.
   Thank you in advance for you answer.

Question information

Language:
English Edit question
Status:
Solved
For:
nfcpy Edit question
Assignee:
No assignee Edit question
Solved by:
Mr.shen
Solved:
Last query:
Last reply:
Revision history for this message
Josan Garrido (josan-niko) said :
#1

Hello,

I have the same problem when I try to use the functions: nfc-forum-dta.py and llcp-test-client.py. The device only works with the technology type A.

Thanks for your answers.

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#2

One thing for sure is that the RC-S380 does NOT support active communication mode. This is a hardware limitation.

As P2P Initiator nfcpy searches for a Target in 106kbps Type A and then transitions to 424kbps Type F (the examples have a --bitrate option to request a lower speed). I've just tested again with a Nexus 5 and it works fine.

Could you be more specific about your setup?

Revision history for this message
Mr.shen (310059703-j) said :
#3

Hello Stephen:
I use the command
$ ./beam.py -d nfc send link https://launchpad.net/nfcpy
With Mate7 and Mate7's libnfc-brcm.conf as below:
# Force P2P to only listen for the following technology(s).
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
#
# Notable bits:
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
P2P_LISTEN_TECH_MASK=0xC5

And the log as below
[main] enable debug output for 'nfc'
[nfc.clf] searching for reader on path usb
[nfc.clf.transport] using pyusb version 1.x
[nfc.clf.transport] path matches '^(usb|)$'
[nfc.clf.device] loading rcs380 driver for usb:054c:06c1
[nfc.clf.rcs380] firmware version 1.11
[nfc.clf.rcs380] package data format 1.00
[nfc.clf.rcs380] firmware version 1.11
[nfc.clf] using SONY RC-S380/S NFC Port-100 v1.11 at usb:000:001
[nfc.clf] connect('llcp',)
[nfc.snep.server] snep server bound to port 4 (MIU=1984, RW=15), will accept up
to 1048576 byte NDEF messages
[nfc.clf] connect options after startup: llcp
[nfc.clf] listen 1.000 seconds for DEP
[nfc.clf.rcs380] listen_dep for 1.000 sec
[nfc.clf.rcs380] nfca_params 01010c82d240
[nfc.clf.rcs380] nfcf_params 01fe91a78424096f0000000000000000ffff
[nfc.clf.rcs380] wait 1000 ms for activation
[nfc.clf.rcs380] wait 1 ms for activation
[nfc.dep] searching active communication mode target at 106A
[nfc.clf] sense 106A atr_req=D400D110D72053C0AE70787C0000003246666D010111020207F
F03020013040132070103
[nfc.dep] searching passive communication mode target at 106A
[nfc.clf] sense 106A
[nfc.clf.rcs380] polling for NFC-A technology
[nfc.clf.rcs380] rcvd SENS_RES 0400
[nfc.clf.rcs380] send SDD_REQ 9320
[nfc.clf.rcs380] rcvd SDD_RES 0102030404
[nfc.clf.rcs380] send SEL_REQ 93700102030404
[nfc.clf.rcs380] rcvd SEL_RES 20
[nfc.clf] found 106A sdd_res=01020304 sel_res=20 sens_res=0400
[nfc.clf] found 106A sdd_res=01020304 sel_res=20 sens_res=0400
[nfc.dep] Target does not support NFC-DEP
[nfc.clf] listen 1.000 seconds for DEP
[nfc.clf.rcs380] listen_dep for 1.000 sec
[nfc.clf.rcs380] nfca_params 0101e69b4640
[nfc.clf.rcs380] nfcf_params 01fec4615e0308540000000000000000ffff
[nfc.clf.rcs380] wait 1000 ms for activation
[nfc.clf.rcs380] 212F 0c00000000000025d400fa55150280381ec36fef0000003246666d0101
11020207ff03020013040164070103
[nfc.clf.rcs380] not a passive mode activation
[nfc.clf.rcs380] wait 174 ms for activation
[nfc.clf.rcs380] 106A 0b000300000000f025d4001749b1ffb5bb8c7c56000000003246666d01
0111020207ff03020013040164070103
[nfc.clf.rcs380] 106A rcvd ATR_REQ d4001749b1ffb5bb8c7c56000000003246666d0101110
20207ff03020013040164070103
[nfc.clf.rcs380] 106A send ATR_RES d50101fec4615e0308545354000000083246666d01011
1020207ff03020013040132070103
[nfc.clf.rcs380] CommunicationError RF_OFF_ERROR

If the libnfc-brcm.conf as below
# Force P2P to only listen for the following technology(s).
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
#
# Notable bits:
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
P2P_LISTEN_TECH_MASK=0x41
the command
$ ./beam.py -d nfc send link https://launchpad.net/nfcpy
will be ok.

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#4

There must be something else! The P2P_LISTEN_TECH_MASK should only affect the behavior when nfcpy is sensing for a target. In the log output this is after "[nfc.dep] searching passive communication mode target at 106A". The further log lines show that the target responds to 106A discovery with a SEL_RES of 0x20 - this means that a Type A Tag (Card or HCE) was found and P2P is not possible. The SEL_RES value must be 0x40 for a P2P device or 0x60 for P2P+HCE.

The log after "[nfc.clf] listen 1.000 seconds for DEP" shows first a 212F active mode activation from your Mate 7 - this is ignored by nfcpy because RC-S380 can't do active mode. The following 106A passive mode activation is responded but then the phone deactivates the RF field, could be because the overall time was to long (the -reltime option would show some timing info) or it thinks to be in active mode.

Revision history for this message
Mr.shen (310059703-j) said :
#5

I have got it.Thank you Stephen.