1 / 41

Java ME Embedded: Theory and Practice

Java ME Embedded: Theory and Practice. Olga Mikhaltcova Alexander Mironenko Development department of the Java ME Embedded platform. Safe Harbor Statement.

alva
Download Presentation

Java ME Embedded: Theory and Practice

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java ME Embedded: Theory and Practice Olga Mikhaltcova Alexander Mironenko Development department of the Java ME Embedded platform

  2. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

  3. Agenda • The 3rd IT Revolution • Java: The Platform for Embedded Solutions • Oracle Java ME Embedded • Demo: Industrial Control System Prototype • Demonstration • Summary

  4. The 3rd IT Revolution Explosion of Devices and Data Data Volume “Things” will create majority of Internet traffic “Age of Mainframes” 1950-1970 “Internet of People” 1980-2010 “Internet of Things” 2015-… “Things” will outnumber PCs and Mobile Phones combined Time Mainframes Workstations/PCs Smart ConnectedDevices Mobile Phones People-to-device ratio N:1 1:M 1:1

  5. Everything Connected Wireless Health Connected Consumer Devices Point of Sale Kiosks Energy & Smart grid Industrial & Commercial Equipment Automative & Commercial Transportation

  6. Machine-to-Machine (M2M) … • Connect with “Out of Reach” data and processes • Dramatically increase efficiency • Enable new fields of business and new business models

  7. Microcontroller S/W Development must adapt Complexity of development, integration, and maintainance Programming Language CPU C/C++ Proprietary API RTOS

  8. Java lets You focus on the Customer Solution Stop reinventing and reintegrating the plumbing Java provides a common platform

  9. Java Offers More: It is A Game Changer Software flexibility drives business advantages Without Java With Java • Extend lifetime, flexibility, and value of your solutions • Create cross-platform, modular software applications • In-field s/w upgrades while maintaining system integrity • Reduce device certification and testing overhead • Limited flexibility, high cost • H/w-s/w interdependencies • Upgrade complexity • Impact on security/integrity Service-Enabled System Traditional Platform Loadable Applications and Services Component Cloud (Network/Enterprise) Native Application Java Platform OS + Core Services OS + Core Services Hardware Platform Hardware Platform

  10. The Breadth of Java Embedded Smart Energy & mHealth Multi-function Embedded Devices Sensors & Micro controllers Personal Devices Industrial controls & Network Appliances Smart Appliances & Consumer Electronics Connected Vehicles Communications

  11. Oracle Java ME Embedded Unique and dedicated features for embedded

  12. Oracle Java ME Embedded Stack (simplified) Tools Logging APIs XML Messaging Runtime Environment OEM APIs Access Point APIs Security & Trust Location Java ME SDK Test, Emulate AMS APIs Device Access APIs Web Services PIM and File IMP – NG CLDC-HI Virtual Machine On-Device Debugging NetBeans IDE Develop, Debug, Profile Device Port Porting Layer Embedded Hardware and RTOS

  13. Oracle Java ME Embedded 3.3 Stack A rich embedded application platform

  14. Device Access API Access Peripheral I/O Hardware directly from Java applications • Generic API to access peripheral I/O in a platform-neutral manner • ‘Late binding’ allows addition of new peripheral types without changing API • Enables development of Java-based ‘device drivers’ (non-real time) • No native application code • Also planned for availability on Java SE IMlet Application Layer Device Access API On-Device I/O Peripheral Access Application Environment Java VM CLDC

  15. Goals of the Demo This system prototype for what? example ofAPI usage additional level of comprehensive testing Solar Panel System Demo proof of usability API checking and correction

  16. Goals of the Demo What were the requirements? • Complete system prototype • Operability on the several interchangeable embedded devices including the emulator Java ME SDK • DA API mandatory usage • Simple integration with remote services • Connectivity demonstration • Other functionality including inherited from the Java ME

  17. Prototype’s Concept The “birth” of the idea The prototype of the solar panel positioning system based on the Java ME Embedded platform

  18. Prototype’s Concept Details • System repositioning by means of servo motors • Brightness measurement by a sensor • Automatic and manual positioning • Status indication using LEDs • Local control in the presence of suitable peripherals • Remote management, monitoring and logging • Sending statistics to the server

  19. Prototype’s Concept Working process

  20. Design: hardware architecture General scheme Statistics Server Light source Small Embedded Device Light sensor Java ME Embedded Application Network I2C Can be run on the same machine Remote Management Client Servo motors Servo controller UART / RS232

  21. Design: hardware architecture Supported platforms

  22. Design: hardware architecture Statistics Server Platform: Java ME SDK Emulator Java ME SDK Emulator USB-Serial converter Network Can be run on the same machine Remote Management Client Servo motors USB Servo controller UART / RS232

  23. Design: hardware architecture Platform: Raspberry Pi Statistics Server Light source Raspberry Piboard Light sensor Network I2C Can be run on the same machine Remote Management Client Servo motors RS232-Serial converter UART Servo controller UART / RS232

  24. Design: hardware architecture Platform: Keil MCBSTM32F200 Statistics Server Light source KEIL board Light sensor Network I2C Can be run on the same machine Remote Management Client Servo motors LEDs Joystick Servo controller UART / RS232 Buttons

  25. Design: software architecture General scheme Small Embedded Device Remote PC Management and monitoring System Control IMlet ----------------------------------------------- Java ME-E (IMP-NG) application RemoteManagement Client ---------------------------------------- Java FX application Logging Statistics GlassFish Server Statistics Servlet --------------------------------------- Java EE application

  26. Design: software architecture • Remote Management Client NetBeans IDE + Scene Builder +Java FX • connection using IP-address via proprietary protocol based on TCP • continuous polling in order to obtain current status of the hardware • remote system management: program start/stop, servo motor angles change, virtual joystick • log viewer • statistics from the GlassFish server

  27. Design: software architecture Remote Management Client NetBeans IDE + GlassFish Server + Oracle DB • accepts incoming HTTP-connection from the system control IMlet, processes POST-request, stores data in the database • accepts incoming HTTP-connection from the remote management client application, processes GET-request, generates HTML-page, sends it back • statistics can be viewed either in browser or by using JavaFX application • Statistics Servlet HTTP / GET Statistics Servlet System Control IMlet HTTP / POST Embedded Device

  28. Design: software architecture System Control IMlet GPIO System Control IMlet LEDs Remote Management Client SPSMP Server LEDs Driver Servo Driver Servo Controller TCP UART Logging Handler Program 1 Main Controller TCP Servo Motor 1 Statistics Servlet Statistics Module HTTP Servo Motor 2 Program N Light Sensor Driver Joystick Driver Buttons Driver GPIO I2C I2C Light Sensor Buttons Joystick

  29. Implementation features Code example: I2C light sensor connection /* open & configure */ I2CDeviceConfig cfg = new I2CDeviceConfig(CFG_BUS, CFG_ADDRESS, PeripheralConfig.DEFAULT, PeripheralConfig.DEFAULT); slave = (I2CDevice) PeripheralManager.open(I2CDevice.class, cfg); .. /* read color component */ slave.begin(); slave.write(tx[0]); rx[0] = (byte)slave.read(); .. slave.end(); .. /* close */ slave.close();

  30. Implementation features “Write once run anywhere”? • One programming language – Java • Common tooling for developing, debugging and deploying applications • UnifiedAPI Must be taken into consideration: • Different set and connectivity of peripherals • Different addressing/configuration of peripherals

  31. Implementation features Task №1 Different set and connectivity of peripherals How to deal with it? • Connect external peripherals • Write flexible implementation processing such situations Java ME Embedded (and in particularDA API) provides these opportunities!

  32. Implementation features Task №2 Different addressing/configuration of peripherals How to deal with it? • The integrator must provide unified configuration for the specific use • Possibility to change the default platform configuration • The configuration of the application itself, for example: • viaJAD-file • proprietary configuration file • a configuration request from a remote server

  33. Implementation features Java ME SDK Emulator • The opportunity to start developing without a real hardware • Parallelizing of the development cycles • The overall development cycle reducing • Convenient debugging

  34. Implementation features Automatic programs • Test • Endless test • Searching the position of maximum illumination • Light source tracking

  35. DEMONSTRATION

  36. Summary Demonstrated functionality of the product • CLDC, IMP-NG: • Multithreading and timers • Networking: HTTP andTCP • Record Management System (RMS) • DA API: • GPIO • UART • I2C • Logging API • IMletAutostart

  37. Summary • Java is a trusted, robust platform ideally-suited to embedded systems • Oracle Java ME Embedded product lets systems designers create customized, reliable, and integrated embedded solutions for resource-constrained devices • Java’s large ecosystem of developers, partners, support, and training supports on-time delivery of projects and products

  38. Summary “Write once run anywhere”! Statistics Server Light source Java ME SDK Light sensor Network I2C Can be run on the same machine Keil Raspberry Pi Remote Management Client Servo motors Servo controller UART / RS232

  39. Useful links Oracle Java ME Embedded 3.3 for Raspberry Pi (Early Access) Downloads http://www.oracle.com/technetwork/java/embedded/downloads/javame/java-me-e-raspberry-pi-1913843.html Oracle Java ME Embedded 3.3 for Keil Downloads http://www.oracle.com/technetwork/java/embedded/downloads/javame/index.html Java ME SDK 3.3 (Early Access) and Java ME SDK 3.3 Plugin for NetBeanshttp://www-content.oracle.com/technetwork/java/javame/javamobile/download/sdk/java-sdk-early-access-1912715.html JDK and NetBeans IDE http://www.oracle.com/technetwork/java/javase/downloads/jdk-7-netbeans-download-432126.html JavaFX and Scene Builder http://www.oracle.com/technetwork/java/javafx/downloads/index.html GlassFish Server http://glassfish.java.net/downloads/3.1.2.2-final.html

More Related