Sunteți pe pagina 1din 8

TAXI MOBILE UNIT MANAGEMENT SYSTEM: MOBILE UNIT IMPLEMENTATION

Abstract: Discussed in this paper, is the analysis, design and implementation details of the taxi mobile unit management system. The system is basically an Electronic Fare Settlement (EFS) used in public transportation. The supporting information on GSM/GPRS networking, Contactless Smart Card technology, and Short Range RF communications is first presented. This is followed by the design of the Mobile Unit system and the location identifier system. The Mobile unit is installed in the minibus taxi and is used as the terminal for processing fare settlement transactions. Location Identifier is installed at each bus stop and is used to send zone location ID to the mobile unit for fare calculations based on the distance travelled by the commuter. The designed and constructed system is tested and then evaluated to determine its performance. Recommendations for future improvements on the system are finally specified and a conclusion established.

Ratoka G. Lekhema
School of Electrical & Information Engineering, University of the Witwatersrand, Private Bag 3, 2050, Johannesburg, South Africa Keywords: GPRS, MIFARE Contactless Smart Card, RF data communications, EFS, Transportation Manager (TM)

1. INTRODUCTION A world class public transportation system is mainly aimed at ensuring absolute satisfaction of both commuters and service operators. Features which distinguish the world class public transportation service include reliability of the service, punctual conveying of commuters, consistent and economical fares and incorporation of standard safety and security measures [1]. The South African public transportation is currently dominated by the minibus taxi industry which does not exhibit the above mentioned characteristics. With the upcoming events in South Africa such as 2010 soccer world cup, it is imperative to ameliorate the minibus taxi service to meet the necessary world standards. Electronic fare settlement (EFS) is one of the alternatives which can be incorporated in public transportation to reduce the safety hazards of carrying tangible cash by both commuters and operators. Furthermore, the EFS service may reduce the money (cash and coins) handling time and expenses, and therefore increase the speed of travelling while reducing the associated cost of travel. To facilitate rapid fare settlement transactions, General Packet Radio Service (GPRS) provided by Global Systems for Mobile communications (GSM) network providers can be economically deployed as a communication medium to wirelessly link commuters prepaid accounts to the minibus taxi mobile unit at the point of travel. Contactless Smart cards can be utilized as prepaid identity cards by commuters for rapid embarking and disembarking, and also to facilitate secure fare settlement transaction authentication. For precise transportation fare calculation, licence free Radio Frequency (RF) data communication can be incorporated to identify the zone locations of embarking and disembarking commuters. The main aim of the document is to provide comprehensive details of the analysis, design and

implementation of the taxi mobile unit management system. This is basically a system to facilitate the EFS in minibus taxi industry. The general illustration of the system is portrayed in figure 1 below. To accomplish the depicted system, analysis will first be carried out on the contactless smart cards (used as TransCards), GPRS and license free Industrial, Scientific and Medical (ISM) RF communications. This will be followed by the design and implementation of the system. Furthermore, testing and evaluation will be conducted to determine the performance of the system. Finally, based on the results obtained, a conclusion will be established and recommendations proposed.

Figure 1: General System Illustration 2. PROJECT OVERVIEW 2.1 SYSTEM SPECIFICATIONS, REQUIREMENTS AND ASSUMPTIONS The system should be applied in public transportation organization such as minibus taxi industry to replace fare payment in tangible. The basic specifications required to be analysed, designed and implemented are as follows: Commuters should register with Transportation Manager (TM) system to obtain prepaid accounts. Commuters must use secure form of identity to authenticate access to the system facilities such as electronic fare settlement.

