Archive

Posts Tagged ‘java’

Top Programming Languages & Operating Systems for the Internet of Things

May 19th, 2017 3 comments

The Eclipse foundation has recently done its IoT Developer Survey answered by 713 developers, where they asked  IoT programming languages, cloud platforms, IoT operating systems, messaging protocols (MQTT, HTTP), IoT hardware architectures and more.  The results have now been published. So let’s have a look at some of the slides, especially with regards to programming languages and operating systems bearing in mind that IoT is a general terms that may apply to sensors, gateways and the cloud, so the survey correctly separated languages for different segments of the IoT ecosystem.

Click to Enlarge

C and C++ are still the preferred languages for constrained devices, and developers are normally using more than one language as the total is well over 100%.

Click to Enlarge

IoT gateways are more powerful and resourceful (memory/storage) hardware, so it’s no surprise higher level languages like Java and Python join C and C++, with Java being the most used language with 40.8% of respondents.

Click to Enlarge

When it comes to the cloud with virtually unlimited resources, and no need to interface with hardware in most cases, higher level languages like Java, JavaScript, Node.js, and Python take the lead.

Click to Enlarge

When it comes to operating systems in constrained IoT devices, Linux takes the lead with 44.1%, in front of bare metal (27.6%) and FreeRTOS (15.0 %). Windows is also there in fourth place probably with a mix of Windows IoT core, Windows Embedded, and WinCE.

Click to Enlarge

Linux is the king of IoT gateways with 66.9% of respondent using it far ahead of Windows in second place with 20.5%. They have no chart for the cloud, probably because users just don’t run their own Cloud servers, but relies on providers. They did ask specifically about the Linux distributions used for IoT projects, and the results are a bit surprising with Raspbian taking the lead with 45.5%, with Ubuntu Core following closely at 44.4%.

Click to Enlarge

Maybe Raspbian has been used during the prototyping phase or for evaluation, as most developers (84%) have been using cheap development boards like Arduino, BeagleBone or Raspberry Pi. 20% also claim to have deployed such boards in IoT solutions.

Click to Enlarge

That’s only a few slides of the survey results, and you’ll find more details about Intel/ARM hardware share, messaging & industrial protocols, cloud solutions, wireless connectivity, and more in the slides below.

Via Ubuntu Insights

Azul Systems’ Zulu Embedded is a Build of OpenJDK for ARM, MIPS, PowerPC, and x86 Compliant with Java SE standard

April 6th, 2017 3 comments

Yesterday as I wrote about the Embedded Systems Conference 2017 schedule I came across a potentially interesting talk entitled “Building A Brain With Raspberry Pi and Zulu Embedded JVM” by Azul Systems that will explain how to build a brain emulator using a cluster of Raspberry Pi boards. I wanted to find more about it, but I have not been able to find any details about the project/demo at this stage. However, I could still learn a bit more about Zulu Embedded, which is said to be an open source Java Virtual Machine based on OpenJDK, compliant with Java SE standard, working on 32-bit & 64-bit ARM & x86, MIPS, and PowerPC, as well as  multiple operating systems.

Some of the key features of Zulu Embedded include:

  • Java Support – Java 6, 7, 8, and 9 when available
  • Java Configurations – Headless, headful, or compact Java Compact Profiles
  • Hardware – ARMv7 and 32-bit ARMv8, ARM64, Intel/AMD x86, 32-bit and 64-bit, MIPS, and PowerPC
  • Platforms & Operating Systems
    • Linux 32/64-bit – RHEL 5.2+, 6 & 7 or later, SLES 11 sp1/2/3, 12, CentOS 5.2+, 6 & 7 or later, Ubuntu 10.04, 12.04, 14.04 & 16.04, Debian Wheezy & Jessie, Wind River Linux, and Oracle Linux
    • Windows 32/64-bit – Windows 7, 8, 8.1, 10/IoT/Mobile, 2008 R2, 2012, 2012R2, Nano
    • Mac OS X
    • Hypervisors – VMware, Hyper-V, KVM
    • Cloud – Azure, AWS, Google, Snappy, Docker
  • Packages – ZIP, MSI and DEB are available. Custom packages on request.
  • Memory Footprint – 11 MB to 250+ MB

