Enabling the Internet of Things - PowerPoint PPT Presentation

1 / 96
About This Presentation
Title:

Enabling the Internet of Things

Description:

Client calls the switchboard number for the business. Switchboard operator answers the call ... Switchboard returns to listening out for more clients to call in. ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 97
Provided by: ezu
Category:

less

Transcript and Presenter's Notes

Title: Enabling the Internet of Things


1
Enabling the Internet of Things
  • Short Range Wireless and M2M

2
Our Expertise
Intelligent Embedded Wireless Communications
Bluetooth, 802.11, 802.15.4 (ZigBee), Wibree
Wireless agnostic scripting language
Middleware and Data Synchronisation
Low Power, High Efficiency Modules
3
Serving an embedded market
Fast time to market
Integrated Protocol stacks and protocol conversion
Built in internet connectivity
Expertise in Automotive, Medical and Retail
Enabling over 5 million credit card transactions
daily
4
Things just want to connect
My temperature is
Your Blood Pressure is
Ive just driven
Ive copied
I can see
Ive sold
Now theres an easy, wireless way to do it.
5
The Internet of Things
Internet

Thing

M2M
Welcome to the world of Cellular-Free
communications.
6
Things are Host-free
  • Most machines have very limited host processing
    capability.
  • Using External Processors mean more power, more
    cost, greater time-to-market and the need for
    expensive programming resource.
  • The Internet of Things need wireless processors
    that do everything.
  • EZURiO provides everything you need in one module.

7
What Designers Ask
These are the Key Features for Time to Market
8
All you need in one package
EZURiO modules are pin compatible with Siemens
GPRS MC55/56
9
Enabling your Thing
RS-232 Data Commands
RF
Serial In gtgtgt Wireless Out
  • No host processing requirements just send
    simple commands
  • Integrated 802.11 driver gives silicon
    independence
  • Integrated Bluetooth or TCP/IP stack
  • Access to I/O and ADC
  • AT Interface (Bluetooth)
  • Interpreter (802.11) to run scripts for data
    acquisition and wireless attachment

10
Whats in an EZURiO Module?
Flash
RAM
ARM Processor UW
UART
802.11 b/g
Connection Scripting Event Handling
I/O
Power Management
11
Our Module Architecture
Non-volatile Memory
ADC
DAC
GPIO
High Speed UART
I/O Controller
UNIVERSAL WIRELESS Scripting Interpreter
Program Memory
UWScripts
Flash Filing System
Wireless Protocol Stack (TCP/IP Driver)
Web Server
128 bit Encryption
Baseband
AES
WEP / WPA
Compare Standard Wireless Module
Radio
Everything you need is in one module it really
is Serial In gtgtgt Wireless Out
12
802.11 Basics
  • Nick Hunn - CTO

13
802.11b g channels
  • 802.11 b g operate at 2.4GHz the same
    frequency band as Bluetooth and ZigBee.
  • The spectrum is divided into multiple channels,
    spaced 5MHz apart.
  • Access Points operate on a fixed, selected
    channel using DSSS. They do not frequency hop.
  • There is NO channel width specified, but a
    spectral mask of -30dm _at_ 11MHz

Cells (access points) can overlap as long as the
transmitter in one does not result in overload in
the adjacent cell. This means the channels
selected should be 25MHz apart.
14
802.11 Architecture - Infrastructure
Infrastructure Mode
Access Point
  • BSSID - Unique Name MAC Address
  • SSID Access Point Name
  • BSS Type Infrastructure Mode

