NFC AND THE VEHICLE. TESTING THE LINUX NFC STACK. BMW Car IT GmbH - - PowerPoint PPT Presentation

nfc and the vehicle
SMART_READER_LITE
LIVE PREVIEW

NFC AND THE VEHICLE. TESTING THE LINUX NFC STACK. BMW Car IT GmbH - - PowerPoint PPT Presentation

Timo Mller NFC AND THE VEHICLE. TESTING THE LINUX NFC STACK. BMW Car IT GmbH NEARD FIELD COMMUNICATION. WHAT IS IT? Easy connections, quick transactions, and simple data sharing. NFC-Forum.org Fast connection setup Contactless


slide-1
SLIDE 1

Timo Müller

NFC AND THE VEHICLE.

TESTING THE LINUX NFC STACK.

BMW Car IT GmbH

slide-2
SLIDE 2

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 2

NEARD FIELD COMMUNICATION. WHAT IS IT?

„Easy connections, quick transactions, and simple data sharing.“

NFC-Forum.org

  • Fast connection setup
  • Contactless
  • Short range
  • Communication with passive

and active devices or tags

  • Compatible with RFID
slide-3
SLIDE 3

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 3

NFC AND THE VEHICLE. WHAT TO DO WITH NFC IN THE CAR?

  • Connect Bluetooth and Wireless

Devices by a single touch

  • Touch the car to unlock or start
  • Transfer data like navigation

destinations or contacts

  • Wireless charging
slide-4
SLIDE 4

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 4

NFC AND GENIVI. HOW ABOUT COMPLIANCE?

  • APIs of a NFC stack are defined in

GENIVI

  • Part of the GENIVI compliance since

release 5.0 (07. Oct 2013)

  • NFC kernel subsystem and neard

are GENIVI compliant

slide-5
SLIDE 5

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 5

LINUX NFC. GENERAL CAPABILITIES.

  • Reading and Writing Tags
  • Card Emulation
  • Peer-to-Peer Connections (LLCP-based Transports)
  • Handover with Bluetooth and WiFI
  • Supported Hardware:
  • NXP pn544, pn533, pn532
  • TI nfcwilink
  • IS microread
slide-6
SLIDE 6

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 6

LINUX NFC. TRANSFERING DATA.

  • Simple NDEF Exchange Protocol

(SNEP)

  • NDEF Push Protocol (NPP)
  • Personel Health Device

Communication (PHDC)

slide-7
SLIDE 7

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 7

LINUX NFC. CONNECTION HANDOVER.

Establish a Bluetooth or WiFi connection

  • By touching a device

(Negotiated Handover)

  • By touching a tag

(Static Handover)

slide-8
SLIDE 8

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 8

LINUX NFC. SECURE ELEMENT API.

  • Released with Kernel Release 3.13
  • Netlink API for
  • Discovering attached Secure Elements
  • Enabling and Disabling of Secure Elements
  • Currently only supported by the pn455
  • Secure Element Daemon with D-Bus APIs will be part of neard
slide-9
SLIDE 9

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 9

LINUX NFC. GENERAL ARCHITECTURE.

NFC Hardware NFC Hardware NFC Drivers NFC Drivers NFC Netlink NFC Netlink NFC Core NFC Core AF_NFC Sockets AF_NFC Sockets neard neard Application Application Application Application D-Bus API D-Bus API

User space Kernel space

Source: https://01.org/linux-nfc/documentation

slide-10
SLIDE 10

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 10

LINUX NFC. D-BUS API.

adapter adapter /nfc0 /nfc0 tag tag /nfc0/tag0 /nfc0/tag0 device device /nfc0/device0 /nfc0/device0 record record /nfc0/device0/record0 /nfc0/device0/record0 record record /nfc0/tag0/record0 /nfc0/tag0/record0 agent manager agent manager / / NFC Application NFC Application (NDEF agent) (NDEF agent) ConnMan ConnMan (Handover agent) (Handover agent) BlueZ BlueZ (Handover agent) (Handover agent)

Source: https://01.org/linux-nfc/sites/default/files/documentation/nfc-genivi-amm-2013q1-open.pdf

slide-11
SLIDE 11

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 11

LINUX NFC. LET'S GO FOR A SPIN.

slide-12
SLIDE 12

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 12

LINUX NFC. KERNEL ARCHITECTURE.

