Tuesday, September 12, 2017

Internet of Things (IOT) Basics


Internet of Things (IOT)

                           The Internet of Things (IoT) refers to the ever-growing network of physical objects and the communication that occurs between these objects and other Internet-enabled devices and systems.
Purpose of IOT
     User can Remotely:
  • Connect with devices to learn about it
  • Monitor devices
  • Search for devices
  • Interact with devices
How to make things – IOT
  • Every Device (in World) have Unique identity
  • Have sensors
  • Device have ability to communicate
  • Connect through any (wired/wireless/satellite) network
  • Manage from remote to create new business values and Revenues
IoT Architecture 

             IoT offers advanced connectivity of devices, systems, and services that goes beyond machine-to-machine communications(M2M) and covers a variety of protocols, domains, and applications. 

Cities / Connected Communities  

  • Lighting, water management
  • Monitoring & security
  • Traffic control

Energy & Resources

  • Voltage and Power sensors
  • Meters and breakers
  • Fault detection
Building and Home Automation

  • Thermostats, HVAC, lighting
  • Presence sensors, lockers, actuators
  • Meters, smart-plug, HEC
Industrial & Manufacturing

  • Lighting, security, actuators
  • Production control
  • Robotics
Medical and Healthcare Systems

  • People monitoring
  • Bio sensors, probes
  • Remote Health
Life Sciences

  • Independence through technology
  • Information when you need it
  • Connected when you need it
Transportation & Environment

  • Electric Mobility, EVs and HEVs
  • High speed trains
  • Infrastructures

Home Automation

                 A home automation system integrates electrical devices in a house with each other. It provides improved convenience, comfort, energy efficiency and security. 

Refrigerator:

  • RFID tags recorders groceries as needed, and suggests recipes
Electric Toothbrush:

  • Automatically recorders brush heads, shares brushing habits with your dentist
Cell Phone:

  • Secure performs identification & verification for payments
Coffee maker:

  • Custom setting for each coffee type, starts when alarm goes off
Smart Scale:

  • Measures and sends weight into for progress tracking
Microwave:

  • Automatically sets cook cycle with RFID recognition
Media Player:

  • Remotely orders 
  • new songs & video
Building Security:

  • Security cameras interact with facial recognition database
Exercise Equipment:

  • Recognize individual user and tracks workout schedules
 HVAC:

  • Controls temperature & lights for maximum efficiency
 Television:

  • Immediate “one-click” ordering of products seen on commercials
Vending:

  • Automatically recorders supplies before it’s empty
 VoIP phone:

  • Automatic updates, integration and forwarding
Printer:

  • Automatically recorders toner and papers as needed

 Smart Building

           Building Automation System(BAS) is designed to monitor and control the mechanical, security, fire and flood safety, lighting and humidity control and ventilation systems in a building. 
 Disaster Prevention

  • Raise alarm to decrease the impact of disasters like fire, earthquakes, industrial accidents and communication failures.
Network Monitoring

  • Monitors a network for threats and problems caused by overloaded and/or crashed servers
Lighting Control

  • Switch ON/OFF light in occupied/unoccupied areas
Temperature Control

  • Temperature sensor in the zone provides feedback to the controller to deliver heating or cooling as needed
Energy Storage

  • Measure electrical performance of the building and alert if device is wasting more than the usual amount of energy
Control Elevators and Escalators

  • Remotely control elevators, and escalators to ensure safety as well as interoperability
Monitoring Cameras

  • Monitor installed cameras to identify security threats
 Security Control

  • Security cameras interact with facial recognition database

Cities/Connected Communities

           Building Automation System (BAS) is designed to monitor and control the mechanical, security, fire and flood safety, lighting and humidity control and ventilation systems in a building.

Traffic Management

  • Dynamic Traffic control, Trip planning, electric vehicles, E-Ticket and accommodation

Weather Management

  • Green pollution control, Climate change adaptation, Flood planning, Aviation forecasting