Clients
Clients ASSOCIATE with Access Points. All
802.11 devices have a unique 48 bit MAC
address. If Access Points have the same SSID and
are connected to a backbone, then clients can
ROAM between them.
15
802.11 Architecture Ad-hoc
Ad-hoc Mode
First Client
Clients
The Client starting the ad-hoc network acts as
the Access Point to which other clients
connect. Devices can either connect in
Infrastructure or ad-hoc mode. They cannot do
both simultaneously. Ad-hoc mode does not support
Power Saving modes. Ad-hoc is also known as IBSS
(Independent Basic Service Set)
16
Data Packets
Simplified 802.11 packet
Only a relatively small part of each transmitted
packet contains data. A lot of the transmitted
information is concerned with routing
information, protocols and integrity
checking. The data rate is shared between all
connected clients. Real Data throughputs never
match symbol rates.
17
802.11 Range and Throughput
Symbol Rate
Symbol Rate

Range (m)
Throughput (Mbps)
Range and throughput are closely linked the
more complex the coding scheme, the shorter the
range.
18
Throughput Latency
  • Throughput and latency are not related. They
    rarely go together
  • Decide what is important
  • Latency
  • Reliability (QoS)
  • Raw Data Rate
  • Quoted data rates rarely reflect reality
  • They are symbol rates
  • They include packet overheads
  • They are relevant at short range in a lab
    environment
  • The wireless industry loves go-faster stripes.
    Real applications rarely need high data rates.
    Dont be sucked into the hype.
  • Most M2M applications can only handle rates of
    around 115kbps at their interfaces. However, the
    data may travel over the air at a much higher
    rate, reducing the power consumption.

19
Universal WirelessThe Wireless Development
Platform
  • Tim Wheatley - VP Engineering

20
What is Universal Wireless?
A complete wireless application development
platform
Enables rapid application prototyping and
demonstration
Allows HOSTLESS application development
Not just a wireless module!
Sophisticated web server integration allows
machines to have a web presence
Compatibility across Ezurio modules
21
Universal WirelessIn Action
22
Basic Use of the Module
  • The WISM Development Platform
  • The WISM file system
  • Immediate mode commands
  • at i 3
  • atdir
  • atdel
  • atrun
  • Using the !function_name() syntax
  • !_flashdel()
  • Using the UWTerminal Application
  • Downloading new scripts
  • Downloading web pages

23
OBD - Basic Operation
24
OBD - Cable Replacement
25
Wireless OBD Interface
Cable replacement.
Application complete!
WLAN Module programmed to automatically attach to
AP and PC and transfer data
Uses a commercial OBD scan tool (Gendan) with
unmodified Gendan EngineCheck firmware
No additional microcontroller is needed to manage
the application UW does it all.
Based on examples, the complete application takes
only a few hours to complete!
26
OBD Intelligent Cable Replacement
27
Wireless OBD Interface
Intelligent cable replacement
Application complete!
WLAN Module retrieves the data from the machine,
processes it and only reports key information
WISM module actively participates in the data
gathering and display
No additional microcontroller is needed to manage
the application UW does it all.
Based on examples, the complete application takes
only a few hours to complete!
28
SMTP Client Interface
Implementation of a protocol in UWScript
Also shows the use of a custom command interface
WLAN module is programmed with comms related
applications to remove the load from the host
processor
Demonstrates the ability of the module to act as
a communication co-processor
Command interface is tailored to the application
high and low level functions
Module could be made to emulate legacy solutions
29
Powersaving
  • Powersave Mode 0
  • No power saving enabled
  • Powersave Mode 1
  • IEEE powersaving enabled
  • Powersave Mode 5
  • WLAN disabled, CPU active
  • Powersave Mode 6
  • WLAN disabled, CPU sleeping

30
Firmware Upload
  • Uploading firmware is managed by the UWLoad.exe
    executable.
  • UWLoad.exe executable and sectormap.ini file must
    exist in same directory
  • Set up correct port number for UWLoad (using
    command line parameter comn)
  • Reset the module when prompted.
  • Select the firmware file to load.
  • Firmware update will happen automatically.

31
Firmware Upload Tutorial
  • Unzip the firmware and UWLoad tool from the
    UW_rash_2 0 1 1_Full_Delivery.zip and UWLoad.zip
    file respectively.
  • Setup a shortcut to the UWLoad.exe file. Right
    click on the shortcut and set the command line
    parameter comn from the properties.
  • Run UWLoad.exe
  • Select Load
  • Reset the module
  • Select the UW_rash_2.0.1.1.s file
  • Firmware upgrade should complete automatically.

