Home

Open NFC - PC Edition - Examples

image

Contents

1. Open NFC PC Edition Examples User s Manual Document Type Manual Reference MAN_NFC_0901 099 Version 1 5 14206 Release Date Sept 26 2011 File Name MAN_NFC_0901 099 Open NFC PC Edition Examples User s Manual pdf Security Level General Business Use Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 2 22 Date Sept 26 2011 User s Manual Generali B siness Use Ref MAN NFC 0901 099 v1 5 14206 Disclaimer This document is licensed under the Creative Commons Attribution 3 0 license http creativecommons org licenses by 3 0 You may use the content of this document in any way that is consistent with this license and if you give proper attribution http www open nfc org license html attribution Copyright 2009 2011 Inside Secure Open NFC and the Open NFC logo are trademarks or registered trademarks of Inside Secure Other brand product and company names mentioned herein may be trademarks registered trademarks or trade names of their respective owners Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 3 22 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 History Veronae comments 0 1 Jan 5 2009 First Draft 1 0 Feb 6 2009 First Release 1 1 Feb 1 2010 Changing Configuration String ac
2. Pase 12 22 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 2 Executing the test firmware update example 4 2 1 Line syntax Type a command line with the following syntax Test firmware update exe TCP Port FirmwareBinaryFile where Parameter Presence Description FirmwareBinaryFile MANDATORY Valid name of a filename containing a valid firmware in binary form 4 2 2 Behavior The binary file is downloaded to the target No user interaction is needed The progression of the download is indicated with a completion percentage refreshed every 100 ms ranging from 0096 to 10096 4 2 3 Notes e If the firmware update fails an error is returned Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 13 22 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 3 Executing the test ndef url example 4 3 1 Line syntax Type a command line with the following syntax Test ndef url exe TCP Port url lt URL gt virtualurl lt URL gt where Parameter Presence Description url lt URL gt OPTIONAL Writes the URL to a tag virtualurl lt URL gt OPTIONAL Simulate an URL 4 3 2 Behavior In reader mode the application takes no more parameters The application waits for any type
3. 87 One line corresponds to one APDU to send Line starting with is interpreted as non printable comments Line starting with is interpreted as printable comments Tests ends on end of file except if loop option is given The application waits for a Card with 7816 4 Connection Property When such card is detected the application reads the scenario file Each time an APDU is found in the scenario file it is sent to the card and the result of the exchange so C APDU R APDU error code are displayed 4 8 3 Notes Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 1922 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 9 Executing the test P2P example 4 9 1 Line syntax Type a command line with the following syntax Test p2p exe TCP Port No more parameter is required 4 9 2 Behavior The application is designed to be run on two NFC devices to be connected using a P2P connection Follow the menu options proposed to A Display P2P stack configuration B Configure the P2P stack C Establish P2P link D Display P2P link properties E Release P2P link F Create a connectionless socket G Performs an URI lookup H Send data through a connectionless socket I Cancel send data through a connectionless socket J receive data through a connectionless socket K Cancel receive data
4. eds 22 Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 92 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 1 Introduction This document describes the examples delivered with Open NFC The applications that can be generated are simple command line executables illustrating the Open NFC functionalities The following examples are available Example name Description test 7816 apdu This example exchanges APDUS with a 7816 4 smartcard test firmware update This example updates the NFCC Controller firmware test ndef url This example demonstrates how to e read and write URL in NDEF Tags Type 2 Type 4 A Type 4 B Type 5 and Type 6 e simulate a Type 4 tag containing an URL test ndef vcard This example demonstrates how to e read and write a vcard in NDEF Tags Type 2 Type 4 A Type 4 B Type 5 and Type 6 e simulate a Type 4 tag containing a vcard test p2p This example demonstrates P2P usage test production This example runs production tests test properties This example displays the NFCC controller properties test reader This example detects a card or a NDEF tag and displays the tag s NDEF contents test se This example demonstrates usage of an embedded Secure Element test topaz This example demonstrates usage of Type 1 Tag Check document ver
5. loops thread e f your programs needs arguments o verify the arguments and syntax inside the function VerifyTestConditions o Add help for these arguments inside the function GetSpecificTestSyntax e Add your test inside the function LaunchTest 5 2 Test projects structure The test projects are all bases on the same structure consisting in e Atest core e Atest specific part The diagram below shows the interactions between the test core the test specific and the Open NFC library WBasiclnit WNFCCOControllerGetMode WReaderErorEventRegister Test Core i a StopApplication LaunchTest Tools testGetCurrentTime DumpHexaBytes lt Test Dependant gt SE a a Test Specific Figure 1 Test projects structure Check document version before use Copyright 2009 2011 Inside Secure
6. through a connectionless socket L Destroy a connectionless socket M Create a connection oriented client socket N Create a connection oriented server socket O Create a connection oriented client server socket P establish a connection Q display connection properties R send data through a connection S cancel send data through a connection T receive data through a connection U cancel receive data through a connection V release a connection W Destroy a connection oriented socket X exit 4 9 3 Notes Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Page 20 22 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 10 Executing the test se example 4 10 1 Line syntax Type a command line with the following syntax test se exe TCP Port No more parameter is required 4 10 2 Behavior The application demonstrates the API usage for controlling an embedded Secure Element The application uses 1 WJupiterSEApplyPolicySync 2 WSEOpenConnection to dialog with the SE 3 W7816ExchangeAPDU to exchange APDUS with the SE W7816GetATR to read the ATR 4 WBasicCloseHandleSafe 5 WSESetPolicy WJupiterSEApplyPolicySync Both to control SE access to the RF 6 WSEMonitorEndOfTransaction WSEGetTransactionAID WJupiterSEGetAID To listen to transcations with an external reader 7 WSEGetlnfos to retrieve SE info
7. 0 subproject Example reading and writing to NFC forum tags with a Virtual Card e TEST PRODUCTION folder win32 test production c and test production vcproj source and Visual C 2010 subproject Example running production tests e TEST PROPERTIES folder win32 test properties c and test properties vcproj source and Visual C 2010 subproject Example displaying the NFCC Controller properties e TEST READER folder win32 test reader c and test reader vcproj Example detecting a card or a NDEF tag and displaying the tag s NDEF contents source and Visual C 2010 subproject e TEST SE folder win32 test se c and test se vcproj Example demonstrating usage of an embedded Secure Element source and Visual C 2010 subproject e TEST TEMPLATE folder win32 test template c and test template vcproj Template for adding a new example source and Visual C 2010 subproject e TEST TOPAZ folder win32 test topaz c and test topaz vcproj Example demonstrating usage of Type 1 Tag source and Visual C 2010 subproject e win32 test example sln win32 test example vcproj The solution file and the project file required to rebuild the examples with MS Visual C 2010 debug The pre build files of the application in debug configuration Jrelease Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 8 22 Date Sept 26 2011 User s Manual Gerieral Business Use Ref MAN NFC 0901 099 v1 5 14
8. 206 The pre build files of the application in release configuration Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 97 Date Sept 26 2011 User s Manual Gerieral Business Use Ref MAN NFC 0901 099 v1 5 14206 3 Rebuilding the Examples The following tools are validated to recompile the Windows application example e Visual C 2010 Express Edition The Express edition is a free version of Visual C 2010 This tool may by downloaded from Microsoft MSDN web site The usage of these tools is not compulsory Other Win32 compilation tool chains may be used to recompile the Windows projects but they are not validated for this delivery To rebuild all the executables execute the following steps 1 Double click on the solution file sIn to open the project in the MS Visual C IDE 2 Select the build configuration Debug or Release 3 Inthe Build menu execute rebuild solution To build only one executable file execute the following steps 1 Double click on the solution file sIn to open the project in the MS Visual C IDE 2 Select the build configuration Debug or Release 3 Select the subproject in the projects list 4 Inthe Build menu execute rebuild lt project name gt Each project is based on e acore test file win32 test core c e aspecific test file Check document version before use Copyright 2009 2011 Inside Secure O
9. YIMAK as os a ta eat ei celeste el Sater eee teenies Saat tme 13 Oi IBBIAVIOE tpt batches gaan Aka EE E litt ua d ipla cti an Retard a ius 13 2 3 92 LINDIBSIU iud tete nee toten Di eet eu dts be use E dE Du ep Meo e uad Du cR RS uen dun 13 4 4 Executing the test ndef vcard example cccceceeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 14 BAT Eine Sy MAK UP P 14 4 42 Behavior PPP 14 BAS NOS ya A E tae EEA E EREA R E RERE 14 4 5 Executing the test properties example cccccccccccccccccccececceeeeeeeeeeeeeeeeeeess 15 ABA Hine Sy MAX eeuenedeine teen a a a ene a e io ra 15 4 5 2 BehiaviOI cuui o ae E 15 S MS A 0117 Mere e Mc RD vU rv po IR n 15 4 6 Executing the test production Cxample ccccccccseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeenaes 16 46 1 LIME SY MAK oie p erede e qe ed eode dedic te pu PA eere eee 16 2 6 2 IBEHAVIOl san Goo Arpa en hd Anm pd Me deus 16 26 3 NOIOS piene dle plus nk a ee th orphan Upland ai in arf cdita LE na 16 4 7 Executing the test reader example ccccccccecceeeeeeeeeeeeeeeeeeeeaeeneeeeeeeeeeenaea 17 21 Jnesyniax uoce oe eia E eM 17 Mate BG NAVIOR ossa aeta altes nb d esten 2 tera a ae cad 17 47 3 01 CE DE 17 4 8 Executing the test 7816 apdu example ccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaea 18 LE A NEL SY MAX mm 18 4 82 SBGNAWIOR icira obest ele Pam deo baeule fob atu A acabo tu Peta ud fedi su d eiut ad edis 18 4 8 37 NO GS Li b
10. cation waits for any type of card or NDEF tag If a Card is detected some information about the card is displayed when available depends on the card detected e Card Protocol 14443 3 15693 3 e Card Type Picopass32K Mifare UL If a NDEF Tag is detected some information about the tag is displayed like when available depends on the tag detected e Tag Type Type1 Type2 Card Type Picopass32K Mifare UL Lock status Remaining space Serial number Then user interaction is needed and depending on its selection e M gt The NDEF messages on the Tag are ALL read applies only if a Tag has been detected e Y continue Card Tag Detection e Q quit the test 4 7 3 Notes e If the detected tag is not a well formatted tag an error is returned Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pee 1822 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 8 Executing the test 7816 apdu example 4 8 1 Line syntax Type a command line with the following syntax Test 7816 apdu exe TCP Port lt testAPDUFileName gt where Parameter Presence Description testAPDUFileName MANDATORY Valid name of a filename containing a script for sending APDUs 4 8 2 Behavior The application opens the APDU Test file It must contain hexadecimal characters with 2 digits OD OA 07
11. cordingly to Connection Center syntax to connect to a NFCC Device Adding P2P examples Correcting ndef url and ndef vcard description 1 2 Dec 24 2010 Adding SE and Topaz examples Release for Open NFC 4 1 1 3 Jan 15 2011 Release for Open NFC 4 2 1 Precisions for Client Server new model used Correct description of P2P and SE tests 1 4 May 20 2011 New document template 1 5 Sept 26 2011 Precision about need for Visual C 2010 Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 42 Date Sept 26 2011 User s Manual Gerieral Business Uso Ref MAN NFC 0901 099 v1 5 14206 Summary of Contents 1 til gore iia To vB RE TS 6 2 je 7 3 Rebuilding the Examples 2 c rrr trien tan rna oua tin du cna ran mnnn 9 4 Executing the Exampl6S i oiii coc pau adul ua css CUR CORR VN a QUE ECO ES DOLAR ERAN RN SN EE 10 4 1 Common to all tests uidi tati D URMER M ABIRU VERSER IUE VEUDER DU CBE VERE RU UN 10 4 2 Executing the test firmware update example cccccceeeeeeeeeeeeeeeeeeeeeeeaes 12 42 1 Line syntax uoo ete i upra pa etate ictu c e ve tust k us 12 42 227 NAVIN iA AA br en d Md dd 12 242 3 NOIES actori tnnt s n lec m ten lpdte leo cp M c D aa 12 4 3 Executing the test ndef url example ccccccceeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeea 13 431 PING S
12. for any type of tag containing a vcard When such a tag is detected the default vcard viewer is opened with the vcard If the command line is then vcard followed by the name of a vcard file vcf the application waits for any type of tag and tries to write the content of the vcard in the first tag detected If the command line is then virtualvcard followed by the name of a vcard file vcf the application simulates a tag containing the vcard content If a reader is presented in front of the NFC Controller antennae the virtual tag can be read 4 4 3 Notes e If the detected tag is not a well formatted tag an error is returned e In reader mode if the tag is well formatted but the content is not a vcard an error is returned e If the tag is locked for writing an error is returned in write mode Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 1922 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 5 Executing the test properties example 4 5 1 Line syntax Type a command line with the following syntax Test read properties exe TCP Port No more parameter is required 4 5 2 Behavior The test interrogates the NFCC Controller and displays the properties implemented 4 5 3 Notes e If the command fails an error is returned Check document version before use Copyright 2009 2011 Inside Sec
13. oe eot od t RR Un dH DOR e eon ql doge eU c aic a a da dE E 18 4 9 Executing the test P2P example cccccceeeeeceeeeeeseeeeeeeeeeeeeeaeaseeeeeeeeeeeenen 19 4 Ine Syn aC oec ec RE c EDI Renate treu Det dette a e Sete 19 4 9 2 BehaVIOE uis ibo RU en s ERN RR ARA FRA FA ERE E E U AE QNA PA EGE GARE MR ATA teks 19 42 9 37 UNGIOS toC oa nist dubites Re sin enidiS EN 19 4 10 Executing the test se example eeeeeeeessssseseeseeee eene eene 20 4101 LING SY MAX em 20 4 10 2 Behavior sc sea dene n FERRE RO e ERRAT cause ons caancscs saan edcando tb aaige adaanaesaaaese neamaaa nals 20 4 10 3 INOS ui oa mi pad pon LEVER RT Pe ERE NUR Dont LEV do NETE EOE OEE E 20 Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 52 Date Sept 26 2011 User s Man ual Ref MAN NFC 0901 099 v1 5 14206 4 11 Executing the test topaz ExaMple ccccccceeeeceaeeeeeeeeeeeeeeeeeeeaaeeseeeeeeeeeenaea 21 41 1 Eine synak uiu ed ERR ec cx natu eta E iet eee vu tuticed 21 SN SCAM ANION sacs ev CEU 21 41153 TINOIBSS oninia cent dtt asbl ate rdiet oe a alan ED cde 21 5 Building a new Example cccecceee ecce eee e eere eese nnne 22 Bll Culdellties eese Exe VE a AE MENOS E EVE AE RENE Y NE VENE AE EAE NE RE 22 5 2 Test projects SIUCIUIIG aou oon oo labe oec utc d eto S
14. of tag containing an URL When such a tag is detected the default browser is opened with the URL If the command line is then url followed by an URL value the application waits for any type of tag and tries to write the URL in the first tag detected If the command line is then virtualurl followed by an URL value the application simulates a tag containing the URL If a reader is presented in front of the NFC Controller antennae the virtual tag can be read 4 3 3 Notes e If the detected tag is not a well formatted tag an error is returned e n reader mode if the tag is well formatted but the content is not an URL an error is returned e If the tag is locked for writing an error is returned in write mode Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 1422 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 4 Executing the test ndef vcard example 4 4 1 Line syntax Type a command line with the following syntax Test examplel exe lt TCP Port vcard lt vcard file vcf gt virtualvcard lt vcard file vcf gt where Parameter Presence Description veard lt file gt OPTIONAL Writes a vcard to a tag virtualvcard lt file gt OPTIONAL Simulate a virtual card 4 4 2 Behavior In reader mode the application takes no more parameters The application waits
15. pen NFC PC Edition Examples Pase 10 22 Date Sept 26 2011 User s Manual Ganeral Business Use Ref MAN NFC 0901 099 v1 5 14206 4 Executing the Examples 4 1 Common to all tests To execute an example execute the following steps 1 Connect the mother board to the PC with the USB cable 2 Start the SERVER For this open a first console window and type a command line with the following syntax server porting exe NFCC Device TCP port for example for a simulator usage server porting exe cc nfcc hal 12345 3 Start a CLIENT test application For this open a second console window and type a command line with the following syntax test exe TCP port Test Specific Parameters for example test readedr exe 12345 Behavior of the server porting exe The server is a simple command line executable with arguments indicating the execution modes The first argument must indicate the URI of a NFCC Device controlled by the Connection Center It can be either e the NFC Controller Evaluation Board URI to use is cc nfcc_ i2c e the NFC Controller Simulator URI to use is cc nf cc hal The second argument must indicate the TCP port where the server can be reached Typically you should use a value above 1024 not allocated by another program Behavior of the lt test gt exe The application example is a simple command line executable with arguments indicating the execution modes The first argumen
16. rmation 4 10 3 Notes Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Page 21 22 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 4 11 Executing the test topaz example 4 11 1 Line syntax Type a command line with the following syntax test topaz exe TCP Port No more parameter is required 4 11 2 Behavior The application waits for a TOPAZ card tag When a Topaz Card is detected some information about the card is displayed Then using the Type1Chip raw API some data is written to the card and the result of the write operation is displayed Then user interaction is needed and depending on its selection e Y continue TOPAZ Detection e Q quit the test 4 11 3 Notes e lfacard or tag of a different technology is presented no error is returned The tests starts only detection of TOPAZ cards Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Page 22 22 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 5 Building a new Example 5 1 Guidelines In order to add a new test for example to play with a Open NFC functionality you should follow the following steps e Copy the Test Template project that does nothing in fact except the core functions starting Open NFC creating the event
17. sion before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 722 Date Sept 26 2011 User s Manual Gerieral Business Uso Ref MAN NFC 0901 099 v1 5 14206 2 Contents The examples delivery includes the source files of the examples the project files to rebuild the application the pre compiled executable file and this documentation The delivery contains the following file and folders e MAN NFC 0901 099 Open NFC Core Edition Examples User Manual pdf The example documentation this file e open nfc h The C header file of the Open NFC API e porting types h The Win32 definition of the C types used by the Open NFC API e monolithic porting lib The library require to link with the Open NFC DLL e Win32 test core c win32 test core h The core source file and header of the examples e TEST 7816 APDU folder win32 test 7816 apdu c and test 7816 apdu vcproj source and Visual C 2010 subproject Example exchanging APDUS with a 7816 4 smartcard e TEST FIRMWARE UPDATE folder win32 test firmware update c and test firmware update vcproj source and Visual C 2010 subproject Example updating the NFCC Controller fimware e TEST NDEF URL folder win32 test ndef url c and test ndef url vcproj source and Visual C 2010 subproject Example reading and writing to NFC forum tags with an URL e TEST NDEF VCARD folder win32 test ndef vcard c and test ndef vcard vcproj Source and Visual C 201
18. t must indicate the TCP port number to use for connection to the server server porting exe The next parameters if needed are test dependant They are detailed in the following chapters for each test provided Notes concerning the server porting exe e the NFC HAL stack is started at each execution of the example application Thus the whole boot procedure of the NFC Controller is executed before receiving the first command of any example application e If the NFC Controller is not switched on at startup an error is returned Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 11 22 Date Sept 26 2011 User s Manual General Business Use Ref MAN NFC 0901 099 v1 5 14206 e If the NFC Controller firmware or the NFC Controller Loader are not validated for the Open NFC version see Open NFC requirements in the release notes document an error is returned e Only one instance of server porting exe is allowed to run on one instance of USB mother board Notes concerning the examples e Several test examples can be started on the same server simultaneously This can be usefull to launch for example card emulation test in parallel with a reader test e All examples will use the same TCP port number that must be the TCP port declared when launching the server Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples
19. ure Open NFC PC Edition Examples Pase 16 22 Date Sept 26 2011 User s Manual Gereral Business Use Ref MAN NFC 0901 099 v1 5 14206 4 6 Executing the test production example 4 6 1 Line syntax Type a command line with the following syntax Test production tests exe TCP Port No more parameter is required 4 6 2 Behavior The production tests are run depending on user selection 1 Starting Test RF ON RF state 2 Starting Test RF ON to stop the emission 3 Starting Test SWP stop any test on SWP pin 4 Starting Test SWP Force internal loopback on SWP 5 Starting Test SWP Force SWP pin to ZERO 6 Starting Test RF Continuous 1S014443A speed 106kbps Full modulation 7 Starting Test Normal RF I15014443B speed 106kbps 8 Starting Test Reverse RF I8014443B speed 106kbps 9 Starting Test Standby R Reset the MicroRead exit standby or end continuous RF test Q to exit the test program 4 6 3 Notes e If the firmware update fails an error is returned Check document version before use Copyright 2009 2011 Inside Secure Open NFC PC Edition Examples Pase 17 22 Date Sept 26 2011 User s Manual Gerieral Business Use Ref MAN NFC 0901 099 v1 5 14206 4 7 Executing the test reader example 4 7 1 Line syntax Type a command line with the following syntax Test reader exe TCP Port No more parameter is required 4 7 2 Behavior The appli

Download Pdf Manuals

image

Related Search

Related Contents

TEST - Chauvin Arnoux  TECHNICAL MANUAL DISTELL FISH FRESHNESS  Bedienungsanleitung Sony  congstar komplett Box  Samsung SGH-S300M manual do usuário  Behringer UMX490 Musical Instrument User Manual  Télécharger ici le bulletin n° 39  User manual  Planner 710 Canavieira (BR)  I-7531 User Manual  

Copyright © All rights reserved.
Failed to retrieve file