The mobile unit must communicate with the TM through wireless data communication network. The system is required to be flexible enough to be comparable with tangible cash fare settlement option. The system must have the potential to bill commuters only for the distance travelled It is assumed that the wireless data communication network selected is reliable enough to provide online transactions at all times. 2.2 SUCCESS CRITERIA AND CONSTRAINTS The designed system is considered successful only if all the basic specifications are implemented. Furthermore, hardware permitting system upgrading must be used to accommodate for potential developments. Again, the system must be reliable, portable and robust. The financial and time constraints let to the implementation of the most cost effective, simplified version of the system. 3. BACKGROUND INFORMATION In order to integrate the subcomponents and implement the system, a number of vital aspects had to be comprehensively understood first. These covered the smart card technology, GPRS networking and RF data communications. Having understood the mentioned technologies, the system was then designed, implemented, tested and analysed. 3.1 CONTACTLESS SMART CARD AND READER Smart cards are used extensively in applications which require secure information storage and clients identity. The profound comprehension of the contactless smart cards and readers should first be established in order to effectively integrate such cards into the Taxi electronic fare settlement application. 3.1.1 CONTACTLESS SMART CARD OVERVIEW The contactless smart card is basically a plastic card embedded with a secure microcontroller or equivalent device and data storage memory [7]. The enclosed microcontroller renders functionality such as secure management, storage and access to data stored on the card. The microcontroller also performs complex functions such as encryption and decryption of data stored on the card. Information interchange between the smart card and the reader is intelligently carried out though RF communications. This is accomplished by the application of common private symmetric keys

shared between the card and the reader and the cryptography algorithms to make the communication successful [7]. The applications of symmetric keys and cryptography algorithms facilitate the mutual authentication between the card and the reader and this can be applied to deliver secure transactions. Furthermore, smart cards inhibit repeat attacks and illicit duplication of the cards. The international standards for contactless smart cards operating at 13.56MHz are stated under ISO 14443 [2]. One of the leading technologies used in developing smart cards and readers is MIFARE. MIFARE is a contactless proximity card technology developed by Phillips. MIFARE smart cards and readers are mainly used in public transportation transactions payment applications. The typical read range of MIFARE smart cards is between 2.5 cm to 10 cm [8]. The data memory of MIFARE card is divided into 16 separate sectors which can be configured to stored information for different applications. The first memory sector is used as the default directory where the cards unique serial number is stored [8]. 3.1.2 CONTACTLESS SMART CARD READER Due to the pre-programmed symmetric keys, contactless card readers can only read cards with matching keys. The basic output format of the MIFARE card reader is in Wiegand data format which is based on the Wiegand effect [3]. The Wiegand data format consists of two data lines named Data 0 and Data 1 respectively and a ground for return path. Without any data transmission, both lines remain high. The reader transmits data by setting Data 1 to zero when transmitting a logic one and by setting Data 0 to zero when transmitting logic zero. Each bit pulse last for about 50 s while the interval between bit zero and bit one is about 2 ms. The absence of pulse for about 200ms signals the end of serial data transmission block. The general Wiegand data format is exhibited in figure 2 above [3].

Figure 2: Wiegand signal timing protocol Different types of Wiegand data formats are Wiegand 26 and Wiegand 37. The factory programmed MIFARE card is equipped with a 16-bit card serial