32
The Internet Protocols
33
The Internet Protocol Family
34
Peer to Peer Protocols
35
Routers
36
Internet Addressing
  • Each node on the network has an IP address
  • E.g 192.168.1.1, 213.246.148.49
  • Statically or dynamically allocated (DHCP)
  • IP packets contain source address and destination
    address.
  • Destination addresses ensure that packets reach
    the final destination
  • Source address ensure that responses reach the
    originator
  • IP addresses can change many times as a packet
    passes across the network
  • This is transparent to the user!

37
Physical Addressing
  • Each physical device on the network has a
    hardware address (MAC address)
  • The MAC address is used either by the hardware
    interface or by the driver to identify
    interesting packets
  • Interesting packets are passed up the stack for
    further processing.
  • Packets are addressed by both physical and IP
    addresses.
  • Mapping between physical / IP addresses is
    handled by ARP protocol.

38
Ports
  • Many applications can be implemented that use the
    underlying TCP/IP stack structure.
  • Applications are identified by port numbers
  • There are many pre-allocated port numbers for
    well known applications
  • 80 HTTP
  • 21 FTP
  • 25 SMTP
  • User port numbers can lie in the range 1024
    65535

39
Data Encapsulation
40
Internet Protocol (IP)
  • Deals with delivery of a payload to the
    destination
  • Supplies source and destination addresses
  • Specifies type of service which defines how the
    packet is routed
  • Packet delivery is not guaranteed
  • Works packet by packet no concept of a
    connection
  • Packet ordering is not guaranteed
  • Higher layer protocols must deal with this..

41
Transmission Control Protocol (TCP)
  • Provides
  • Reliable stream delivery of ordered data
  • Virtual circuit connections
  • Full duplex connections
  • A connection is defined by a pair of end points
  • An endpoint is a (host, port) pair
  • eg 145.23.4.3., 1876
  • 154.23.5.6, 345
  • Connection establishment is by three way
    handshake
  • Connection terminates by a modified three way
    handshake
  • Asymmetric release
  • Symmetric release

42
Address Resolution Protocol
  • IP address must map onto physical address
  • Host must somehow discover the physical address
    of a target host on the same network given the
    targets IP address
  • ARP
  • Host broadcast ARP request containing target IP
    address
  • Target responds with ARP reply containing
    physical address
  • Machines cache IP to physical address bindings
  • Broadcast is expensive
  • A cache prevents frequent broadcast
  • Entries must be removed after a fixed time to
    enable replacement of hardware

43
Dynamic Host Configuration Protocol (DHCP)
  • Main application of DHCP is distribution of IP
    addresses
  • Used by the module to request and obtain a
    dynamic IP address from the router (access
    point).
  • Also used to provide gateway mask, gateway IP
    address and primary and secondary DNS IP
    addresses.
  • Typically runs immediately after physical
    connection is established with the router (i.e
    after attaching to the AP).

44
An Overview of Sockets
45
Client Server Model
  • TCP/IP networking operates on a client server
    model.
  • One end operates as a server
  • Offers a service to clients
  • Example is a web server
  • One or more clients makes contact with the server
    and uses the service.

46
Sockets (1)
  • A socket is used to establish a data connection
    between two devices.
  • Uses the client / server model
  • Analagous to making a telephone call to a
    business
  • Client calls the switchboard number for the
    business
  • Switchboard operator answers the call
  • Call is put through to an extension for the call
    to be handled
  • Switchboard returns to listening out for more
    clients to call in.
  • The telephone number of the server is the IP
    address and the port number
  • 192.168.1.11056
  • Typically the server will hand the connection to
    another port for the remainder of the call