pn533 pn533 wilink wilink HCI HCI NCI NCI PROTO_LLCP PROTO_LLCP Netlink socket Netlink socket NFC Core NFC Core LLCP LLCP PROTO_RAW PROTO_RAW SHDLC SHDLC pn544 pn544 µread µread

AF_NFC

Source: https://01.org/linux-nfc/documentation

slide-13
SLIDE 13

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 13

TESTING THE LINUX NFC STACK. MANUAL TESTING.

  • Python test scripts for
  • Connection Handover
  • PHDC Manager
  • SNEP Agent
  • Communication via D-Bus APIs
  • Monitor Traffic with nfctool and

monitor-near

slide-14
SLIDE 14

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 14

TESTING THE LINUX NFC STACK. USING THE LOOPBACK DEVICE.

  • NFC_SIM Kernel Driver
  • Two virtual NFC Devices are created

that act as loopback devices

  • Peer-to-Peer Connections can be

tested.

vNFC Device 1 vNFC Device 1 NFC Core NFC Core vNFC Device 2 vNFC Device 2 neard neard Test Application 1 Test Application 1 Test Application 2 Test Application 2 NFC-DEP

slide-15
SLIDE 15

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 15

TESTING THE LINUX NFC STACK. WHAT'S MISSING?

  • Testing NFC R/W Interface
  • Testing Card Emulation Modes

vNFC Device vNFC Device NFC Core NFC Core neard neard Test Application Test Application Test Tag Test Tag

ISO-DEP (Listen) ISO-DEP (Poll) Tag Type 1-4

Test Device Test Device (Card Emulation) (Card Emulation)

slide-16
SLIDE 16

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 16

PROPOSAL FOR TESTING WITHOUT HARDWARE. NFC CONTROLLER INTERFACE.

NFCEE Protocol RF Protocol NCI NCI Control RF Interface NFCEE Interface Remote NFC Interface Remote NFC Interface NFC Controller NFC Controller Device Host Device Host NFC NFC Exection Environment Exection Environment

NFC Forum Device

Source: NFCFourm-TS-NFC-1.0 2012-11-06

slide-17
SLIDE 17

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 17

PROPOSAL FOR TESTING WITHOUT HARDWARE. A VIRTUAL NFC CONTROLLER.

  • Create a complete virtual NCI Device
  • Emulate NCI Data Packets based on

RF Protocols

  • Tag Type 1-4
  • ISO-DEP (Poll and Listen)
  • NFC-DEP
slide-18
SLIDE 18

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 18

NFC OVER SOMEIP. VIRTUAL NFC CONTROLLER AND REAL HARDWARE.

  • NFC Reader is somewhere in the

vehicle connected to an ECU

  • ECU allows opening or starting the

car when the Head-Unit is off

  • Remaining NFC functionality is

handled by the Head-Unit

vNCI Device vNCI Device NFC Core NFC Core neard neard Application Application ECU ECU NFC Reader NFC Reader

SOMEIP CAN/LIN/MOST Head-Unit

slide-19
SLIDE 19

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 19

NFC OVER SOMEIP. VIRTUAL NFC CONTROLLER AND REAL HARDWARE.

  • Send NCI control and data packets
  • ver SOMEIP
  • Expose the virtual NCI device as a

virtual networking adapter

  • Route the IP packets containing NCI

data via iptables or nftables

ECU ECU SOMEIP vNCI Device vNCI Device NFC Core NFC Core neard neard Application Application

Head-Unit

Daemon Daemon Application Application

slide-20
SLIDE 20

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 20

THANK YOU VERY MUCH FOR YOUR INTEREST.

slide-21
SLIDE 21

2014-02-02 NFC in the Car, BMW Car IT GmbH Page 21

RESOURCES.

nfc-next:

git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next.git

neard:

git://git.kernel.org/pub/scm/network/nfc/neard.git

01.org/linux-nfc www.nfc-forum.org www.press.bmwgroup.com

NFCForum-TS-NCI-1.0: NFC Controller Interface (NCI) Specification, V1.0 November 2012 Samuel Ortiz: The Linux NFC subsystem, 2013

https://01.org/linux- nfc/sites/default/files/documentation/nfc-genivi-amm- 2013q1-open.pdf

Samuel Ortiz: Mobile Payments with Linux, 2013

https://01.org/linux- nfc/sites/default/files/documentation/mobile_payments- linuxcon.pdf