Logo Logo en
  • iRidi Pro
    Основные компоненты
    • Приложение i3 Pro
    • iRidi Pro Server
    • iRidi Studio
    • iRidium studio v. 1.3.8 (устаревшая версия)
    Java Script в iRidi
    • Руководство
    • Справочник
    • Примеры
    • JS драйвера
    другие
    • Личный Кабинет
    • iRidium Cloud
    • iRidium Transfer
    • Push-уведомления
    • Лучшая практика
    Лицензирование
    • Лицензирование и передача проекта
    • Оффлайн-лицензирование
    • Активация iRidi Pro Server
  • Продукты
    i3 lite
    • Приложение i3 lite
    • Регистрация и лицензирование
    • Сервер
    • Модули
    KNX Home Server
    • Приложение i3 KNX
    • KNX Home Server
    BUS77 HOME SERVER
    • Приложения Bus77 Home и Bus77 Lite
    • Bus77 Home Server
    Решения
    • BYOD - решение для гостиниц
    • Портал жителя - решение для МКД
    iRidi SCADA
    • iRidi SCADA
  • Bus77
    НАСТРОЙКА BUS77
    • Основы Bus77
    • Приложения Bus77 Home и Bus77 Lite
    • Работа с драйвером Bus77 в iRidi Studio
    • Настройка шины Bus77 в iRidi Studio
    ПРОТОКОЛ BUS77
    • Характеристики CAN (Bus77)
    • Описание протокола
    • Исходники на GitHub
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
  • Поддерживаемое оборудование
    Драйверы
    • Список драйверов
    • ProAV драйвера
    • AV & Custom Systems
    • JS драйвера
    • Сторонние драйвера и фриланс
    Протоколы и интерфейсы
    • Голосовое управление
    • 1-Wire
    • BACnet IP
    • Bus77
    • KNX
    • KNX IP BAOS
    • Weinzierl kBerry
    • Microsoft Exchange
    • Modbus
    • MQTT
    • NFC
    • ODBC
    • Onvif
    • SIP
    • SNMP
    • Wake On Lan
    • Z-Wave
    • ZigBee
    Производители
    • AMX
    • AVCiT
    • Beckhoff ADS
    • Biamp Tesira
    • Bluesound
    • Casambi
    • BSS Harman
    • Clipsal
    • ControlArt 7Port
    • Crestron
    • DigiBird
    • Domintell
    • Duotecno
    • EIDE
    • EPSNET
    • Global Cache
    • HDL Buspro
    • Helvar
    • IEAST
    • INELS BUS
    • INELS Wireless
    • Intesis
    • Kleger
    • Kramer VIA
    • Kramer 3000
    • Larnitech
    • Legrand Netatmo
    • LG TV
    • Lutron
    • Lutron Homeworks QS
    • MyHome
    • Nest
    • Novastar
    • Panasоnic PTZ
    • Philips Dynalite
    • PJLink
    • Satel
    • SamsungTV
    • Sonos
    • Somfy
    • SpinetiX
    • Televic Conference
    • TIS
    • Tion
    • URRI
    • Velbus
    • Velocio
    • Vinteo
    • WyreStorm
    • WiiM
    • Xicato
    • Yamaha
    • ZONT
    • Z-Wave.me
    Протестированное оборудование
    • Панель HDL S57
    • Панель HDL S10
    • SIP-домофон
    • Akuvox
    • Arlight
    • Divus
    • QBic TD-1050 PRO
    • QBic TD-1060 Slim
    • QBic TD-1070
    • Sigur
    • Uni-Ubi
    • Velocio
  • Оборудование iRidi

    Серверы
    • HS Сервер
    • ProAV Control Processor Basic
    • ProAV Control Processor Advanced
    • Спецификация контроллеров UMC
    • Настройка контроллера UMC C2
    • Настройка контроллера UMC C3
    • Настройка контроллера HDL IntelliCenter 2 (UMC C4)
    Модули расширения
    • I-PX-RS1
    • I-PX-RS4
    • I-PX-IR3
    KNX
    • KNX Home Server
    • KNX IP Interface
    Панели управления
    • iRidium Panel 7
    • Touch Panel P3
    • Touch Panel P6
    • Touch Panel P8
    • Touch Panel P10
    • Tabletop Touch Panel 10
    • AV Remote Control
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
    • Differences