47
Sockets (2)
48
Sockets (3)
49
Sockets (4)
  • Stages in creating socket
  • Server
  • Create socket
  • Bind socket to the listening port number
  • Listen on the socket
  • Accept incoming connections from clients
  • Client
  • Create socket
  • Connect socket to server

50
Universal WirelessBasics and Concepts
51
UW WISM Software Architecture
52
Interactive Mode

When the module is not running a script
Simple AT commands allow file manipulation
UW commands can be run in interactive mode
atdir display files atrun run named script at
i n display version information atcmp Start /
end script compilation atdel delete named
script
53
UW Language Basics

UW is a basic-like programming language
Scripts are simple text files
UwTerminal application is provided to Simplify
the development process
autorun script if present is run automatically
on power on
Factory default script installed at the
factory, runs on power on cannot be changed.
54
Universal WirelessLanguage Overview
  • Tim Wheatley - VP Engineering

55
UW Concepts - Streams
  • Manage the flow of data around the module
  • Data devices act as data source / sinks
  • E.g UART, UW script, TCP socket
  • Bridge connects data source with a data sink and
    vice-versa
  • Currently bridges are always 2-way i.e both data
    source and data sink are connected
  • Provides flexibility for future expansion
  • Other data devices could be created CAN bus,
    files, ADC for example

56
UW Concepts - Streams
57
UW Concepts - Streams
  • By default a UW script creates one data device
  • stdout All output created by print is sent to
    stdout
  • stdin Input to the script is read from stdin
  • After reset, stdin and stdout are bridged to the
    UART data device.

58
UW Concepts Events (1)
  • Events are asynchronous inputs to a UWScript
  • Avoid the need for polling in scripts
  • Waitevent tests in an infinite loop or until
    an event handler returns 0
  • pollevent
  • When an event occurs a pre-installed handler is
    called
  • onevent evstdin call stdin_handler

59
UW Concepts Events (2)
  • Supported events are
  • EVSTDIN Data has arrived on stdin
  • EVRXBRKON Break condition on UART detected
  • EVRXBRKOFF Break condition on UART released
  • EVWEB Web server has generated event
  • EVSEARCH Access point search is complete
  • EVSOCKETCLOSE Socket has been closed
  • EVLINK Change in WLAN link status

60
UW Concepts Events (3)
  • Examples of event use
  • Detecting a break condition on the UART to
    interrupt a data connection.
  • Detecting a change in the WLAN link status (loss
    of connection for example) and taking appropriate
    remedial action.
  • Detecting a socket being closed by the remote end
    allowing a clean socket close at the module.

61
UW Concepts Web Server (1)
  • WISM web server is fully integrated with UW
    scripts
  • Allows a UW script to generate dynamic web
    content
  • lt?UWkeyword(param)"?gt
  • Anything in quotes is passed to the script as
    part of a EVWEB event
  • Script writes HTML strings that are dynamically
    inserted into the web page using webecho command

62
UW Concepts Web Server (2)
  • Forms posted from the web browser are passed to
    the script for processing
  • Allows the user to interact with the script
  • Forms are passed as a list of parameter / values
  • Script interprets parameter and acts on the basis
    of value

63
Tutorial 2 Cable Replacement
  • Navigate to Tutorials directory
  • Download script file tutorial_2.uws
  • This script establishes a TCP server on port
    number 1000
  • Run the script
  • Wait until the IP address for the module is
    reported
  • Open another UWTerminal session
  • Select the TCP Socket option
  • Enter the IP address of the module and the port
    number
  • Verify that the connection is made and that
    characters can be transferred.

64
Variable Declaration
Types are uword, sword ulong, slong string
Declaration syntax uword uwValue1 slong
slReturn string stIpString
Variable declarations can be anywhere in a
script but variables must be declared before
use
65
Variable Scope
Global variables are declared in the main body
of the script
Local Variables are declared in a subroutine
or function
Super Global Variables Declared outside the
script and last all the time the module is on.
66
Variable Casting
Sometimes a variable of one type needs to be made
into another type e.g. if a routine returns a
variable of one type which is then used as
a parameter for another.
xxCASTyy() converts a variable of type yy to
type xx e.g uwVar uwCASTsl(slVar)
converts a signed long into a unsigned integer
67
Expressions
       Multiply       /     Divide
         Modulus           Addition
      -     Subtraction       ltlt  Arithmetic Shi
