AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 26.11.2017, 10:21   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
gideonvos: RFID + IoT + Ethereum Blockchain
Источник: https://gideonvos.wordpress.com/2017...um-blockchain/
==============

This is a very quick post, mostly code-only, showing how to read RFID tags on say an assembly line, process those using a WiFi IoT device (Adafruit Huzzah), extract the product serial number from the RFID tag and send that as part of a transaction to an Ethereum Blockchain.

I am using a MiFare RFID card reader, but you would want to use a long-range reader that supports low-cost sticker tags. POSTing the transaction to the blockchain takes a second or two, so don’t expect to scan 100 products/second flying past the reader and manage to submit those as transactions.

URL’s and codes are hard-baked, so consider how you want to post the transaction. I use static Ethereum addresses and stick the product ID in the data portion, you might want to read that from the RFID tags as well.

Once your product ID is in the blockchain, you might want to move that to your ERP system, or even a cool PowerApp or something. Unless you want to code X++ and mess around with your production systems, I suggest using Xalentis Fusion instead, to enable code-free integration between Ethereum and Microsoft Dynamics 365 for Finance and Operations. It also supports SMS, Email messaging, Service Bus messaging, Flow, PowerApps and Common Data Service.

Enjoy.

<div style="background:#ffffff;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;">#include #include #include #include #include #define RST_PIN 15#define SS_PIN 2#define SSID "mywifiSSID" #define PASS "password" MFRC522 mfrc522(SS_PIN, RST_PIN); void setup() { Serial1.begin(115200); while(!Serial1){} Serial.begin(9600); SPI.begin(); mfrc522.PCD_Init(); WiFi.begin(SSID, PASS); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }} void loop(){ // Using MiFare card reader here, for production use sticker tags and high-speed reader instead MFRC522::MIFARE_Key key; // default to FFFFFFFFFFFF key.keyByte[0] = 0xFF; key.keyByte[1] = 0xFF; key.keyByte[2] = 0xFF; key.keyByte[3] = 0xFF; key.keyByte[4] = 0xFF; key.keyByte[5] = 0xFF; // Loop until RFID tag is presented if (!mfrc522.PICC_IsNewCardPresent()) return; if (!mfrc522.PICC_ReadCardSerial()) return; byte readbuffer1[18]; byte readbuffer2[18]; byte block; MFRC522::StatusCode status; byte len; byte sizeread = sizeof(readbuffer1); block = 0; status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, block, &key, &(mfrc522.uid)); if (status != MFRC522::STATUS_OK) { return; } else { for (int i = 0; i <span style="color:#333333;">
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
gideonvos: Dynamics AX RFID using IoT Blog bot DAX Blogs 0 08.09.2017 11:11
gideonvos: IoT Health & Safety in Dynamics AX 7 Blog bot DAX Blogs 0 08.09.2017 11:11
gideonvos: Routing WiFi-enabled IoT Devices Blog bot DAX Blogs 0 08.09.2017 11:11
gideonvos: IoT Dashboard in AX using Control Extensibility Blog bot DAX Blogs 0 08.09.2017 11:11
DynamicsTech: Radio Frequency Identification [RFID] Blog bot DAX Blogs 0 18.04.2007 17:01
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:44.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.