Set data to be sent from the VTAP in card emulation mode
You can specify the NDEF record that you want the VTAP reader to send when it is in card emulation mode.
There are two different types of NDEF record that the VTAP supports: TEXT and URI.
Use the RAW keyword to format any other required NDEF type, by supplying the hex byte values of the NDEF data.
As an alternative to specifying the NDEF data within the config.txt file, it can be provided in a separate file in the VTAP file system. This is specified by name using the FILE keyword.
The dynamic command for setting the card emulation data over a serial interface is ?card. This is used as shown in the following examples:
-
?card TEXT,Hello World! or ?card T,Hello World! to send an NDEF text record such as 'Hello World!'
-
?card URI,http://www.vtapnfc.com or ?card U,http://www.vtapnfc.com to send the URL http://www.vtapnfc.com
-
?card RAW,D101055402656e4869 or ?card R,D101055402656e4869 to send raw NDEF data D101055402656e4869
-
?card FILE,tagdata.txt or ?card F,tagdata.txt to point to a file in the VTAP file system, here tagdata.txt, which contains the NDEF data.
!VTAPconfig
CardEmulationMode=1 ; Enable card emulation at start up
; Use =0 or omit setting to disable card emulation at start up
; Use =2 to enable mixed card emulation and reader behaviour at start up
CardEmulationData=TEXT,Hello World!
; Or use CardEmulationData=T,Hello World!
; Or use CardEmulationData=Hello World!
; since data without a type is assumed to be a text record.
; If a language descriptor is omitted 'en' will be used.
; Include a two character language descriptor such as nl, fr, es, de...
; to indicate text is from another language, in this case French:
; CardEmulationData=TEXT:fr,Bonjour le monde!
!VTAPconfig
CardEmulationData=URI,http://www.vtapnfc.com
; Or use CardEmulationData=U,http://www.vtapnfc.com
!VTAPconfig
CardEmulationData=RAW,D101055402656e4869
; Or use CardEmulationData=R,D101055402656e4869
!VTAPconfig
CardEmulationData=FILE,tagdata.txt
; Or use CardEmulationData=F,tagdata.txt
; This simply points to another file, here tagdata.txt, in the VTAP file
; system which in turn contains the NDEF record to send.
!VTAPconfig
CardEmulationData=TEXT,Hello World!
; Or any other CardEmulationData= format except the FILE option
; Including !VTAPconfig at the top of the file ensures that it will be
; reloaded automatically like the main config
Note: The NDEF types 'TEXT’, ‘URI’, ‘RAW’ and ‘FILE’ are not case sensitive in any of these commands. So, for example, ‘text’ or ‘t’ can be used instead of 'TEXT' or 'T'.