Public Service

  • Citizen card, Mobile payment, government services and social security

 Medical

  • Electronic medical Records, Distance medical diagnostic, Family health services

 Public utilities

  • Monitoring water quality and drainage system, electricity and gas measurement. 

Education Environment

  • Create transformative learning environments with revolutionary new software platforms and innovative interactive displays.

Intelligent Building and Home

  • Improved convenience, comfort, energy efficiency and security for building and home

 Parking

  • Park and ride, parking availability space finder,monitor and manage your parking site with great efficiency.

IoT Technology


  • Open source Platform evaluations for IoT (Contiki, Mbed, AllJoyn, Eclipse Foundation)
  • Embedded middleware/Sensor Middleware 
  • Connectivity protocols - MQTT, CoAP, 6LoWPAN
  • Web Interface  - REST, SOAP
  • Understanding Sensor Technologies.
Others

  1.  Industry follow ups, Market Research
  2.  Evaluation of the solutions provided by some of the IoT Home automation companies in the industry.   E.g.,: Smartthings (acquired  by Samsung), Nest (acquired by Google)    
IoT  Platforms
Features
Targeted Segment
Contiki
(http://www.contiki-os.org/)
 Open source.
Operating system to connect tiny low-cost, low-power devices  to the Internet
Low memory, Low power devices
Mbed
 (https://mbed.org/)
Open source by ARM.
Operating System for developing IoT solutions on ARM architecture
Wearables, Smart Home , Smart Building
AllJoyn
(https://www.alljoyn.org/)
Open source promoted by a consortium of companies
(includes LG)
Smart Media devices, Connected Home
Eclipse IoT/M2M Platform
(http://iot.eclipse.org/)
 Promoted by Eclipse foundation
Generic Platform. Continuously evolving and Integrates the latest Protocols

Contiki Framework
             It is an open source operating system for networked, memory-constrained systems.
This is mainly targeted for low-power wireless Internet of Things devices
         Examples:

  •  Street lighting systems.
  •  parking monitoring for smart cities. 
  •  Radiation monitoring systems.
  •  Alarm systems.

Features:

  • Highly memory efficient.
  • Supports hardware devices that are severely constrained in terms of memory, power, processing power, and communication bandwidth
  • Full IP Networking.
  • Designed to operate in extremely low-power systems.
  • Provides powerful low-power Internet communication.
  • Supports dynamic loading and linking of modules at run-time.
  • Uses a mechanism called Protothreads which  is a mixture of the event-driven and the multi-threaded programming mechanisms.
  • Provides a lightweight flash file system.
  • Flexible, Dynamic, Forward Compatible.
AllJoyn Framework

       A persistent publish/subscribe solution promoted by Qualcomm and consortium of companies including LG. This is mainly targeted towards home electronics:

  • Connected Home
  • Smart TV
  • Smart Audio
  • Broadband Gateways
  • Automotive

Flexible, Dynamic, Forward Compatible

  • Core building blocks and services to address: discovery, connectivity, security and management of ad-hoc proximal networks among nearby devices
  • Service-level discovery, capabilities broadcasting, remote procedure calls, interface sharing, all benefits of Wi-Fi security, message marshalling
  • Ability to react to dynamic, ad-hoc network changes
  • Developer SDK
Enables Horizontal Market Interoperability

  •   Cross-platform, cross-brand, cross-physical layers
  •   Bridging ecosystems for individual markets and product categories
  •   Discover new use cases and create new business models
  •   Interoperable across leading OS and embed devices like small home appliances that don’t run an OS
  •   Bearer agnostic
  •   Devices can interact regardless of how they are connected – Wi-Fi, Ethernet, Powerline, etc
Oracle’s IoT Platform  

  Oracle Provides a suit of solutions for the connected world. (Oracle IoT/M2M solution suits). From small device like sensors to servers, Oracle promotes and refines Java as the tool for Building IoT ecosystem.

 Oracle’s IoT platform provides an end-to-end solution for a comprehensive, scalable, and cost-effective IoT architecture, enabling organizations to

  • Manage and Analyse large volumes of device data throughout the lifecycle, from collection to analysis
  • Integrate and Automate, using data from connected devices to make decisions ..
  • Optimize and Innovate, integrating with Oracle business and industry applications  to reduce costs  and accelerate new service delivery




Share:

Monday, September 11, 2017

Android developer device system information

Below are the code snippets with description to get Android sysgtem information from the device.

Device Information
Android Java code to get device information
Description
Example from device
Manufacturer
String manufacturer = Build.MANUFACTURER
A company which produce the mobile phone
Samsung
Brand
Build.BRAND
This is a name, that distinguishes one company product from others.
Samsung
Model
Build.MODEL
Distinct name of device.
S6
Board
Build.BOARD
Motherboard specifically refers to a PCB with expansion capability and as the name suggests, this board is often referred to as the mother of all components attached to it.

Hardware
Build.HARDWARE
Name of mobile system on chip manufacturer(SoC
Qcom
Serial No
Build.SERIAL
Hardware serial number
16239565652
Boot Loader
Build.BOOTLOADER
A system bootloader version number.

Screen Resolution
WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
Display display = windowManager.getDefaultDisplay();
densityX = display.getWidth(); // default height width of screen
densityY = display.getHeight();
The number of horizontal and vertical pixels on a display screen.
1184*720 pixel
Android ID
Secure.getString(this.getContentResolver(),Secure.ANDROID_ID);
A 64bit number that is randomly generated on the device first boot and should remain constant for the lifetime of the device.
8fed34ffere4343fd
OS Details



Version
VERSION.SDK_INT = 26 Version is 6.0.1
Unique version number for Android OS
7.1.1
Version Name
VERSION.SDK_INT = 26 Version name is Mashmallow
Unique name of OS version
Nougat
API Level
VERSION.SDK_INT
API levels manage the app compatibility across different versions of android.
25
Build ID
Build.ID
Either a changelist number or a label like eg:M4-rc20
NMF26F
Build Time
Build.TIME
Time when System OS build.
Tue Nov 22 2016
Fingerprint
Build.FINGERPRINT;
A string that uniquely identifies this build.
Samsung/S6/S6:7.1.1/NMF26F:user/release-keys
CPU Details



CPU Model
Adb to the device and cat /proc/cpuinfo.
The first Processor field will have CPU model
Model name of CPU
AArch64 Processor rev 1 (aarch64)
Cores
Adb to the device and cat /proc/cpuinfo.
Number of Processor field will give count of Cores – Usually it will be from (0 – 5) for 6 cores or (0 – 3) for 4 cores
Number of available processor cores on device.
4
Actual RAM
Adb to the device and cat /proc/meminfo.
MemTotal field will give memory info in KB. Usually it will be 500MB or 1GB or more

The Amount of RAM company offers in Specifications(1GB = 1024MB)
4GB
Physical Available RAM
Adb to the device and enter free -m
Mem: field of total will give RAM available.
The Amount of RAM physically available in your device(1GB = 1024MB).
1871 MB
Hardware
Adb to the device and cat /proc/cpuinfo.
The Hardware field will have Hardware information
CPU Hardware model name(eg: MT6752 that is Mediatek MT6752)
Qualcomm Tech, Inc MSM8996pro
WIFI
getPackageManager().hasSystemFeature("android.hardware.wifi")
Wi-Fi or WiFi is a technology for wireless local area networking with devices based on the IEEE 802.11 standards.Wi-Fi compatible devices can connect to the Internet via a WLAN network and a wireless access point.
Available or Not Supported
WIFI Direct
getPackageManager().hasSystemFeature("android.hardware.wifi.direct")
Wi-Fi Direct, initially called Wi-Fi P2P, is a Wi-Fi standard enabling devices to easily connect with each other without requiring a wireless access point. Wi-Fi Direct allows two devices to establish a direct Wi-Fi connection without requiring a wireless router.
Available or Not Supported
Bluetooth
getPackageManager().hasSystemFeature("android.hardware.bluetooth")
Bluetooth is a wireless technology standard for exchanging data over short distances (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from fixed and mobile devices, and building personal area networks (PANs).
Available or Not Supported
Bluetooth LE
getPackageManager().hasSystemFeature("android.hardware.bluetooth_le")
Bluetooth Low Energy (BLE) is designed to provide significantly lower power consumption. This allows Android apps to communicate with BLE devices that have stricter power requirements, such as proximity sensors, heart rate monitors, and fitness devices.
Available or Not Supported
GPS
getPackageManager().hasSystemFeature("android.hardware.location.gps")
The Global Positioning System (GPS) is a space-based radionavigation system. These technologies can enhance the usefulness of the GPS positioning information.
Available or Not Supported
Camera Flash
getPackageManager().hasSystemFeature("android.hardware.camera.flash")
Check whether the device contain a camera Flash.
Available or Not Supported
Camera Front
getPackageManager().hasSystemFeature("android.hardware.camera.front")
Check whether the device contain a Front camera.
Available or Not Supported
Microphone
getPackageManager().hasSystemFeature("android.hardware.microphone")
Checking the availability of Microphone
Available or Not Supported
NFC
getPackageManager().hasSystemFeature("android.hardware.nfc")
Near-field communication (NFC) is a set of communication protocols that enable two electronic devices, one of which is usually a portable device such as a smartphone, to establish communication by bringing them within 4 cm (1.6 in) of each other.NFC devices are used in contactless payment systems, similar to those used in credit cards and electronic ticket smartcards and allow mobile payment to replace/supplement these systems.
Available or Not Supported
USB Host
getPackageManager().hasSystemFeature("android.hardware.usb.host")
When your Android-powered device is in USB host mode, it acts as the USB host, powers the bus, and enumerates connected USB devices. USB host mode is supported in Android 3.1 and higher.
Available or Not Supported
USB Accessory
getPackageManager().hasSystemFeature("android.hardware.usb.accessory")
USB accessory mode allows users to connect USB host hardware specifically designed for Android-powered devices.This allows Android-powered devices that cannot act as a USB host to still interact with USB hardware. When an Android-powered device is in USB accessory mode, the attached Android USB accessory acts as the host, provides power to the USB bus, and enumerates connected devices.
Available or Not Supported
Multitouch
getPackageManager().hasSystemFeature("android.hardware.touchscreen.multitouch")
A multi-touch is when multiple pointers (fingers) touch the screen at the same time.
Available or Not Supported
Audio low-latency
getPackageManager().hasSystemFeature("android.hardware.audio.low_latency")
Check whether the device support Audio low-latency. Latency is the time it takes for a signal to travel through a system.
Available or Not Supported
Audio Output
getPackageManager().hasSystemFeature("android.hardware.audio.output")
Check whether the device support Audio Output.
Available or Not Supported
Professional Audio

Professional audio, occasionally abbreviated as pro audio, refers to both an activity and a type of high quality audio equipment.
Available or Not Supported
Consumer IR
getPackageManager().hasSystemFeature("android.hardware.consumerir")
Consumer IR, consumer infrared, or CIR, refers to a wide variety of devices employing the infrared electromagnetic spectrum for wireless communications.he type, speed, bandwidth, and power of the transmitted information depends on the particular CIR protocol employed.
Available or Not Supported
Gamepad Support
getPackageManager().hasSystemFeature("android.hardware.gamepad")
Whether the Gamepad support available or not.
Available or Not Supported
HIFI Sensors
getPackageManager().hasSystemFeature("android.hardware.sensor.hifi_sensors")
High fidelity sensor processing capabilities.
Available or Not Supported
Printing
getPackageManager().hasSystemFeature("android.software.print")
Printing support for device.
Available or Not Supported
CDMA
getPackageManager().hasSystemFeature("android.hardware.telephony.cdma")
Code-division multiple access (CDMA) is a channel access method used by various radio communication technologies.CDMA is used as the access method in many mobile phone standards.
Available or Not Supported
GSM
getPackageManager().hasSystemFeature("android.hardware.telephony.gsm")
GSM (Global System for Mobile Communications is a standard developed by the European Telecommunications Standards Institute (ETSI) to describe the protocols for second-generation (2G) digital cellular networks used by mobile phones.
Available or Not Supported
Fingerprint
getPackageManager()..hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)
Biometric hardware to detect a fingerprint.
Available or Not Supported
App Widgets
getPackageManager().hasSystemFeature("android.software.app_widgets")
App Widgets are miniature application views that can be embedded in other applications (such as the Home screen) and receive periodic updates.
Available or Not Supported
SIP
getPackageManager().hasSystemFeature("android.software.sip")
Android provides an API that supports the Session Initiation Protocol (SIP). This lets you add SIP-based internet telephony features to your applications. Android includes a full SIP protocol stack and integrated call management services that let applications easily set up outgoing and incoming voice calls, without having to manage sessions, transport-level communication, or audio record or playback directly.
Available or Not Supported
SIP-based VOIP
getPackageManager().hasSystemFeature("android.software.sip.voip")
A SIP connection is a marketing term for voice over Internet Protocol (VoIP) services offered by many Internet telephony service providers (ITSPs).
Available or Not Supported
Battery Information



Battery level
To get battery level register for a sticky intent
IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryStatus = registerReceiver(null, ifilter);

intent.getIntExtra("level", -1);
Percentage of battery charge
50%
Type
To get battery Type register for a sticky intent
IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryStatus = registerReceiver(null, ifilter);

intent.getStringExtra("technology");
Power Source
Li-ion Battery
Temperature
To get battery temperature register for a sticky intent
IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryStatus = registerReceiver(null, ifilter);

intent.getIntExtra("temperature", 0);
Battery Temperature
25.0 C
Voltage
To get battery voltage register for a sticky intent
IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryStatus = registerReceiver(null, ifilter);

intent.getIntExtra("voltage", 0);
Battery Voltage
3.194 V
Status
To get battery status register for a sticky intent
IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryStatus = registerReceiver(null, ifilter);

intent.getIntExtra("status", 0);
Battery Status
Charging
Network



WiFi
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();

activeNetworkInfo.getType() == 1
Show if wifi is connected or not
Connected
3G/4G
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();

activeNetworkInfo.getSubtype() == 15
Shows if cellular network is present or not
3G
WiFi IP Details
WifiInfo connectionInfo = ((WifiManager) m797h().getSystemService("wifi")).getConnectionInfo();

connectionInfo.getIpAddress(); // IP Address
connectionInfo.getSSID() // Wifi AP name
connectionInfo.getBSSID() // MAC Address
connectionInfo.getLinkSpeed() // Link speed
WiFi IP address
10.24.25.2
Sensors
SensorManager sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
List<Sensor> sensors sensors = sensorManager.getSensorList(Sensor.TYPE_ALL);

Lists all the sensors supported
Accelometer
Step Sensor
Gyroscope
Camera Informatio
Camera.getCameraInfo(i, new CameraInfo());
        Camera open = Camera.open(i);
        Parameters parameters = open.getParameters();
Camera Information

System  apps
List<PackageInfo> apps = getPackageManager().getInstalledPackages(0);

for (ApplicationInfo aInfo : apps) {

if ((aInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0)
//System apps
}
List all system apps

User apps
List<PackageInfo> apps = getPackageManager().getInstalledPackages(0);

for (ApplicationInfo aInfo : apps) {

if (!(aInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0)
//System apps
}
List all User apps

Share:

Popular Posts

Recent Posts

Unordered List

Pages