nfc and the vehicle
play

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


  1. Timo Müller NFC AND THE VEHICLE. TESTING THE LINUX NFC STACK. BMW Car IT GmbH

  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 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 2

  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 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 3

  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 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 4

  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 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 5

  6. LINUX NFC. TRANSFERING DATA. • Simple NDEF Exchange Protocol (SNEP) • NDEF Push Protocol (NPP) • Personel Health Device Communication (PHDC) NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 6

  7. LINUX NFC. CONNECTION HANDOVER. Establish a Bluetooth or WiFi connection • By touching a device (Negotiated Handover) • By touching a tag (Static Handover) NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 7

  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 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 8

  9. LINUX NFC. GENERAL ARCHITECTURE. Application Application Application Application D-Bus API D-Bus API neard neard User space Kernel space NFC Netlink NFC Netlink AF_NFC Sockets AF_NFC Sockets NFC Core NFC Core NFC Drivers NFC Drivers NFC Hardware NFC Hardware Source: https://01.org/linux-nfc/documentation NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 9

  10. LINUX NFC. D-BUS API. ConnMan ConnMan (Handover agent) (Handover agent) NFC Application agent manager NFC Application agent manager (NDEF agent) / (NDEF agent) / BlueZ BlueZ (Handover agent) (Handover agent) adapter adapter /nfc0 /nfc0 tag device tag device /nfc0/tag0 /nfc0/device0 /nfc0/tag0 /nfc0/device0 record record record record /nfc0/tag0/record0 /nfc0/device0/record0 /nfc0/tag0/record0 /nfc0/device0/record0 Source: https://01.org/linux-nfc/sites/default/files/documentation/nfc-genivi-amm-2013q1-open.pdf NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 10

  11. LINUX NFC. LET'S GO FOR A SPIN. NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 11

  12. LINUX NFC. KERNEL ARCHITECTURE. Netlink socket PROTO_LLCP PROTO_RAW Netlink socket PROTO_LLCP PROTO_RAW LLCP LLCP AF_NFC NFC Core NFC Core HCI HCI NCI NCI pn533 pn533 SHDLC SHDLC wilink µread pn544 wilink µread pn544 Source: https://01.org/linux-nfc/documentation NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 12

  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 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 13

  14. TESTING THE LINUX NFC STACK. USING THE LOOPBACK DEVICE. • NFC_SIM Kernel Driver Test Application 1 Test Application 2 Test Application 1 Test Application 2 • Two virtual NFC Devices are created that act as loopback devices neard neard • Peer-to-Peer Connections can be tested. NFC Core NFC Core vNFC Device 1 vNFC Device 2 vNFC Device 1 vNFC Device 2 NFC-DEP NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 14

  15. TESTING THE LINUX NFC STACK. WHAT'S MISSING? • Testing NFC R/W Interface Test Application Test Application • Testing Card Emulation Modes neard neard NFC Core NFC Core vNFC Device vNFC Device ISO-DEP (Poll) ISO-DEP (Listen) Tag Type 1-4 Test Device Test Device Test Tag Test Tag (Card Emulation) (Card Emulation) NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 15

  16. PROPOSAL FOR TESTING WITHOUT HARDWARE. NFC CONTROLLER INTERFACE. NFC Forum Device Device Host Device Host Interface Interface Control NFCEE RF NCI NCI NFCEE NFC NFC NFC Controller NFC Controller Protocol Exection Environment Exection Environment Protocol RF Remote NFC Interface Remote NFC Interface Source: NFCFourm-TS-NFC-1.0 2012-11-06 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 16

  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 NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 17

  18. NFC OVER SOMEIP. VIRTUAL NFC CONTROLLER AND REAL HARDWARE. • NFC Reader is somewhere in the Head-Unit vehicle connected to an ECU NFC Reader Application NFC Reader Application • ECU allows opening or starting the car when the Head-Unit is off neard neard • Remaining NFC functionality is CAN/LIN/MOST handled by the Head-Unit NFC Core NFC Core ECU vNCI Device ECU vNCI Device SOMEIP NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 18

  19. NFC OVER SOMEIP. VIRTUAL NFC CONTROLLER AND REAL HARDWARE. • Send NCI control and data packets Head-Unit over SOMEIP ECU ECU Daemon Application Application Daemon Application Application • Expose the virtual NCI device as a virtual networking adapter neard neard • Route the IP packets containing NCI NFC Core data via iptables or nftables NFC Core vNCI Device vNCI Device SOMEIP NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 19

  20. THANK YOU VERY MUCH FOR YOUR INTEREST. NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 20

  21. RESOURCES. nfc-next: 01.org/linux-nfc git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next.git www.nfc-forum.org neard: www.press.bmwgroup.com git://git.kernel.org/pub/scm/network/nfc/neard.git Samuel Ortiz: The Linux NFC subsystem, 2013 NFCForum-TS-NCI-1.0: NFC Controller https://01.org/linux- Interface (NCI) Specification, V1.0 November nfc/sites/default/files/documentation/nfc-genivi-amm- 2012 2013q1-open.pdf Samuel Ortiz: Mobile Payments with Linux, 2013 https://01.org/linux- nfc/sites/default/files/documentation/mobile_payments- linuxcon.pdf NFC in the Car, BMW Car IT GmbH 2014-02-02 Page 21

Recommend


More recommend