Some of the advantage of Zulu Embedded is that it is 100% open source released under GPLv2 with Classpath Exception (I could not find the source code however), and fully certified and compliant with OpenJDK community technology compatibility kit (TCK) from Oracle.

Zulu Embedded is free to download for ARM Linux 32-bit (hard and soft float), and x86 Windows & Linux 64-bit, as well as x86 Windows 10 IoT Core 32-bit for MinnowBoard MAX. You’ll need to contact the company for other configurations.

It’s been used in program such as openHab 2.0, which replaced Oracle JDK with Zulu Embedded JDK, since it can be freely redistributed (no licenses required), and performance and stability feels exactly the same according to comments on Github. One person explained how to install it on the Raspberry Pi board (note: early access program is not needed anymore, since the binary has been publicly released), and the installation procedure is just the same as with OpenJDK.

You can visit Zulu Embedded product page for more information.

Yi Technology Releases an Open API SDK for Yi and Yi 2 4K Action Cameras

August 31st, 2016 No comments

Yi Technology, the maker of Yi actions cameras, often wrongly reported as Xiaomi Yi cameras as they are sold in Xiaomi stores, has now released an Open API to allow software and hardware engineers to develop products – such as drones, robots, or 360 deg. video recording setups – using their cameras.

Yi_4K_Camera

YiOpenAPI supports three types of APIs available in Java or Swift languages:

  • Camera control (start/stop recording, capture picture, turn on/off viewfinder, etc…)
  • Camera settings (date/time, video resolution, photo size, video standard, etc…)
  • Camera state (record started/completed, video finder started etc…)

There are also some app samples, one of which being YI360Demo available in both binary and source code, and used to control multiple Yi cameras in order to shoot 360 deg. / VR  videos.

Hydra360 Rig for 16 to 22 Yi Camera

Hydra360 Rig for 16 to 22 Yi Cameras

You can find YiOpenAPI on github, get support on YiOpenAPI Facebook group, and sign-up for news updates on YiOpen.com.

Via GeekBuying Blog

The Eclipse Foundation Releases Open Source Smart Home & IoT Gateway Frameworks, MQTT & oneM2M Implementations

June 17th, 2016 3 comments

The Eclipse Internet of Things (IoT) Working Group has released – or soon will be releasing – four open source projects for the Internet of Things with Eclipse SmartHome 0.8 framework, Eclipse Kura 2.0 IoT gateway framework, Eclipse Paho 1.2 MQTT & MQTT-SN clients, and Eclipse OM2M 1.0 implementation of oneM2M standard.

Eclipse_IoTEclipse SmartHome 0.8

Eclipse SmartHome is a framework for smart home solutions that runs on embedded devices, including Raspberry Pi, BeagleBone Black or Intel Edison development boards.

The latest SmartHome 0.8 release includes a new REST API and corresponding “Paper UI” administration interface, support for new devices including Sonos speakers, LIFX bulbs, Belkin WeMo devices, digitalSTROM systems, EnOcean devices (via a new OSGi EnOcean Base Driver) and others, as well as a new rule engine supporting templates for beginners, JavaScript for automation rules and graphical rule editors.

You can find more details on Eclipse SmartHome page, and/or download SmartHome 0.8, and optionally SmartHome Designer for Linux, Mac OS X, or Windows.

Eclipse Kura 2.0

Eclipse Kura is a framework for building IoT gateways with the latest Kura 2.0 release to bring a new responsive user interface (UI), support for multiple cloud connections to Eurotech Everyware Cloud, Amazon AWS IoT, Microsoft Azure IoT and IBM IoT Foundation, new tools and code samples to ease the creation of Kura applications, and tighter integration with Apache Camel.

Eclipse Kura 2.0 will be available later in June. You can find more details, including instructions to use it on BeagleBone Black and Raspberry Pi boards on Eclipse Kura page. Kura is also found on commercial M2M and IoT gateways such Eurotech ReliaGATE 15-10.

