The Carrier Station component represents vehicles that are in
charge of load’s transportation. The SafeTrack was designed to
allow numerous Carrier Stations, each is constituted by a proposed
component called SafeDuino, a collection of RFID tags and an application
that runs in a mobile device, named SafeTrack Mobile, as
seen in Fig. 4.
The Carrier Station has RFID components that identify the vehicle
and the carried loads. A RFID tag is fixed on the vehicle, that
permits its identification when it enters a Depot Station.
Moreover, a set of RFID tags are attached to the loads, because by
the EPC code is possible to know information, such as: manufacturer,
product type, and also exactly identify which load corresponds
to a certain tag.
The SafeDuino is aimed to manage the entering and leaving of
loads in the vehicle, always informing the SafeTrack Mobile when
a load enters or leaves. It is composed by an Arduino, a Bluetooth
module, a RFID reader and a battery that supplies energy to all
components. The RFID reader only detects the presence of a particular
tag in a specific distance range, not being able to identify if it is
entering or leaving the Carrier Station. This control is done by an
embedded application in Arduino platform called SafeDuino App,
that communicates with the RFID reader and the Bluetooth module
via serial port. The battery can be recharged through 12 volts
socket usually provided in transporting vehicles.
The reading of tags in SafeDuino App is done in synchronous or
asynchronous mode. In synchronous mode, the mobile device
sends a request to the RFID reader and receives in return a list with
the EPC numbers of all tags inside the reader range. On the other
hand, in the asynchronous mode, the SafeDuino App is registered
in the RFID reader, and from that moment on it always receives
notifications when a tag is read. The format of data that the RFID
reader sends to the SafeDuino App changes between each manufacturer.
The reader can share its events by data models in low level as
the ALE specification of EPCGlobal (ALE, 2012), or in high level data
structures, such as an object in Java or C++ languages.
The SafeDuino App aims to identify if a certain read tag is an
entering or leaving event of load in a Carrier Station. Furthermore,
the SafeDuino App communicates with the SafeTrack Mobile via
Bluetooth, in order to notify the event occurrences. The entering
and leaving events of loads can be managed by using a single
RFID antenna fixed on the exit door of the Carrier Station. Another
possibility is doing this control through two or even more antennas
uniformly fixed in the Carrier Station, covering the whole area inside
the vehicle.
Choosing which approach to use directly implies in the control
logic of SafeDuino App. In case of a single antenna, the SafeDuino
App uses a binary tree to represent the vehicles loads. Initially,
the tree is created empty, this indicates that there is no load in
the Carrier Station. That way, each tag read by the RFID reader
causes a search in the tree. If the EPC number of tag is found in
the tree, a timer is started, if there is no other read of tag within
a configurable time, the tag’s node is removed from the tree and
a notification is sent to SafeTrack Mobile informing that the load left
the vehicle. If the EPC number of tag is not in the tree, it is inserted
and a notification is sent to SafeTrack Mobile informing that the
load entered the vehicle.
In the other approach, where the SafeDuino uses two or more
antennas, the SafeDuino App requests to the reader the tags that
are inside the range, receiving the set of data in a format defined
by the manufacturer. This format can be a vector, a list, or a binary
tree. In every new requisition, the SafeDuino App stores the set of
current tags (A) and the set of previous tags (B). Thus, it uses a
set of operations to find the loads that entered and left the
Carrier Station. Through the operation A-B is possible to identify
all the tags that are now inside the vehicle and then notify the
SafeTrack Mobile. The operation B-A detects the tags that left the Carrier Station since last requisition, notifying this event to the
SafeTrack Mobile.
SafeTrack Mobile is an application that runs as a background
service in a mobile device, and sends the Carrier Station and
loads information to the SafeTrack Server. The SafeTrack Mobile
application was based on Oliveira et al. (2013). We remodeled
the service to allow sending information about the load’s condition,
entering and leaving events of loads in the vehicle, and also
vehicle’s information. This application is composed of six components,
as the Fig. 5 shows: User Interface, Logical Module, Data
Access Module, Offline Buffer, Event Buffer and a communication
component, which is subdivided into Service Consumer and
Duino Interface.