RFID technology is a non-contact automatic identification technology, which is composed of electronic tags and readers. It has the advantages of large information capacity, high confidentiality, no manual intervention and high identification efficiency. Combined with the upper application software and background database, it can realize the functions of article management, article anti-counterfeiting, article positioning, identity recognition and so on. It is widely used in the fields of logistics management, transportation, industrial automation and so on.

In smart home, RFID is mainly used for access control system, personnel positioning [1], etc. Smart home takes residence as the platform and has the functions of architecture, network communication, information appliances and equipment automation. It integrates system, structure, service and management, and reflects an efficient, comfortable, safe, convenient and environment-friendly living environment [2]. The core function of smart home is security alarm and intelligent control. At present, smart home systems in the market mainly include smart home systems based on building intercom technology, home automation systems based on fieldbus technology and smart home systems based on smart phones [3]. The main products are: intelligent lock, monitoring equipment, various environmental sensors, intelligent electric curtain system, home appliance control, etc. The domestic smart home industry started late. Smart home products have problems such as complex system, expensive price and impractical. What smart home enterprises sell is not products, but a complete set of personalized services tailored for a specific part of people. It is expensive. It is consumption for the rich group, and the system design is complex, and the products are not diversified enough. This will not be conducive to the long-term development of smart home [4].

Therefore, in the current market situation with strong personalized needs of customers, it is of great significance to develop smart home products suitable for mass consumption and convenient operation. Based on portable RFID and Android intelligent terminal, this paper is a mobile application system for intelligent goods inventory with wide population and convenient operation, which is used to realize family warehouse management.

1 related technologies

1.1 RFID Technology

Radio frequency identification (RFID) is an automatic identification technology using radio. Typical RFID systems are usually composed of electronic tags, readers, RFID middleware and application system software [5]. The electronic tag and reader communicate through the radio antenna, can read the item ID information in the tag, realize non-contact identification, and can identify multiple tags at the same time. Electronic tags have a certain storage capacity, can uniquely identify items, and have the advantages of long service life and reusable. RFID middleware is the intermediary between reader and writer and application system software. It manages the reader and its read data, and delivers the data to the upper application software (such as database). The RFID reader with wireless communication function (such as Bluetooth and WiFi) embeds the wireless communication module into the reader. The upper software obtains the electronic tag information through the wireless communication signal, so that users can obtain the RFID tag information anytime and anywhere, so as to solve the restriction that the wired reader cannot be moved.

RFID system can be divided into low frequency RFID system, high frequency RFID system and UHF RFID system according to the radio frequency used. It is widely used in access control system, identity recognition, product management, container management, production line automation management and other fields. In terms of recognition distance, the recognizable range of the reader is related to its manufacturing process, such as antenna design, reader power design, etc. Generally, the reading and writing distance of low-frequency and high-frequency systems is small, about 10 cm. Under the condition of reducing transmission rate and increasing antenna design and reading and writing power, the recognition distance of high-frequency standard iso15693 can reach 1 m; UHF can achieve fast transmission rate in a large working range, and the working distance can reach 3M ~ 10m. However, UHF radio waves are greatly affected by the environment and can not penetrate many materials, such as water and dust. In practical application, factors such as price, read-write distance, security characteristics and amount of stored information need to be considered to determine the appropriate frequency band and Scheme [6].

1.2 Bluetooth Technology

Bluetooth is a low-power, medium and short-range wireless communication technology, which provides fast and convenient wireless communication connection between mobile devices. It is widely used in mobile phones, in which Bluetooth headset is a typical application. The Bluetooth communication specification is globally unified, and the working frequency band is the globally unified and open 2.4 GHz frequency band. The use of this frequency band does not need to apply for a license from the radio resource management departments of various countries. When different Bluetooth devices communicate, a temporary real-time peer-to-peer connection can be established. Piconet is the most basic network form of Bluetooth. It is usually composed of a master device (i.e. the Bluetooth device that actively initiates the connection request) and several slave devices, which can realize one to many communication at the same time [7]. The advantages of Bluetooth technology are: it is convenient to establish wireless connection; Strong portability and wide application; High safety; Low power consumption and low cost; The development design is simple.

1.3 Android Bluetooth programming

The core of Bluetooth technology development is the Bluetooth protocol stack based on Bluetooth standard. The protocol stack contains many protocols, mainly including logical link control and Adaptation Protocol (L2CAP), service discovery protocol (SDP), serial port simulation protocol (rfcomm), etc. SDP protocol is a protocol based on C / S structure and the core protocol in Bluetooth protocol stack. In Bluetooth system, users rely on SDP to obtain device information, service information and service characteristics required for establishing Bluetooth connection [8].

The Android SDK supports Bluetooth function from version 2.0. Applications must add certain permissions to the androidmanifest.xml file to use Bluetooth services: android.permission.bluepath permission allows users to connect to Bluetooth devices, android.permission.bluepath_ Admin permission allows users to manage Bluetooth hardware and use related services, including turning on or off Bluetooth hardware, scanning connectable Bluetooth devices, transmitting data, etc. The relevant Bluetooth APIs are defined in the android.bluetooth package, including the following main classes:

(1) The Bluetooth adapter class represents the Bluetooth hardware on the device;

(2) The Bluetooth device class defines a remote Bluetooth device;

(3) The bluetoothserversocket class is used to open the socket that listens to the incoming connection, and provide a bluetoothsocket object after the connection;

(4) The bluetoothsocket class is used to establish a connection with a remote device and obtain input and output streams.

The process of data transmission through Bluetooth includes:

(1) Check available Bluetooth hardware. Not all Android terminals have Bluetooth function, so it is necessary to determine whether Bluetooth hardware is available before use;

(2) Turn on Bluetooth;

(3) Query paired devices;

(4) Search equipment;

(5) Establish connection between equipment;

(6) Data interaction;

(7) Turn off Bluetooth hardware.

When the two devices are connected, each has a bluetoothsocket object, and obtains the InputStream object used to read information and the OutputStream object used to send information [9].

1.4 data storage mode of Android platform

Data storage methods based on Android platform are divided into external storage and internal storage. External storage mode refers to content provider and network database. Internal storage modes include system configuration, file storage and SQLite database [10]. Internal storage is mainly used in practical application development. System configuration refers to the mechanism of saving some simple configuration information of applications through the SharedPreferences class provided by the Android platform. The file storage mode uses the IO class in Java to read, write and analyze the files in external storage devices such as internal memory or SD card. The operation of data insertion and modification in this mode is complex. Each operation needs to read the whole file, which is inefficient. SQLite is an ultra lightweight embedded database. It supports SQL statements and can realize operations such as query, insert, delete and modification. It is small, safe and free. The data storage method selected by the system mentioned in this paper is SQLite database, which is simple and fast to operate the data.

2 system overview

In daily life, when the items in the family are idle for a period of time, they will be forgotten and can not be used again; When you need to carry more items out, you often miss things after counting. The function of this system is to help people record item information, automatically identify and count items, and display the counting results (this step is similar to the outbound in warehouse management, and check whether there are omissions of outbound items according to the outbound list). The system structure is shown in Figure 1.

How do RFID and Android platforms count items

First, according to the different characteristics of the articles, prepare appropriate RFID electronic tags and stick or hang them on the articles; Use a mobile phone with Bluetooth communication function and a portable RFID reader. When the system works, the ID information on the tag is read by the reader and transmitted to the mobile application through Bluetooth; Fill in the item name corresponding to the tag ID on the application and save it in the local SQLite database. After registering the label information, the user can select the name of the article to be counted according to different needs each time, and then complete the counting of the articles in a certain space after scanning by the RFID reader.

3 software and hardware design and system evaluation

3.1 software design

The modules involved in software development include: adding item RFID tag information, deleting item information, modifying item information, selecting item, counting and scanning item RFID tag, etc.

The workflow of the application is shown in Figure 2.

How do RFID and Android platforms count items

Before adding RFID tag information and inventory scanning of RFID tags, the application should first open the Bluetooth connection, search for nearby Bluetooth devices, and then select to establish a connection with the portable RFID reader. During the addition operation, the application sends a single label scanning command to the reader / writer, and the reader / writer returns the label ID. after the user enters the article name, the application enters it into the database and marks it as unselected.

In the list all items interface, you can select or deselect the items to be counted. When the user selects an item, the value of the item’s status attribute (that_status) is “1”, indicating that the item will be counted; Otherwise, it is “0”, which means that the item has been registered in the database, but it does not need to be counted for the time being.

When the application counts the scanned items, it sends the anti-collision identification (multi tag identification) command to the reader, and the reader constantly returns the data stream with tag ID information. The application program extracts the tag ID from the data stream and queries its status in the database. If it is “1”, its article name will be displayed in the scanned list in the system default font color (gray); If it is “0”, the item name will be displayed in other non system default font colors (dark gray). The number of scans is the number of tags that have been scanned and registered by the reader / writer in real time during the scanning process.

After identifying the items in a certain space, the user presses the stop identification button on the reader / writer, and the reader / writer sends a response to stop identification to the application. After the application receives it, the name of the selected but not scanned article is output in the non scanned list. The scanning result display interface is shown in Figure 3.

How do RFID and Android platforms count items

3.2 hardware selection

Nowadays, Bluetooth communication is a very common function in smart phones. The development of the system selects the touch-screen mobile phone of Android version 2.3 system, has Bluetooth hardware module, has Bluetooth communication function, and comes with SQLite database, which does not need to be installed by users. The selection of RFID reader should consider that the reading and writing distance should not be too short, otherwise the recognition efficiency is low and it is easy to scan incompletely; The price should be more suitable for mass consumption; In order to be easy to use and carry, the shape should be small. Therefore, the UHF reader with Bluetooth communication function is selected, with a reading and writing distance of about 20 cm, small volume and easy to carry, as shown in Figure 4. When the fan button “R” shown in the figure below is pressed, the reader / writer starts or stops identifying the label.

3.3 system evaluation

At present, the system is an independent system, which can realize the functions mentioned in this paper. Limited by the reading and writing distance of the reader, it is necessary to move back and forth in the electronic tag during inventory scanning to ensure the accuracy of scanning results. The system can also be used in places without smart home system. Users only need to have an Android terminal with Bluetooth communication function and a portable RFID reader to count items, with strong mobility. The electronic label used can be pasted or hung on articles, which is convenient to use. It is applicable to personal daily or office goods management, such as family warehouse management, inventory of goods going out or traveling, etc.

Nowadays, mobile phones have become a part of people’s daily life. Smart phones provide a good platform for developing various mobile application software. The research on RFID technology has attracted much attention, and the application range of RFID is becoming wider and wider. At present, the smart home market still has great development space and potential. As a subsystem of smart home, the smart goods inventory system in this paper can: (1) connect the local data of smart phone with the personal database in smart home system through wireless communication technology; (2) Select a reader with appropriate reading and writing distance to increase the anti-theft function of items in the package; (3) Develop applications based on other mobile platforms, such as IOS, Windows Phone, etc.

Responsible editor: CT

Leave a Reply

Your email address will not be published. Required fields are marked *