# Introduction ecent technical improvements have resulted in the evolution of wireless ad hoc networks composed of twists that are self-organizing and can be deployed without infrastructure support. These devices generally take in small form factors, and have embedded storage, processing and An ability to communicate effectively. While ad hoc networks may support different wireless standards, the current state of the art has been mostly confined to their operations in the 900 MHz and the 2.4 GHz industrial, scientific and medical (ISM) bands. With the rising proliferation of wireless devices, these rings are increasingly getting congested. At the same time, in that respect are several frequency bands licensed to operators, such as in the 400-700 MHz range, that are used sporadically or Technology, CBE. e-mail: happyramm900@gmail.com parliamentary law to direct the vital problem of spectrum scarcity, the FCC has recently sanctioned the usage of unlicensed devices in licensed bands. Therefore, dynamic spectrum access (DSA) techniques are offered to work out these current spectrum inefficiency problems. This new field of research foresees the growth of cognitive radio (CR) networks to further improve spectrum efficiency. On the infrastructure-based CR networks, the observations and analysis performed by each CR user feeds the central CR base-station, so that it can reach determinations on how to avoid interfering with primary networks. Agreeing to this decision, each CR user reconfigures its communication parameters, as indicated in Fig. 1. Since the CR user cannot predict the influence of its activities on the entire network with its local observation, cooperation schemes are essential, where the noted data can be exchanged between devices. under-employed for transmission The licensing of the wireless spectrum is currently undertaken on a longterm basis over vast geographical areas. In # a) Spectrum Sensing A CR user can be allocated to only an unused part of the spectrum. Consequently, a CR user should monitor the available spectrum bands, and then detects spectrum holes. Spectrum sensing is a basic functionality in CR networks, and thence it is closely linked to other spectrum management functions as well as layering protocols to offer data on spectrum availability. # b) Spectrum Decision Once the available spectrums are identified, it is indispensable that the CR users select the most appropriate band according to their QoS requirements. # c) Spectrum Sharing Since there may be multiple CR users trying to access the spectrum, their transmissions should be organized to prevent collisions in overlapping portions of the spectrum. Spectrum sharing provides the capacity to share the spectrum resource opportunistically with multiple CR users, which includes resource allocation to avoid interference caused to the main network. 1.4 spectrum mobility if a pu is detected in the specific part of the spectrum in use, cr users should vacate the spectrum immediately and stay on their communications in another vacant portion of the spectrum. # II. # Sensing Control The main objective of spectrum sensing is to find more spectrum access opportunities without interfering with primary networks. To this end, the sensing operations of CR users are controlled and coordinated by a sensing controller, which considers two main issues on (1) how long and frequently CR users should sense the spectrum to achieve sufficient sensing accuracy in in-band sensing, and (2) how quickly CR user can find the available spectrum band in out-of-band sensing. # a) In-Band Sensing Control The first issue is related to the maximum spectrum opportunity as well as interference avoidance. The in-band sensing generally adopts the periodic sensing structure where CR users are allowed to access the spectrum only during the transmission period followed by sensing (observation) period. In the periodic sensing, longer sensing time leads to higher sensing accuracy, and hence to less interference. But as the sensing time becomes longer, the transmission time of CR users will be decreased. Conversely, while longer transmission time increases the access opportunities, it causes higher interference due to the lack of sensing information. Thus, how to select the proper sensing and transmission times is an important issue in spectrum sensing. # Radio Environment Since the available spectrum holes show different characteristics, which vary over time, each spectrum hole should be characterized by considering both the timevarying radio environment and the spectrum parameters such as operating frequency and bandwidth. Hence, it is essential to define parameters that can represent a particular spectrum band as follows: ! Interference: From the amount of the interference at the primary receiver, the permissible power of a CR user can be derived, which is used for the estimation of the channel capacity. ! Path loss: The path loss is closely related to the distance and frequency. As the operating frequency increases, the path loss increases, which results in a decrease in the transmission range. If transmission power is increased to compensate for the increased path loss, interference at other users may increase. # a) Primary User Activity In order to describe the dynamic nature of CR networks, we need a new metric to capture the statistical behavior of primary networks, called primary user (PU) activity. Since there is no guarantee that a spectrum band will be available during the entire communication of a CR user, the estimation of PU activity is a very crucial issue in spectrum decision. Most of CR research assumes that PU activity is modeled by exponentially distributed inter-arrivals. # IV. # Spectrum Sharing for Cognitive Radio ad hoc Networks The shared nature of the wireless channel necessitates coordination of transmission attempts CR users are generally regarded as 'visitors' to the spectrum. Hence, if the specific portion of the spectrum in use is required by a PU, the communication needs to be continued in another vacant portion of the spectrum. This notion is called spectrum mobility. Spectrum mobility gives rise to a new type of handoff in CR networks, the so-called spectrum handoff, in which, the users transfer their connections to an unused spectrum band. In CRAHNs, spectrum handoff occurs: (1) when PU is detected, (2) the CR user loses its connection due to the mobility of users involved in an on-going communication, or (3) with a current spectrum band cannot provide the QoS requirements. # VI. # Common Control Channel The common control channel (CCC) is used for supporting the transmission coordination and spectrum related information exchange between the CR users. It facilitates neighbor discovery, helps in spectrum sensing coordination, control signaling and exchange of local measurements between the CR users. The operation of the CCC is different from the data transmission over the licensed band in the following aspects: ! CR users may optimize their channel use over a number of constraints, such as channel quality, access time, observed PU activity, network load, among others during CR data transmission. However, these parameters are not known to the CR users in advance at the start of the network operation, and thus, it is a challenge to choose the CCC with the minimum or no exchange of network information. # VII. Network Layer for Cognitive Radio ad hoc Networks At the network layer, the selection of the transmission bands and the routing path must be undertaken jointly, This is a key challenge as nodes only have limited local information. The sudden appearance of a PU may render certain channels unusable in the vicinity of CR nodes, necessitating a local change in the existing routes. In such situations, the routing layer is presented with two options. The first of these involves circumventing the affected region. # VIII. # Transport Layer for Cognitive Radio ad hoc Networks As the transport protocol usually runs at the end nodes (source and destination), it has limited knowledge of the conditions of the intermediate nodes. Typically, routes in an ad hoc network may involve multiple hops, and hence the end-to-end reliability becomes important. By regulating the transmission rate of the source, the transport layer adapts to the congestion in the route and maintains a buffer of unacknowledged packets for error recovery. The main problem in classical ad hoc networks is incorrectly attributing packet losses to network congestion, when they are actually caused by mobility of the nodes or bad channel 1.Route disruptions due to spectrum sensing 2.Large bandwidth variations. # Global Journal of Computer Science and Technology Volume XIV Issue IV Version I Under the commons model, the spectrum is made available as a contiguous frequency block, that must be separated into channels for use by the CR users. The number of channels should be such that the CR users have sufficient choice is choosing distinct and non-overlapping channels whenever possible, and at the same time be able to sustain a minimum desired channel throughput. In the absence of a central entity, balancing this tradeoff by creating an optimal number of channel divisions is a challenge X. # Implementation with Android os The Android open-source software stack consists of Java applications running on a Java-based, object-oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Libraries written in C include the surface manager, OpenCore media framework, SQLite relational database management system, OpenGL ES 2.0 3D graphics API, WebKit layout engine, SGL graphics engine, SSL, and Bionic libc. In this part we implement cognitive based manets implement with android os. At Google, the team led by Rubin developed a mobile device platform powered by the Linux kernel. Google marketed the platform to handset makers and carriers on the premise of providing a flexible, upgradable system. Google had lined up a series of hardware component and software partners and signaled to carriers that it was open to various degrees of cooperation on their part. Figure 4 : Android Android uses Linux as a hardware abstraction layer and use the powerful of Linux kernel and the wide make Linux calls directly , you always use the Dalvik(Android Virtual Machine).andSome of you may be aware that Android does not show adhoc networks. More precisely, and quoting from the AOSP Android uses wpa_supplicant as the platform interface to the Wi-Fi device. Your Wi-Fi driver must be compatible with the standard wpa_supplicant in addition to extensions added to the supplicant. # XI. # Android Platform Differences Android is hailed as "the first complete, open, and free mobile platform." Complete: The designers took a comprehensive approach when they developed the Android platform.They began with a secure operating system and built a robust software framework on top that allows for rich application development opportunities. Open: The Android platform is provided through open source licensing. Developers have unprecedented access to the handset features when developing applications. Free: Android applications are free to develop.There are no licensing or royalty fees to develop on the platform. No required membership fees. No required testing fees. No required signing or certification fees.Android applications can be distributed and commercialized in a variety of ways. For Android 1.5, the Linux kernel received an upgrade from version 2.6.25 to 2.6.27. Although this type of change might not have an obvious effect for the typical Android developer, it is important to note that the kernel can and will be upgraded frequently. These seemingly minor incremental updates often include major security, performance, and functional features. Kernel changes often have an impact on the security of the underlying device operating system and provide features and improvements for OEM-level Android device manufacturers. When stable, these features can be exposed to developers as part of an Android SDK upgrade, in the form of new APIs and performance enhancements to existing features. The Android 1.5 version provides substantial feature enhancements, many of which tie back to features of the upgraded Linux kernel. Although the kernel memory footprint is larger, overall system performance has improved and a number of bugs have been fixed. 1![Figure 1 : CR use](image-2.png "Figure 1 :") 2![Figure 2 : Configuration Parameters A theoretical framework is developed to optimize both sensing and transmission times simultaneously in such a way as to maximize the transmission efficiency subject to interference avoidance constraints where both parameters are determined adaptively depending on the time-varying cooperative gain and Spectrum characterization. III.](image-3.png "Figure 2 :") ![users. In this respect, spectrum sharing provides the capability to maintain the QoS of CR users without causing interference to the PUs by coordinating the multiple access of CR users as well as allocating communication resources adaptively to the changes of radio environment. Thus, spectrum sharing is performed in the middle of a communication session and within a medium access control (MAC) protocol and resource allocation in classical ad hoc networks. However, the unique characteristics of cognitive radios such as the coexistence of CR users with PUs and the wide range of available spectrum incur substantially different challenges for spectrum sharing in CRAHNs.](image-4.png "") 3![Figure 3 : Spectrum Design with Ad-hoc networks](image-5.png "Figure 3 :") ![Spectrum can be shared among multiple users under pre-decided regulatory models. There are two IX.Cr ad hoc Networks based onCommons Modelthe spectrum band, and includes many functionalities of general models for assigning spectrum usage rights in CR networks as follows ! Exclusive use model: In this model, the spectrum is licensed to users within a given geographical region with well established rules for their protection from external interference. a) Determination of Channel Structure](image-6.png "") © 2014 Global Journals Inc. (US) Cognitive Location based Mobile AD HOC Networks Implementation with an Android Operating Systems is to integrate these functions in the layers of the protocol stack, so that the CR users can communicate reliably in a distributed manner, over a multi-hop/multispectrum environment, without any infrastructure support. The discussions provided in this survey strongly advocate cooperative spectrum-aware communication protocols that consider the spectrum management functionalities. This cross-layer design requirement necessitates a rethinking of the existing solutions developed for classical wireless networks. Many researchers are currently engaged in developing the communication technologies and protocols required for CRAHNs. However, to ensure efficient spectrumaware communication, more research is needed along the lines introduced in this survey.In this system can be implemented with ANDROID with Suitable functions. * A multipath routing survey for mobile ad hoc networks SAdibi SErfani Proceedings of the IEEE Consumer Communications and Networking Conference (CCNC) the IEEE Consumer Communications and Networking Conference (CCNC) January 2006 2 * A survey on routing protocols for wireless sensor networks KAkkaya MYounis 2005 Elsevier 3 * NeXt generation/ dynamic spectrum access/cognitive radio wireless networks: a survey IFAkyildiz W.-YLee MCVuran MShantidev Computer Networks Journal 2006 Elsevier * Secondary pricing of spectrum in cellular CDMA networks ADaoud MAlanyali DStarobinski Proceedings of the IEEE DySPAN the IEEE DySPANDublin, Ireland 2007. April 2007 * Corvus: a cognitive radio approach for usage of virtual unlicensed spectrum RWBrodersen AWolisz DCabric SMMishra DWillkomm 2004 Berkeley Wireless Research Center (BWRC) White paper * Implementation issues in spectrum sensing for cognitive radios DCabric SMMishra RWBrodersen Proceeings of the IEEE Asilomar Conference on Signals, Systems and Computers eeings of the IEEE Asilomar Conference on Signals, Systems and Computers 2004. November 2004 * Spectrum sensing measurements of pilot, energy, and collaborative detection DCabric ATkachenko RWBrodersen Proceedings of the IEEE Military Communications Conference (MILCOM) the IEEE Military Communications Conference (MILCOM) October 2006 * Primary user activity modeling using first-difference filter clustering and correlation in cognitive Radio networks BCanberk IFAkyildiz SOktug Proceedings of the IEEE Sensor and Ad Hoc Communications and Networks (SECON) the IEEE Sensor and Ad Hoc Communications and Networks (SECON) December 2008. September 2005 9 L. Cao, H. Zheng, Distributed spectrum allocation via local bargaining * Distributed rule-regulated spectrum sharing LCao HZheng IEEE Journal on Selected Areas in Communications 26 1 2008 * Android Development