COMSATS Institute of Information Technology, Islamabad
Sunday, May 20, 2012
Low Power Mobile Architecture and Operating System Group
Introduction
Since their inception, energy dissipation has been a critical issue for mobile systems. Although a large research investment in low-energy circuit design and hardware level energy management has led to more energy-efficient architectures, even then, there is a growing realization that the contribution to energy conservation should be more rigorously considered at higher levels of the systems, such as operating systems and applications. Under low power mobile architecture and OS group we are working on the development and debugging of different hardware devices as well as developing some software utilities for mobile phones based on Symbian operating system.
Members
  • Dr. Naeem Zafar Azeemi
  • Mr. Wajid Mumtaz
  • Mr. Syed Yasir Imtiaz
  • Ms. Muneera Shiraz
1. Development and debugging of Netgear’s WGR614L Open source router
This project is related to the Netgear’s well renowned WGR614L open source router. WGR614L is a wireless-G network router aimed at advanced users looking to run alternative, open source firmware on their router. The WGR614L supports popular open source firmware choices such as DD-WRT, OpenWRT and Tomato. Developers have access to an extensive user guide for programming their own router features. The Netgear WGR614L uses a 240 MHz MIPS4k based core in bcm5354 chipset with 4 MB flash and 16 MB of RAM.
* Code compilation and creation of router firmware
In this phase we compiled the source code which is available on the Netgear’s website to generate the firmware image. WGR614L is a customizable open source product. At its heart is a Linux operating system version 2.4.20, which can be customized and modified at will by users to arrive at customer software applications or to achieve custom functionality / optimizations.
WGR614L is an Open source router. Hence, its code can be downloaded easily from the internet. We can customize it and run it on our own hardware and can configure it according to our needs. Main parts of the code include Linux distribution, bootloader CFE, application specific code like busybox and network related tools, prebuilt modules like PPPoE, PPTP etc and the board specific code which include Interrupt controller, serial driver and memory layout.
The output of this code is a ".chk" file which can easily be uploaded by using the web interface of the router. In this way, we can also upgrade the router firmware by uploading the latest firmware files.
* Debricking the router
I) TFTP method
Trivial File Transfer Protocol (TFTP) is a file transfer protocol, with the functionality of a very basic form of File Transfer Protocol (FTP). It is for booting computers such as routers which did not have any data storage devices.
Netgear routers running factory firmware often have a built in telnet daemon that listens on TCP port 23. Accessing this hidden command line interface (CLI) first requires sending a magic packet to the daemon, to unlock it. The "telnetenable" utility generates and sends the packet to the router. The process of accessing the router using tftp method involves:
* A tftp Server (WinAgent tftp server manager) for windows Xp
* A "telnetenable utility" that can access the router's rootfs (root file system)
By using this telenetenable utility, we first unlocked the router by this command:

telnetEnable.exe [<router ip>] [<router MAC address>] <username, which is "Gearguy"> <password, which is "Geardog">

After unlocking the router tftp, we can get the backup of router firmware and can also upload already backed up data by using tftp put and get commands respectively.

Retrieve a file from the router
Put <remote filename>[<local filename>]
Store a file to the router
Get <remote filename>[<local filename>]

In this way we can access the router's bootloader (CFE), kernel and NVRAM.
II) Serial console method
In case if we can not access the tftp method through the network cable or we just can't get a ping or for any reason can't get it going again we can access our router by using a serial console. For using the serial console we have used the following procedure:

* First we need to get a USB to Serial converter that operates on 3.3V
* On the other side of the cable, we have to connect the wires from the cable to the router directly. The pin layout of the serial port is:

Pin2 is the RXD to Receive Data
Pin 5 the TXD to transmit Data
Pin 6 is the GND or Ground

So, we have to connect the TXD of our USB cable to the RXD pin on the router and vice versa for the TXD pin on the router. We do not need the other pins