number and hence supports the 26- bit Wiegand data format. MIFARE card readers with integrated Wiegand to serial data converters are available at higher cost price. 3.2 GPRS NETWORK GPRS is a packet-based data network which uses the existing GSM network to transmit and receive Transmission Control Protocols/Internet Protocols (TCP/IP) to and from the GPRS mobile cellular device. GPRS makes it possible for mobile cellular systems to connect to remote systems through internet. 3.2.1 GPRS NETWORK RCHITECTURE The GSM network supports GPRS networking through Serving GPRS Support Node (SGSN) and Gateway GPRS Support Note (GGSN). The SGSN facilitates the delivery of data packets to and from the mobile device and its functionality includes mobile device location management, data packets routing and transfer as well as authentications and mobile device subscriber billing. The GGSN serves as a gateway from the GPRS backbone network to the external data network (internet) and is responsible for converting incoming data packets from SGSN into appropriate Packet Data Protocol (PDP) format. GGSN is also responsible for mobile devices IP assignment [11]. 3.2.2 LAUNCHING A GPRS CONNECTION BETWEEN MOBILE DEVICE AND REMOTE SERVER To establish a connection to the remote server, the mobile device must first create a point-to-point (PPP) connection to the service provider GPRS network node, and then activate the PDP context. The PDP context is a data structure present on both SGSN and GGSN and stores the subscriber active session information such as subscribers IP, Access Point Name (APN), etc. Once the PDP context has been activated, the mobile device can connect to or receive connections from a remote server IP through a specific port and exchange data over the internet through protocols such as TCP/IP, UDP/IP or FTP/IP. The DHCP server at the GGSN node allocates the mobile device a private IP based on the IPv4 addressing guidelines for GPRS networks and mobile devices [4]. The Network Address Translator (NAT) at the public IP server facilitates the connection of the private IP from the mobile device to the global IP network. 3.2.3 GSM/GPRS SECURITY The wireless communication between the mobile unit and the accounts management system must be secure enough to protect commuters accounts information. The GSM/GPRS network operators normally issue

subscribers with Subscriber Identity Module (SIM) cards which are smart cards and provide securities measures such as cryptography for data sent and received from the GPRS network. Furthermore, operators provide security measures such as data integrity, confidentiality, authentication, authorization and data availability [5]. With these security measures, attacks such as denial-of-service and over-billing can be prevented [5]. The denial-of-service attack prevention also facilitates prevention of typical TCP/IP security attacks such as TCP session hijacking, IP spoofing, etc [6]. 3.3 RF DATA COMMUNICATION RF data communication is achieved by the use of radio frequency part of electromagnetic spectrum. Due to the fact that RF communications are susceptible to interference when two applications are operating at the same radio frequency, then the RF spectrum wavebands allocation is managed by stringent regulations from the national and international agencies. However, short range low power RF wavebands like ISM are license free in South Africa. In RF data communications, data has to be first encoded into suitable format by encoder, then modulated into RF format and transmitted by the transmitter. The receiver demodulated the received RF signal and the decoder recovers the originally sent data. For comprehensive details on the basics of short range RF data communication, please refer to the Taxi Route Identification System [9]. 4. SYSTEM DESIGN 4.1 DESIGN APPROACH There is a wide number of emerging transit applications which utilizes EFS option. The basics of EFS application is similar to wireless point-of-sale payment processing systems where smart cards are used for customer ID and GPRS is used for communications. Apart from that, numerous projects have been conducted on security applications which utilize contactless smart card. As a result, there is a vast amount of information about smart cards and GPRS available on internet as well from transportation organizations. Most of the existing transit organizations like Johannesburg MetroBus use value stored contactless smart cards to facilitate both online and offline operation of the system. The first task executed, was to determine a lucid framework of how MIFARE smart cards and readers work. This was followed by the investigation and determination of the operation of GPRS network and GPRS modems for wireless communications. Network service provides currently support wireless communication options such as EDGE and 3G (with

HSDPA) with higher data rates, however GPRS has lower implementation costs and its data rate are sufficient for the EFS application. To identify the embarking and disembarking zone locations of the commuters, the short range RF communication system previously implemented [9], is used. These three subunits formed the core components for mobile unit design. Vodacom GSM/GPRS network is used. 4.2 DESIGNED SYSTEM STRUCTURE The system to fulfil the specified mobile unit functionality is structured as depicted in the figure 3. As portrayed in the figure 3, the following functionality is achieved: The system initiates connection through GSM/GPRS with the Transportation Manager (TM) on system start-up and then stays online. Commuters scan contactless MIFARE card on the card reader to authenticate and initiate transaction processing Commuters balance inquiry is requested from TM through the already initiated GPRS The LCD displays the activities taking place within the mobile unit system Short range RF communications system sends the location identity of the relevant zone from the bus stop (location identifier circuit is portrayed in figure 4) to the mobile unit.