iRidium mobile web-site
Содержание
    Инструменты‌
    • Сведения о странице
    • Постоянная ссылка
    • Версия для печати
    • Спецстраницы
    • Связанные правки
    • Ссылки сюда
    Login / Create Account
    Материал из for iRidium developers
    Перейти к: навигация, поиск
    Эта страница является переводом страницы NFC. Перевод выполнен на 100%.

    Other languages:
    English • ‎русский

    Содержание

    • 1 iRidium NFC
    • 2 Variants of use
    • 3 Work in iOS and Android
      • 3.1 1. iOS NFC
      • 3.2 2. Android NFC
    • 4 Writing data to NFC tag
    • 5 Work in iRidium
      • 5.1 Driver Properties
        • 5.1.1 Commands
        • 5.1.2 Feedbacks

    iRidium NFC

    NFC - “near field communication” is a short-range wireless data transmission technology that enables data exchange between devices located at a distance of up to 10 centimeters.

    What is required:

    Pro logo 3.png
    i3 Pro


    The principle of NFC is to read data from a pre-programmed tag. Using NFC tags, you can automatically send any commands to the device. For example: a portable NFC tag can contain an access code to enter a hotel room or register in the system. In public places tags can be used to pay for services and at home they can serve as a signal for activation of a device or the whole scenario.

    The driver reads and sends values in the NDEF format with encryption.

    download the example:

    • NFC
    • NFC child control

    Variants of use

    1. Limitations for controlling appliances. If there is a child in the family and it is necessary to limit access to certain appliences, it can be done with the help of a routine. When a child enters a house, he is identified by a tag and appliences in the kitchen and several sockets are blocked.

    2. An NFC tag can be used to control registration of a person at a definite place of a shopping center or a certain floor of a gym. Statistics of visits can be tracked, light in certain parts of a building can be turned on.

    3. The number of places in a parking lot can be tracked. A token is created, where the number is increased by one with each new tag. After a certain value is reached, a signal is sent to a display. If a car leaves the parking lot the number in the token is decreased and a routine to allow entering the parking lot is activated.

    Work in iOS and Android

    1. iOS NFC

    After an NFC scanner is activated in iRidium project, there is a switch to iOS standard menu to work with NFC. Then a user scans a tag, data are sent to a project and iRidium work continues. The NFC scanner in the device is turned off.

    2. Android NFC

    In the Android version of the app NFC must be turned on in the system menu of Android. This platform does not allow to turn on/off an NFC scanner via iRidium. When NFC is activated on Android platform, the scanner will work all the time till it is turned off in the system menu of the device.


    Writing data to NFC tag

    Data can be written with the help of apps that can be foud in Google Play or App Store. Some variants are given below:

    • NFC TagWriter by NXP
    • Trigger (NFC Task Launcher)
    • NFC Tools
    • NFC Tag writer


    After data are written, check them, as apps can write additional symbols. To delete the symbols. write the value from the tag in the variable and cut extra symbols.

    Cutting 3 symbols at the start of the value.

      var number = value.slice(3);


    Cutting 3 symbols at the end of the value

      var number = value.slice(-3);

    Work in iRidium

    1. Create a panel project in iRidium studio. Draw a button in it that will activate an NFC scanner.

    NFC button.png

    2. Create an item to display received data:

    NFC button2.png

    3. Go to the Script editor and create a script for NFC driver (you can see a full version of the script at the end of the description).

    After a driver is created with the help of the script, it has 1 channel (Commands) “NFCDefaultChannel” and 2 tags for feedback channels (Feedbacks) “NFCDefaultTag” and “NFCSimpleTag”. You can see full information about the driver below in the Driver properties section.

    Creation of NFC driver.

    IR.CreateDevice(IR.DEVICE_NFC_DEVICE,"NFC") //it creates NFC driver

    Activation of NFC scanner by press

    IR.AddListener(IR.EVENT_ITEM_PRESS, IR.GetItem("Page 1").GetItem("Item 2"), function ()
    {
    IR.GetDevice("NFC").Set("NFCDefaultChannel", 1); // it activates NFC scanner by pressing a button
    });

    4. Creation of a listener to receive data from the driver tags.

    IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice("NFC"), function(name, value) 
    // a listener is connected to track changes of driver tags
    {
    // full data are displayed on Item 1:
     if(name == "NFCDefaultTag")
    IR.GetItem("Page 1").GetItem("Item 1").Text = value;
    //the main data are displayed on Item 4:
    else
    IR.GetItem("Page 1").GetItem("Item 4").Text = value;
     
    });

    The driver is ready for work!

    A full version of the script

    IR.AddListener(IR.EVENT_START,0,function()
    {
     
        IR.CreateDevice(IR.DEVICE_NFC_DEVICE,"NFC") //it creates NFC driver
     
     
        IR.GetItem("Page 1").GetItem("Item 1").Text = driver;
     
     
        IR.AddListener(IR.EVENT_ITEM_PRESS, IR.GetItem("Page 1").GetItem("Item 2"), function ()//it activates NFC scanner by pressing a button
        {
     
           IR.GetDevice("NFC").Set("NFCDefaultChannel", 1); //Value 1 is sent to turn on.
     
        });
     
        IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice("NFC"), function(name, value) //a listener is connected to track changes of driver tags
        {
            if(name == "NFCDefaultTag")
                IR.GetItem("Page 1").GetItem("Item 1").Text = value; //full data are displayed on Item 1
            else
                IR.GetItem("Page 1").GetItem("Item 4").Text = value; //the main data are displayed on Item 4
     
        });
     
    });

    Driver Properties

    Commands

    Sending a command to read a tag.

    Syntax:

    IR.GetDevice(driver).Set(type, value)

    On input Value Description
    driver "NFC" type: String
    driver name
    type “NFCDefaultChannel” type: String
    channel name
    value 1 type: Value
    Sent value:
    1 - activation of the scanner,
    0 - deactivation of the scanner


    Feedbacks

    Accepting values from an NFC tag.

    Syntax:

    IR.GetDevice(driver).GetFeedback(name)

    On input Value Description
    driver "NFC" type: String
    driver name
    name “NFCDefaultTag”,
    “NFCSimpleTag”
    type: String
    Format of accepted values:
    - Full data
    - Main data
    Data (NFCDefaultTag) {“ID”:”0”,”Type”:””, “Payload”:”12345”} type: String
    Full data
    Data (NFCSimpleTag) 12345 type: String
    Main data
    Источник — «https://dev.iridi.com/index.php?title=NFC/en&oldid=119054»
    About us
    Company
    Team
    History
    Philosophy
    Rewards
    Partnership
    Our partner
    Partnership Programs
    Apply for partnership
    products
    iRidium pro
    iRidium lite
    iRidium gate
    iRidium server
    Loads
    iRidium pro
    iRidium lite
    Other version
    Marketing materials
    Support
    On-line courses/Video
    Recommended equipment
    Other version
    iRidium pro
    Documentation
    FAQ
    Forum
    iRidium lite
    Documentation
    Forum
    Projects
    Standart projects
    Smart buildings
    Smart house
    Special solution
    Find a dealer
    News
    Youtube
    Twitter
    VK
    Logo
    contact@iridi.com
    +7 (499) 322-73-29

    Privacy policy