Eclipse Paho 1.2

Paho MQTT Clients Features Comparison (Click to Enlarge)

Paho MQTT Clients Features Comparison (Click to Enlarge)

Paho provides an open-source client implementations of the MQTT and MQTT-SN messaging protocols in Java, Python, JavaScript, C, .Net, Android and Embedded C/C++ client libraries. Paho 1.2 release adds automatic reconnect & offline buffering functionality for the C, Java and Android Clients, webSocket support for the Java and Python Clients, and a new Go Client for Windows, Mac OS X, Linux and FreeBSD.

Visit Eclipse Paho page for more details about the implementations and to download the latest 1.2 version.

Eclipse OM2M 1.0

Eclipse OM2M is an open source implementation of the oneM2M standard, and the version 1.0 includes the following features:

  • Modular platform architecture, based on OSGi making it highly extensible
  • Lightweight REST API exposed through multiple communication bindings including HTTP and CoAP protocols and supporting various content formats such as XML and JSON.
  • Flexible data storage based on an abstract persistence layer supporting embedded & server databases, in-memory mode, SQL & NoSQL models.
  • Implementation of  Dedicated Common Service Entity (CSE) for Infrastructure node (IN), Middle Node (MN), and Application Service Node (ASN), and Common Service Function (CSF) including: Registration, Application and Service Management, Discovery, Data Management and Repository, Subscription and Notification, Group Management, Security, etc.
oneM2M Functional Architecture with AE (Application Entity), CSE and NSE

oneM2M Functional Architecture with AE (Application Entity), CSE and NSE

Version 1.0 release will be available later this month, you can find out more on Eclipse OM2M page.

The foundation has also issued a proposal for Eclipse Kapua open source project aimed to create a modular integration platform for IoT devices and smart sensors.

You can also check out other open source IoT projects on Eclipse IoT microsite.

Android N Developer Preview Released with Multi-Window Support, PiP, Background Apps Optimizations…

March 10th, 2016 6 comments

Google has just released an early developer preview of Android 7.0 N (Nutella?) before the OS officially launched later this summer with new features such s multi-window support, TV recording,  Picture-in-picture, bundled notifications, and efficiency improvements.

Multi-window Support in Android N

Multi-window Support in Android N

So let’s have a look at some of improvements:

  • Multi-window – A new manifest attribute called android:resizableActivity is available for apps targeting N and beyond, allowing your activity to be launched in split-screen modes on phones and tablets. In addition, activities can also go into picture-in-picture mode on devices like TVs by setting android:supportsPictureInPicture to true.
  • Direct reply notifications: Initially an Android Wear only features, the RemoteInput notification API has now been added for smartphones and tablets, and allows user to reply directly within the notification shade.
  • Bundled notifications – The Notification.Builder.setGroup() method can be used to bundle notifications from the same app together.
  • Efficiency Improvements – Doze has been further improved to save battery whenever the screen turns off, and work is still being done on Project Svelte to reduce memory usage so allow Android to runs on more devices, and in Android N they’ve made background work more efficient using JobScheduler.
  • Improved Java 8 language support – Google has brough Java 8 language features to Android, and Jack compiler (Java Android Compiler Kit) can use many Java 8 features in Android 2.3 and greater.
  • Data Saver – Users can enable Data Saver in order to use less data with the system blocking background data usage and signalling apps to use less data in the foreground wherever possible. Users can also whitelist specific apps to allow background metered data usage even when Data Saver is turned on.
  • TV Recording Improvements – TV input services let the user pause and resume channel playback via time-shifting APIs. Android N expands on time-shifting by letting the user save multiple recorded sessions. Users can schedule recordings in advance, or start a recording as they watch a program. Once the system has saved a recording, the user can browse, manage, and play back the recording using the system TV app
Picture-in-Picture in Android N

Picture-in-Picture in Android N