To convert the RS-232 voltage levels to TTL, MAX232 chip is used. The modem communicates with the microcontroller through Universal Asynchronous Serial Receiver and Transmitter (UART).
12V Power Supply

Antenna

GPRS Modem MIFARE Card Reader

LM7805 Voltage Regulator

MAX232

Microcontroller

16x1 Character LCD Module

Voltage Divider

Ctrl44 RF Decoder Antenna RX2 RF Receiver

Figure 3: The system hardware block diagram


6-12V INPUT VOLTAGE TXD RF TRANSMITTER
LM7805 5V VOLTAGE REGULATOR

These functionalities are further elaborated in control algorithm in figure 5. 5. SYSTEM IMPLEMENTATION 5.1 HARDWARE SECTION Each component along with its associated circuitry was constructed and tested separately. The fully functional components were then integrated together. The complete system hardware block diagram is exhibited in the figure 3. The implementation of each subcomponent is explained. 5.1.1 GPRS MODEM The class 10 GPRS FASSTRACK modem manufactured by WAVECOM is used as the engine to connect the device to the GPRS network. The FASSTRACK modem has embedded TCP/IP stack which is accessed through WIP open AT commands [12]. The modem accepts RS-232 serial input/output signals. The voltage levels of RS-232 signal is -15V to +15V for high and low. On the other hand the microcontroller operates at Transistor-Transistor logic (TTL) levels of 5V to 0V for high and low.

CTRL44 ENCODER

ATMEGA16 MICROCONTROLLER

INPUT SWITCHES

RED LEDS

Figure 4: Location identifier illustration circuit. For the microcontroller to initiate the communication with the modem, the Request to Send (RTS) and Data Terminal Ready (DTR) lines of the modems must be set from high to low. The modem is powered with 12V from a bench power supply through a 500 mA fuse for short circuit protection.

5.1.2 MIFARE CARD READER The classic ISO 14443-3 MIFARE serial number reader is used for scanning the serial number stored on the MIFARE contactless smart card (TransCard). The output data format from the reader is Wiegand data through line D0 and D1. The other three input lines of the reader are used for controlling Green and Red LEDS and the buzzer. The reader is powered with 12V from the bench power supply through a 500 mA fuse for short circuit protection. 5.1.3 MICROCONTROLLER 8-bit AVR Atmega32 microcontroller is used as the main processor for the mobile unit system. It is consist of up to 16 MHz processor, 32 Kilo Byes (KB) InSystem Programmable Flash, 32 programmable I/O lines, 2 KB of Static RAM (SRAM), 1024B of EEPROM, a programmable USART and External Interrupt Sources [10]. The microcontroller is powered with 5V from the LM7805 voltage regulator. It was selected for the application because of its easily understood development environment and also because of its relatively large flash memory for program and data storage. The program code for the microcontroller is developed in C language using ImageCraft development environment and the compiled code is loaded using AVR Studio. STK500 development board is used for the loading process and immediate testing. 5.1.4 SHORT RANGE RF CIRCUITS The RF transmitter (TX2), receiver (RX2) and 4-bit encoder/decoder (Control44 IC) (from the previous Taxi Route Identification System project [9]), configured in the continuous transmission mode, are used for location identification functionality. The RF receiver circuit mounted on the mobile unit circuitry board is powered with 5V. The output logic high of the receiver circuit was approximately at 5.06V whereas the input logic high of Atmega32 is approximately 5V. As a result, voltage divider circuitry was introduced to bring the decoder logic levels down to approximately 4.8V. The TX2 and encoder circuits are mounted on the location identifier circuitry board and are powered with 5V. 5.1.5 LOCATION IDENTIFIER The main processor of the location identifier is 8-bit AVR Atmega16 microcontroller. The features of Atmega16 are the same as Atmega32 and the only difference is the 16 KB Flash memory and 512B of EEPROM available on Atmega16. A 4-bit switch and LEDS are connected to the location identifier to demonstrate different zones input values.