ft Left       gtgt  Arithmetic Shift Right
      lt    Less Than       lt  Less Than Or Equa
l       gt    Greater Than       gt  Greater Than
 Or Equal        Equal To       !   Not Equal
 To           Bitwise AND            Bitwise X
OR (exclusive OR)             Bitwise OR
        Logical AND           Logical XOR  
          Logical OR 
68
Looping
for i 1 TO 50 statements. next
i 0 while (i lt 50) statements.. i i
1 endwhile
69
Conditional Execution
if expression then statements elseif
expression then statements else
statements endif
select varname case n statements. case m
statements. case else statements. endselect
70
Output from a Script
Print outputs characters to the
stdout stream
Prints variables separated by e.g. print
uwVal slVal2 val3 print This is a
string uwVal \n print stVariable
71
Subroutines
subroutine name(var1, var2.varn)
statements endsub
Variables passed by reference or by value e.g
testsub(uword byref par1) testsub(uword byval
par2) Default is by value..
72
Functions
function retvar name (var1, var2varn)
statements endfunc var

73
Events
onevent EVRXBRKON call brkhandle waitevent
waits for events pollevent polls for events
Event handler return code 0 waitevent is
terminated, script moves on to next
instruction non 0 continue waiting for
events
74
Tutorial Number 3
  • Open tutorial_3.uws file in notepad
  • This simple script file prints a single line
    Hello World
  • Modify the script to print Hello World 10 times
    download and test
  • Modify the script to print Hello World and the
    number of times it has been printed
  • Hello World 2
  • Hello World 3
  • Etc

75
Tutorial Number 4
  • Open tutorial_4.uws
  • This script waits for an RX break event
  • Modify the RX break event handler to print RX
    break ON
  • Modify the script to monitor the RX break OFF
    event and add a handler to print RX break OFF
  • How can the script be modified to exit when the
    RX break OFF condition is detected?
  • Modify the script to count the number of RX break
    ON events and to exit after 10 events have been
    detected.

76
String Manipulation Functions
A rich set of string manipulation functions is
provided here are some of the key ones..
left, right, mid strcmp strpos strroleft strval
dec
77
Handling STDIN
When data arrives on STDIN an event is generated
EVSTDIN Event handler reads data
from stream and typically looks for end of line
EVSTDIN is generated when characters are
transferred from UART to STDIN stream may be
one or more
78
String Matching
It is often useful to match a string against a
number of alternatives e.g command look up
TableInit sets up table TableAdd Adds entry in
table TableLookup Looks up a string in the
table and returns associated value
79
Tutorial Number 5
  • Open tutorial_5.uws
  • This script implements a simple command line
    interface for the module.
  • Experiment with the commands that it provides.
  • Add a new command search which performs a WLAN
    search and prints the results
  • Hint the _wlansearchdump() built in function
    does a search and prints the results
  • Make this an autorun script and verify that the
    command line interface works from power on

80
Universal WirelessWireless LAN Extensions
81
WLAN Searching
_wlansearchnet() Searches for access points and
populates table
with results Following functions allow
table to be scanned _wlansearchfor() _wlansearchq
uery() _wlansearchquery()
82
WLAN Management
_wlanxxx() Functions Connection _wlanattach() _w
landetach() Security _wlansecurity()
_wlankey() _wlanauth() Regionalisation
_wlanregionset() _wlanregionget()
83
Tutorial 6
  • Script_Demo10 searches for all access points and
    then looks for a named access point in the
    results.
  • If the AP is present then it connects and waits
    to get an IP address.
  • Modify this script to search for and attach to
    the Uplands Broadband access point.
  • Once this works modify the script to search for
    all Uplands Boardband access points and then
    attach to the one with the largest RSSI value.
  • Hint the _wlansearchquery(n, 3) returns the
    RSSI value for the nth AP that has been found