The next thing to do is get some kind of program that will allow talk to the router via a command console. The recommended one is Putty program for this purpose.
III) Jtag method
One of the difficult areas in the development of any modern hardware system is the production-testing of the Printed Circuit Boards (PCBs). This is the problem addressed by the IEEE standard number 1149 "Standard Test Access Port and Boundary-Scan Architecture". This standard defines a 5-pin serial protocol for accessing and controlling the signal-levels on the pins of a digital circuit, and has some extensions for testing the internal circuitry on the chip itself (which will not be discussed here). The standard was written by the Joint Test Action Group (JTAG) and the architecture defined by it is known as "JTAG boundary scan" or as "IEEE 1149".

The JTAG interface uses the following five dedicated signals which must be provided on each chip that supports the standard:

* TRST is a Test-ReSeT input which initializes and disables the test interface
* TCK is the Test CLocK input which controls the timing of the test interface independently from any system clocks
* TMS is the Test Mode Select input which controls the transitions of the test interface state machine
* TDI is the Test Data Input line, which supplies the data to the JTAG registers (Boundary Scan Register, Instruction Register, or other data registers) * TDO is the Test Data Output line, which is used to serially output the data from the JTAG registers to the equipment controlling the test

Building a JTAG cable can be helpful if somehow the router is "bricked". Generally, one would try the serial cable method first to try to revive the router, but if we need to bypass the software altogether and access the flash chip directly - then JTAG cable is the best choice. Here's the list of materials needed to create a JTAG cable:

* A ribbon cable
* 5x 100 ohm resistors
* 1x DB25 plug * Soldering iron
* Basic knowledge of soldering

First of all, pins 18 to 25 of the DB25 plug (i.e PC parallel port connector) are shorted and pins 2, 3, 4 and 13 are connected with 100ohm resistors. The next step is to connect this DB25 plug with the ribbon able that we have. Another important thing that we need to get it working is to connect the Vcc of serial on the board with the Vcc of the JTAG header on the board with a 100ohm resistor. The other end of the ribbon cable is connected to the Jtag header on the router board.

After successfully connecting our jtag setup, we need a software process to access the flash contents. Most popular software method for this router is tjtag -v3. JTAG commands in tjtag -v3 generally serve three purposes:

1. To keep a backup of the contents of the router's flash memory.

For example, to backup the CFE, use the following command:
./tjtagv3 -backup:cfe

2. Alternatively, to erase the CFE, use the following command:
./tjtagv3 -erase:cfe

3. Finally, we can use JTAG to flash a fresh CFE, using the following command:
./tjtagv3 -flash:cfe

In this way we can perform these three actions for CFE, kernel, NVRAM and also for Wholeflash (complete flash contents)
2. Symbian Application development
Today's mobile devices are multi-functional devices capable of hosting a broad range of applications for both business and consumer use. PDAs and the ever-growing category of smart phones allow people to access the Internet for e-mail, instant messaging, text messaging and Web browsing, as well as work documents, contact lists and more. Some of the most common and well-known Mobile operating systems include Symbian OS, Windows Mobile, Palm OS and Android.

Symbian operating system is the most popular choice of operating systems for many handheld devices and is designed particularly for the mobile environment, keeping concerns of efficient usage of skimpy resources in mind. Our current focus of research is towards the development of handy applications for the mobile devices.
* Location based services in a Symbian operating system
In this age of significant telecommunications competition, mobile network operators continuously seek new and innovative ways to create differentiation and increase profits. One of the best ways to do accomplish this is through the delivery of highly personalized services. One of the most powerful ways to personalize mobile services is based on location.

Using mobile devices, location-based services (LBS) leverage a user’s physical location to provide enhanced services and experiences. LBS enable a range of applications and services, such as navigation and mapping, workforce tracking, finding points of interest, and obtaining weather information.