You can try the N Developer Preview on the Android emulator, Nexus 6, Nexus 5X, Nexus 6P, Nexus Player, Nexus 9, and Pixel C devices, with the latter being sold at a $150 discount. To get Android N SDK, you’ll also need to install Android Studio 2.1, because the new version of Android required Jack compiler not supported in earlier versions.

Android N Preview in Android Studio 2.1 (Click to Enlarge)

Android N Preview in Android Studio 2.1’s SDK Manager (Click to Enlarge)

I’ve just been informed Android N source code is, or soon will be in AOSP, since android-n-preview-1 tag has been spotted, and that’s the way to get the source:

Wio Link is an ESP8266 Board Designed to Make IoT Projects Easier (Crowdfunding)

December 3rd, 2015 1 comment

There are already plenty of board or modules based on Espressif ESP8266 WiFi SoC, but if you don’t like soldering, or would rather avoid breadboards and some cables for your or your kids’ projects, Wio Link may be interesting, as all you need to is to connect Grove modules required for your applications to get started, and Seeed Studio also took care of the low level software part and a drag-and-drop mobile app is provided, so software programming has been made easy too.

Wio_LinkWio Link hardware specifications:

  • SoC – Espressif ESP8266EX Tensila SoC
  • Storage – 4MB flash
  • Connectivity – 802.11b/g/n WiFi, with WEP/TKIP/AES encryption support
  • Expansion – 6x Grove connectors: 3x digital, 1x analog, 1x UART and 1x I2C (3.3V I/Os)
  • Power Supply
    • 5V via micro USB port
    • 3.4 ~ 4.2V via external battery
    • Output DC Current – 1000mA MAX
    • Charge Current: 500mA MAX
  • Dimensions – 55mm*48mm
  • Weight – 26g
  • Certifications – CE/FCC/IC

That’s for the main board, and you can connect one or more of the many Grove modules available so far. Now just power the board with a USB charger or a LiPo battery, and start the mobile app, available for Android and iOS, in order to setup the board, by dragging and dropping the Grove module(s) you’ve connected. The app will also let you upgrade the firmware over the air (OTA).

Wio_Linux_Visual_Configuration

The behavior of the board can either be set using IFTTT (if-this-then-that) applications through Seeed IFTTT channel, or programming the board with a RESTful API in Python, JavaScript, Node.js, PHP, Objective-C or Java.

Some sample applications include connected traffic lights, pet feeder, plant watering, and whatever you may think of, as you can see in the video below.

Seeed Studio has already raised well over their $20,000 target on the Kickstarter campaign in less than day, and while all $9 early bird rewards are gone, you could still pledge for a Wio Link development board for $12. You may also consider a kit with the board and some Grove modules starting at $29, and up to $89 for a kit with two Wio Link boards, and 16 Grove modules including sensors, a relay, some buttons, a servo, a speaker, and LED strip, and more. Shipping is $5 for most rewards, and free for the larger ones. Delivery is planned for March 2016.

Gemalto Cinterion Concept Board Features 3G Connectivity, Arduino Headers for Secure Java M2M Applications

December 22nd, 2014 No comments

Gemalto is a digital security company providing software solutions, smart cards, and secure modules, and one the largest manufacturer of SIM cards. The company has launched a developer board earlier this year called Cinterion Concept Board with the company’s Cinterion EHS6 M2M Java embedded machine-to-machine (M2M) 3G module, and Arduino compatible headers.

Cinterion_Concept_BoardCinterion Concept Board specifications:

  • 2G/3G M2M Module – Gemalto Cinterion ESH6 with Java ME embedded support
  • Cellular Connectivity
    • GPRS/EDGE Class 12, HSPA, 5 bands 3G, 4 bands 2G.
    • Voice support.
    • On-board antenna (top left side on picture)
    • SIM card holder
  • Expansion
    • Arduino Compatible headers
    • 8 GPIO with level shifters, and corresponding LEDs
  • USB – 1x mini USB port for power, 1x mini USB port for debugging and power
  • Misc – Start on/off, and user buttons, LEDs for serial interface.
  • Power – 5V via either mini USB ports, solder pads for external battery.
  • Dimensions – N/A