84
WLAN Ad-Hoc Networks (1)
Ad-hoc WLAN networks allow modules to communicate
without using an access point. First module to
join an ad-hoc network will create it Subsequent
modules connect as if they are joining an access
point Channel must be selected take care of
the regionalisation! Power-saving does not work
in an ad-hoc network
85
WLAN Ad-Hoc Networks (2)
86
WLAN Power Management (1)
IEEE Power saving AP allows the terminal to
sleep when no data Is transferred. Terminal
wakes on a regular basis to check if data has
arrived or to send data AP stores data to be
sent to the terminal until the terminal wakes
up. If there is no data to be transferred then
the terminal wakes for a very short time allowing
significant reduction in average power. This is
an AP managed power saving mode not available
in ad-hoc
87
WLAN Power Management (2)
_psmodeset(0) No power saving module is awake
all the time
(210mA) _psmodeset(1) WLAN chipset uses IEEE
powersaving must be
attached (45mA). _psmodeset(5) WLAN chipset
disabled enables low power when
module is not attached
(30mA). _psmodeset(6) WLAN chipset disabled,
MCU disabled. Module
woken by user defined I/O pin(s) (3mA).
88
Universal WirelessSocket Extensions
89
High Level Sockets
High level Interfaces _socktcpserver() sets
up a server at the specified IP address and
port _socktcpclient() connects to a
server at specified IP address and port
90
Bridging
Functions _netio(), stdio() and uartio() are
used to get stream handles unbridge()
disconnects an existing bridge bridge()
bridges between two streams
91
Low Level Sockets
A full set of socket API functions
are provided. Allow finer control over
sockets A more complex interface _socktcpcreate(
), _sockudpcreate() _sockconnect(),
_sockbind() _socklisten(), _sockaccept() _sockclos
e() _socksendto(), _socksendall(), _sockrecv(),
_sockrecvfrom()
92
Universal WirelessWeb Server Extensions
93
Dynamic Web Page Content
_webevget() Gets the cause of the web event
(either dynamic web content or
post) _webfname() Returns the string from the
lt?UWstring?gt command embedded in the web
page. _webecho() Outputs HTTP strings to the
browser _webevend() Indicates that web
processing is complete.
94
Handling Web Posts
Typically a POST from a browser is a list of
parameters and values _webgetnumpostel()
Returns the number of parameters that have
been sent _webgetelement() Gets a parameter
from the list
95
Example Web Script
'// get the cause of the web event slRes
_webEvGet(evCause) if ( evCause 1 ) then
'// get the name and argument list of
the script/function for this event occuring
slRes _webFNameGet(tag) '//
retrieve the name first findChar "("
charPos STRPOS( tag, findChar, 0 )
scriptname LEFT(tag, UWCASTSL(charPos))
'// then get the args - in this
case there can be only one startPos
UWCASTSL(charPos) findChar ")"
charPos STRPOS( tag, findChar, startPos )
arg1 MID( tag, startPos1,
(UWCASTSL(charPos) - startPos - 1) )
if mStrCompare(scriptName,
"OBDGetData") 0 then
OBDGetData( UWCASTSL(STRVALDEC(arg1)) )
slRes _WebEvEnd()
exitfunc 1 elseif mStrCompare(scriptName,
"ExitScript") 0 then slRes
_WebEvEnd() exitfunc 0
endif elseif ( evCause 2 ) then
numElements _webGetNumPostEl()
result _webGetElement(0, name, value)
if mStrCompare(value, "ResetMIL") 0 then
ResetMIL() endif endif '// we have
finished so end the web event slRes
_WebEvEnd()
This section deals with dynamic content
This section deals with posts From the browser
96
Market LeaderWireless technology solutions
  • End statement
Write a Comment
User Comments (0)
About PowerShow.com