Ambient Networks Mobile Phone Integration
Total Page:16
File Type:pdf, Size:1020Kb
Ambient Networks Mobile phone integration Carlos Rocha, Rui Botelho PSTFC FEUP – DEEC 2004 Ambient network - Mobile phone integration Supervisor professor: Prof. Manuel Alberto Pereira Ricardo Project supervisor: Prof. Mário Jorge Moreira Leitão Department: Department of Electrical and Computer Engineering Institutions: Faculty of Engineering at University of Oporto Institute of Engineering and Computer Systems of Oporto i About the authors Carlos Rocha Carlos is a student at FEUP since 1999. Carlos first experience on Symbian came with the acknowledgment of the project in the end of 2003. The work on this subject continues at the time of this writing. Student number: 990503145 E-mail: [email protected] Telephone: 961818010 Rui Botelho Rui is also student at FEUP since 1999. As with Carlos, Rui Botelho heard about Symbian in late 2003 as it was a project proposal of Prof. Manuel Ricardo. Since then, this area has been one of his main interests. Student number: 990503146 E-mail: [email protected] Telephone: 963379295 ii We would like to thank Professor Manuel Pereira Ricardo for believing in this work and helping us to overcome the problems that we met along the semester. We also would like to thank our colleagues, Filipe Abrantes, Ricardo Duarte and António Madureira for all the work done in the integration of our projects. A special thank you note goes to Filipe Sousa from INESC for all the help and support given. iii Contents 1. Introduction 1.1 Overview....................................................................................................1 1.2 Objectives ..................................................................................................2 1.3 Results .......................................................................................................3 1.4 Report structure .......................................................................................4 2. Symbian OS 2.1 Introduction to Symbian OS....................................................................6 2.1.1 Symbian History ..........................................................................6 2.1.2 Symbian OS Structure .................................................................7 2.1.3 Networking infrastructure............................................................10 2.2 Java programming for Symbian .............................................................12 2.2.1 Introduction..................................................................................12 2.2.2 Java and Symbian ........................................................................12 2.2.3 Programming essentials ...............................................................14 2.3 Symbian C++ programming....................................................................16 2.3.1 Getting started..............................................................................16 2.3.2 Development basics .....................................................................17 2.3.3 Applications structure..................................................................18 2.3.4 Implementation Details................................................................21 2.4 Summary ...................................................................................................23 3. PC connectivity 3.1 Introduction ..............................................................................................24 3.2 Linux notes ................................................................................................25 3.3 Bluetooth connectivity under Linux .......................................................26 3.4 Summary ...................................................................................................27 4. Project description 4.1 Overview....................................................................................................28 4.2 Fundamentals............................................................................................30 4.3 Application structure ...............................................................................33 4.4 Networking................................................................................................45 4.5 Results........................................................................................................50 4.6 Summary ...................................................................................................51 iv 5. Project evaluation 5.1 Testing procedure.....................................................................................52 5.2 Test validation...........................................................................................54 6. Conclusion 6.1 Review of objectives and results..............................................................55 6.2 Main conclusions.......................................................................................55 6.3 Future work...............................................................................................56 Appendix A – Symbian’s History............................................................ 57 Appendix B – How to create a Java application ...................................... 61 Appendix C – First approach to Symbian C++ programming................. 64 Appendix D – How to create a C++ application...................................... 65 Appendix E – Building an application..................................................... 66 Appendix F – How to create a simple installation file ............................ 69 Appendix G – The Communications Database classes ........................... 70 Appendix H – Using active objects ......................................................... 76 Appendix I – Sockets API ....................................................................... 79 Appendix J – Using Bluez tools .............................................................. 96 References .............................................................................................101 v Acronym list ACL – Asynchronous Connectionless packet AVKON Series 60 extensions and modifications to Symbian’s Uikon and other parts of the Symbian OS Application Framework. CBA - Command Button Area, i.e. toolbar CDC – Connected Device Configuration Defines a Java runtime environment for “high end” consumer devices with constrained hardware resources such as set top boxes, PDAs and Communicators. Falls under the J2ME umbrella. CLDC – Connected Limited Device Configuration Defines a Java runtime environment for devices with highly constrained hardware resources. CommDb Communications database offered by Symbian. It provides access to extensible database which holds information about internet access, GPRS connections, WAP settings, proxy servers DBMS – Database Management System Defines a general relational database access API, and allows different database implementations to be provided. DUN – Dial-Up Networking profile FTP – File Transfer Profile GAP – Generic Access Profile GOEP – Generic Object Exchange (OBEX) Profile GPRS – General Packet Radio Service vi GSM – Global System for Mobile Communications. GSM is the world’s most widely-used digital mobile phone system. HCI – Host Controller Interface HTTP – HyperText Transfer Protocol IDE – Integrated Development Environment JABWT - Java API for Bluetooth Wireless Technology An optional API that allows J2ME applications to access Bluetooth functionality. JAD – Java Application Descriptor (file) JAR – Java Archive (file). Java Industry standard object-oriented language and virtual machine, invented by Sun Microsystems and formally released in 1996. Java is an ideal language for network applications and applets. Sun's Java specifications include many Java APIs and platforms, including the JavaPhone API and PersonalJava platform, which are included in Symbian OS. J2ME – Java 2 Platform, Micro Edition. The edition of the Java platform that is targeted at small, standalone or connectable consumer, and embedded devices. The J2ME technology consists of a virtual machine and a set of APIs suitable for tailored runtime environments for these devices. The J2ME technology has two primary kinds of components – configurations and profiles. JavaPhone A Java API specification controlling contacts, power management, call control, and phonebook management, intended specifically for the programmability requirements of mobile phones. JCP – Java Community Process An open organisation of Java developers and licensees whose charter is to develop and revise Java technology specifications, reference implementations, and technology compatibility kits. vii JSR – Java Specification Request The process by which new Java specifications are defined. Part of the Java Community Process. JTAPI – Java Telephony API The Java Telephony API is an extensible API that offers an interface to all call control services (from those needed in a consumer device up to those of call centers). JTAPI is part of the JavaPhone API. JTWI – Java Technology Wireless Initiative An initiative to provide a roadmap of mobile phone related JSRs, indicating their availability in different markets around the world a specification describing the essential client components of an end-to-end wireless environment also to provide a Reference Implementation of the technology and a Technology Compatibility Kit. JVM – Java Virtual Machine. Kernel Core of an operating system, a kernel manages the machine’s hardware resources (including the processor and the memory), and