5.1.6 LCD MODULE CIRCUITRY A 16x1 character display LCD module driven by 8-bit data bus is used to display activities in the mobile unit. 5.2 SOFTWARE SECTION 5.2.1 MOBILE UNIT CONTROL ALGORITHM Separate software modules dedicated for each hardware component were developed and tested on the hardware components to access functionality. The program flow chart representing the events sequence execution is shown in figure 4. The complete program code is given in appendix C and comprehensive control algorithm is given in appendix D. 5.2.2 LOCATION IDENTIFIER ALGORITHM The location identifier control program continuously copies the input logic address from the input port and takes it out to the RF encoder and the display LEDS. 6. SYSTEM TESTING The LCD module circuitry was designed first and the characters display function deployed to ensure consistent display of different types of characters. Each component circuitry was tested for try joints and short circuits. The program code module for each system component was first debugged using AVR studio debugger. The working modules were then individually loaded into the microcontroller and hardware debugging executed. The LCD module provides an excellent additional functionality of visualising the step-by-step activities happening during hardware debugging.

START

Initializes Devices

expensive, as depicted in table below. Furthermore, some of the components had to be ordered from overseas and this introduced additional lead time before the actual system implementation.
Request Balance From TM Server Through TCP/IP Is Balance Enough? NO YES

Connect to TM Server Through GPRS

MAIN LOOP

NO

1 sec Buzz

YES NO IS A CARD SCANNED? Is the Commuter Already on Board?

Get Embarking Zone ID from RF Module

Solution: Only the most cost effective components with basic functionality were purchased. One of the proposed sub-systems termed Client Terminal was terminated to eliminate the cost of purchasing extra GPRS modem and card reader. Also, some of the ordered components for this system arrived late. Table 2: Data tariffs on Vodacom Network Component Cost MIFARE card reader (1) GPRS Modem (1) RF com modules (4 pieces) LCD module (1) Atmega32 (2) Accessories (approx) Total R2160.30 R1760.00 R462.48 R1760.00 R275.76 R300.00 R6718.06

YES Send Fare and Commuter ID to TM through TCP/IP Calculate Commuter Fare Get 2 Zone ID from RF Module
nd

Create New Commuter Structure

Free Commuter Stucture

4 Times Buzzer

Figure 4: The general program flow chat Finally the sub-components were amalgamated and the entire system hardware and software reliability confirmed. The system was run for a long time to ensure consistency and at 12V voltage supply; the mobile unit draws maximum current of 400mA and 100mA at standby. The location identifier draws maximum current of 200mA. 7. SYSTEM ANALYSIS 7.1 PERFORMANCE EVALUATION The MIFARE card is scanned effectively at a distance of 3 cm from the card reader. The location identifier performance was evaluated within a short distance from the mobile unit and different input locations from the RF transmitter were obtained at the receiver circuit on the mobile unit without errors for repeated investigations. The GPRS modem connection time to the Transportation Manager (TM) server was evaluated at different times of the day and the maximum connection time was determined to be 5 seconds. Data from the mobile unit to the TM server is sent almost instantaneously. However, it was determined that the server closes connection after each it has received data and responded, so GPRS modem had to reconnect to server each time data to be sent is available. 7.2 OBSTACLES ENCOUNTERED 7.2.1 COMPONENTS COST Problem: Cost is always the main constraint in system design projects. The system components such as the MIFARE card reader and GPRS modem are relatively

