📜 ⬆️ ⬇️

NFC wireless tags



Technical progress does not stand still, emerging new technologies become cheaper over time and become available to almost everyone. As an example, you can bring mobile phones. The mid-80s - early 90s were portable payphones with handles or bricks worth several thousand $, the end of the 90s - large tubes, with protruding antennas costing $ 100 and more. The same analogy can be drawn with NFC tags used in accounting purposes.


Ideally, both equipment and consumables (tags) can cost nothing, provided that the employee has a smartphone with NFC support and the employee himself does not mind using it. And, of course, managed to get the required number of used tickets. On Ali, the cost is from 6 rubles or more per tag.


')
The main costs of implementing the described technology are only the programmer’s time.
It is up to the programmer to implement in the mobile application the inventory and or or inventory accounting logic required by your accounting, as well as implement data exchange with the main account database.

For the exchange, you can use http or web services, telegram bots or other messenger-like solution.

Described never spied, I once saw an article about recording a wifi password on a ticket, and also had experience working with TSD (rdp barcode on a winmobile), huge and expensive, in my opinion uncomfortable. Since then, there has been a desire to repeat something similar on a more convenient smartphone.

Groups of 4 bytes are called pages. The first few pages, as a rule, are occupied with service information, on one of the screenshots you can see the NFC ID tags on the first two pages.



In addition to the ID, information about bytes blocked by readonly can also be contained. As well as a host of other information, it all depends on the type of label and the supported features. Service information can also be recorded at the end of the label on the last pages. In more detail described it is possible to see the program for reading tags, for example TagInfo.



It is recommended to record data from 8 pages for empty - purchased tags.

For tickets it is recommended to record from 16 pages. The name of the directory should not exceed 60 characters in case of using the ticket.

Some tickets, usually travel tickets for a lot of trips, have only 20 pages, taking into account blocked service tickets, it’s impossible to record such a ticket.

This development will allow you to quickly integrate the NFC.a record read reading functionality into your mobile application.

Possible uses:
Warehouse accounting of the nomenclature, packings, cells, places of storage.
Accounting OS, IBE: cabinets, tables, computers.
Mobile checkpoint.
And so on.

Application sources are available at https://github.com/PloAl/RfIdTool

The application is "service" and does not have a main activity, and is also not in the android application menu. The launch occurs from other applications, the read data is transferred there or the data to be written to the tag is transferred there.

Below in the picture you can see the translucent “Record of NFC tags” area is the only activity of the application.



An example of using in android application:

protected void nfcStart(boolean read, String readedId) { if (read)) { Intent intent = new Intent("com.ploal.rfidtool.NFCREAD"); intent.putExtra("IdLabel", readedId); // ,  id  } else{ Intent intent = new Intent("com.ploal.rfidtool.NFCWRITE"); intent.putExtra("PageNumber", PageNumber); //.    intent.putExtra("WriteString", WriteString); //.     } startActivityForResult(intent, 1); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (null != data) { String event = data.getStringExtra("event"); String uid = data.getStringExtra("uid"); String result = data.getStringExtra("result"); String text = data.getStringExtra("text"); String[] techArr = data.getStringArrayExtra("tech"); //   ... } } 

An example of using in a mobile application (client) 1c:

 &  NFC(=,ID="")  =  ();    . = "com.ploal.rfidtool.NFCREAD"; ..("IdLabel",ID);  . = "com.ploal.rfidtool.NFCWRITE"; ..("PageNumber",""+); ..("WriteString",); ;  .()  .();  = "";     .   . = "event"   = .;  . = "uid"   = .;  . = "result"   = .; //HEX   . = "text"   = .;  . = "tech"   = .; ; ; //   ... ;  

Source: https://habr.com/ru/post/428902/


All Articles