The board is programmed using Java ME 3.2, and supports FOTA (Firmware OTA updates).  Unfortunately few details are available, as the company only provides support with the SDK and documentation to people who bought the board. Having said that, one developers provided a quick start guide and close-up pictures of the board in Russian so it can get a better idea of the board interface, and what it is capable of. A video entitled Introduction to Java ME Development with Gemalto Concept Boardexplains how to get started with programming, and makes clear a Windows PC is required for development with Java ME SDK 3.2 and NetBeans 7.x.

A quick demo with a fan shows it’s possible to use to board to start and stop a fan by making a phone call to the board.

The board sells for 99 Euros excluding VAT and shipping via Gemalto distributors. More details can be found on Gemalto’s Cinterion Concept Board page.

Thanks to Nanik for the tip.

How to Build Android 4.4 for Rockchip RK3288 Devices (Tronsmart Orion R28)

September 16th, 2014 14 comments

After blowing up my ATX power supply, and learning such things as “FULL” power supplies do exists, I finally managed to build Android for Tronsmart Orion R28 using the provided SDK. I haven’t tried to load it on the device yet, but the build could complete successfully after following the steps below in Ubuntu 14.04. The SDK is probably not specific to one device, so it might just also work on other RK3288 TV boxes and tablets.
Android_4.4_SDK_Orion_R28

First download Android 4.4 SDK for RK3288, or use the one in the micro SD card provided with the Beta version of R28 Pro and Meta.

Install some dependencies:

Extract the SDK:

And build the kernel first:

  1. Enter the kernel directory:
  2. Change arch/arm/boot/dts/Makefile to use RK3288 device tree file instead of an RK3188 (may not be needed, but the build failed for me without that change…):

    It’s also quite possible you need to extract the device tree file from your firmware or device.
  3. Building the kernel and resources (device tree + logo) images:
  4. Done
    It will fail with:

    drivers/usb/dwc_otg_310/dwc_otg_hcd.c: In function ‘dwc_otg_hcd_rem_wakeup_cb’:
    drivers/usb/dwc_otg_310/dwc_otg_hcd.c:446:31: error: inlining failed in call to always_inline ‘dwc_otg_hcd_to_hcd’: function body not available

  5. Edit the culprit file, remove the inline directive, and continue the build:
  6. Similar errors will occur one or twice more, so repeat step 5 as needed….
  7. Create kernel.img (not sure the command line is correct)

Before building Android, you need to make sure you use the right version of Java. I recently build AOSP for ARMv8 which requires OpenJDK 1.7 in Ubuntu, but this version requires Oracle 1.6 SE.  At first I used JDK 6u45 (1.6.045), but I got some errors:

In file included from external/chromium_org/content/common/android/hash_set.cc:5:0:
out/target/product/rk3288/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:10:26: error: extra tokens at end of #ifndef directive [-Werror]

Based on a thread on XDA developer forums, I installed Java 1.6.0.27 instead, which you can download here:

Now add the new Java version to the “alternatives”:

and make sure Java 1.6.0.27 is used by default:

I’m not sure all six tools need to be configured, but it probably does no hurt to do so.

Finally, you just need to run a script to build Android:

Be patient, and it should finish with something like:

Creating filesystem with parameters:
Size: 1073741824
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 4096
Label:
Blocks: 262144
Block groups: 8
Reserved block group size: 63
Created filesystem with 1792/65536 inodes and 149182/262144 blocks
+ '[' 0 -ne 0 ']'
Install system fs image: out/target/product/rk3288/system.img
out/target/product/rk3288/system.img+out/target/product/rk3288/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=1096212480 blocksize=135168 total=598297319 reserve=11083776
TARGET_PRODUCT=rk3288
TARGET_HARDWARE=rk30board
system filesysystem is ext4
make ota images...
create boot.img with kernel... done.
create recovery.img with kernel... done.
create misc.img.... done.
create system.img... done.
*******************************
3288_4.4 sdk do finish
*******************************

All relevant files can be found in rockdev/Image-rk3288 directory:

Next step is to flash it to the device, and see if it can boot.