7.2.2 MIFARE SMART CARD AND READER Problem: The output Wiegand data lines D0 and D1 were not functioning as stated by the Wiegand theory. This could have been due to the fact that the card reader was faulty or the first memory sector of the MIFARE card was not factory programmed with a four digit HEX number as stated in the data sheet. Solution: The Red LED line switches from high to low when the card is scanned. This signal was used to indicate through an external interrupt to the microprocessor that a card has been scanned. 7.3 OPERATIONAL COST ANALYSIS Vodacom service provider charges 19c per megabyte (MB) sent or received. The commuter ID stored on the card is 16 bit and for system testing a 16 bit HEX digit was sent to the server each time the card was scanned. The server responded by accept A for enough funds or R for insufficient funds. This made the GPRS services charges to be negligibly small. The table below shows the GPRS service billing by the service provider. 8. RECOMENDATATIONS It is recommended that value stored TransCards be utilized to facilitate both online and offline transaction processing. This will be beneficial for situations where GPRS network is down. Future developments should include the developments of the Client Terminal. Commuters accounts can be linked to their bank

account to facilitate simpler and quicker account recharging. Table 2: Data tariffs on Vodacom Network Data sent/received Size (Bytes) Connection to TM Processing 50 commuters Transactions 1024 16384

Cost (Rand) 0.01 0.04

[5]GPRS Security Threats and Solution Recommendations http://www.juniper.net/solutions/literature/white_paper s/200074.pdf Last Accessed 20 October 2007 [6] Mariusz Burdach, Hardening the TCP/IP stack to SYN attacks http://www.securityfocus.com/infocus/1729 Last Accessed 20 October 2007 [7] Zoreda, Jos Luis. Smart cards. Boston: Artech House, 1994. [8] MIFARE FAQs http://www.hidcorp.com/page.php?page_id=21 Last Accessed 20 October 2007 [9] Mashego, Lehlohonolo R.TAXI Route Identification System: Hardware Construction School of Electrical & Information Engineering, University of the Witwatersrand, Private Bag 3, 2050, Johannesburg, South Africa [10] Data Book for the ATmega32/32L, "8-bit AVR Microcontroller with 32K Bytes In-System Programmable Flash", Atmel Corporation, San Jose, CA http://www.atmel.com/dyn/resources/prod_documents/ 2503S.pdf Last accessed 18th September 2007 [11]GPRS Core Network http://en.wikipedia.org/wiki/GPRS_Core_Network Last Accessed 18 September 2007 [12] Wavecom Based Maestro 100 Modem http://www.trintel.co.za/Products/Wavecom/Wavecom _Wireless_CPUs_July_2007.pdf Last Accessed 26 October 2007

9. CONCLUSION The public transportation management system is design, implemented and evaluated. The system is used for electronic fare settlement in taxi industry. The functionality of the system is demonstrated through the working prototype. The wireless communication between the mobile unit and the central server is achieved through the use of GPRS. The commuters are issued with MIFARE contactless start card to facilitate secure authentication and transaction processing. Short range RF is used to identify zones for distance travelled fare calculation method. The designed system is evaluated for performance and further developments of the system are suggested. ACKNOWLEDGEMENT The author would like to acknowledge the following people. Mrs. Mercy Shuma-Iwisi, the project supervisor for her informative help, guidance and her valuable assistance in obtaining the system components. Jeremy Holdcroft for sharing his knowledge and experience. REFERENCES [1] Making a World Class Transit System a Reality http://www.aptrex.com/StumpoPaperHouston.pdf Last Accessed 19 October 207 [2] ISO 14443 Contactless Identification Cards www.otiglobal.com/objects/ISO%2014443%20WP%2 04.11.pdf Last Accessed 16 September 2007 [3] Wiegand-to-RS-232 Converter http://www.circuitcellar.com/avr2004/DA3616.html Last Accessed 16 September 2007 [4] Guidelines for IPv4 Addressing and AS Numbering for GPRS Network Infrastructure http://www.gsmworld.com/documents/ireg/ir40310.pdf Last Accessed 20 October 2007

Appendix C The source code C code - Mobile_Unit.zip and C code - Location_Identifier.zip can be downloaded from http://www.khems.co.za

S-ar putea să vă placă și