Location awareness offers a compelling new business opportunity for application developers, operators, and content producers. The Symbian S60 platform includes a range of features to enable rich LBS applications and services, including location acquisition and landmarks.
3. Bluetooth implementation using state of the art Technology
Bluetooth is an open wireless protocol for exchanging data over short distances from fixed and mobile devices creating personal area networks (PANs). It can connect several devices, overcoming problems of synchronization. Bluetooth uses microwave radio frequency spectrum in the 2.4 GHz to 2.4835 GHz range. Maximum power output from a Bluetooth radio is 100 mW, 2.5 mW, and 1 mW for class 1, class 2 and class 3 devices respectively. Class 1 is comparable to the mobile phones. The implementation of the Bluetooth protocol stack is done using the AVR controller. The RF part uses off the shelf radio frequency module.
4. Performance evaluation of multiple antenna systems (MIMO)
The IEEE 802.11n is the standard for multiple antenna wireless communication systems, known as Multiple Input Multiple Output (MIMO). Multiple antenna systems are the promising technology for the future applications. Space-time coding provides a mechanism for transmitting the information over the channel using more than a single antenna. A benefit of space-time coding is the simplicity in the receiver architecture. The simple receiver architecture benefited in terms of power and cost in the implementation phase. The performance of the multiple antenna systems implying space time coding can decrees the transmitter signal power for much more information to be transmitted over the air as compared to the single antenna counterpart.
5. Process scheduling in a multi-core processor environment
Process scheduling is a technique that is used when there are limited resources and many processes are competing for them. In timesharing system, the CPU switches so frequently between jobs that the user does not feel that the machine is being shared by many processes or even many users.

If the system has more than one processor, then it is possible to execute more than one process at the same time. In this case, the operating system must schedule the processes. It means that some processes will be executed and others will have to wait. There are many strategies for deciding which process should be assigned to the CPU. In this project we have used a blend of the latest scheduling techniques to optimize the scheduling process for our given tasks. The tasks that we used had different completion time and they could also initiate some more child tasks (of their own types) upon their completion. Hence the job queue becomes bigger and bigger and we have to use our scheduler in such a way to complete more tasks in the given time.
6. Development of an Automatized wheel chair involving image processing and state of the art hardware tools
Our aim to the development of an automatized wheel chair is to facilitate the disabled people who can not even move their hands. For the purpose of its development image processing of the person operating the wheel chair is required. The image acquisition is done through the camera, which is interfaced to the wheel chair motors through an intelligent device. The intelligent device may be a Digital Signal Processor (DSP) or a combination of a General Purpose Processor (GPP) and a DSP. The image processing algorithm is running on the DSP whereas a GPP is used for control operations. The input to the wheel chair is an image taken by the camera and is being processed by the DSP and GPP and finally the two stepper motors are controlled. The wheel chair movement is controlled by stepper motors. The head movement determines the wheel chair position. The movement can be forward, backward, left and right.
In this project we have three phases.
Phase I (Simulation)
In this phase image would be acquired via a camera interfaced with MATLAB. To process the image exploring and examining of motion detection methods and algorithms would be achieved using the acquired Image. Motion detection algorithms would be tested on the image. These algorithms would be firstly tested on standard recorded videos and then be shifted to real-time videos. In a simple and sound logic to simulate the head movement, necessary for smooth processing, a sensitive square box build around the head will act as a threshold. Next a logic to send signals to parallel port is implemented.
Phase II (Hardware Development)
This is the hardware phase where a controller circuit is build to control the wheel chair using microcontroller. Interfacing the controlling circuit of the wheel chair with the PC and debugging and testing of the controller circuit would also be included in this phase.
Phase III (Hardware programming and Debugging)
This is the final phase of the project. The MATLAB code is converted to C code. The code then burned in the intelligent Device. Camera interfaced with the microcontroller and controlling circuitry of the wheel chair. At the end testing and debugging of the total circuitry is done.

The schematic of the microcontroller based control system of the proposed adapting unit is shown Figure 02. The electronic control board is based on a 8 bit low-cost micro-controller Microchip PIC16F628. The commands from four switches are sent to the microcontroller which operates as a central processing unit. The microcontroller then calculates the number of steps and drives the x- and y-axis stepping motor via a driving IC: ULN2803A. The status of the operating mode: “Forward”, “Neutral” or “Reverse” are indicated by LED L1, L2 and L3, respectively. The energy for the control board is supplied by the main battery system 24 Vdc of the power wheelchair, regulated to 12 Vdc and 5 Vdc by an IC regulator.
Log In Information
User Name:
Password: