Transcript Slide 1

Network and Connectivity
for Windows Mobile Devices
Paul Yao
The Paul Yao Company
-> Microsoft Mobile DevCon Booth #744 <-
http://www.paulyao.com
Windows Mobile Development Platform: Today
Visual Studio .NET
Embedded VC++
Managed
Native
MFC
ATL
Server side
ASP .NET
Mobile Controls
.NET Compact
Framework
Win32
Software Platform (APIs)
Device Management
Communication
Presentation
Data Access
Remote API
Configuration
Bluetooth
Security
Connection Manager
TAPI
SMS
MAPI
POOM
ActiveSync
Multimedia
Home Screen
User Interface/Shell
HTML Control
ADO CE
XML
CE DB
OLE DB
GAPI
Windows Mobile
Windows CE
CE DB
ActiveSync
Pocket Outlook
Pocket Internet Explorer
Windows Media Player
Drivers
Device
Hardware
Processor
Memory
Display
USB or Serial
Radio
GSM/GPRS
CDMA/1xRTT
WiFi
Bluetooth
Agenda
Part 1: Overview
Part 2: Connectivity Scenarios
Part 3: Connection Manager
Download the slides for this session at:
http://www.paulyao.com/MSMDC_CLI363.ppt
Part 1: Overview
The Connectivity Wheel
Network Categories
Networking & Connectivity APIs
The Connectivity Wheel
Circuit Switched Data
(e.g. GSM, CDMA)
WAP
SMS
Cable
Replacement
Bluetooth
Packet Data (e.g.
GPRS, 1xRTT)
TCP/IP
802.11
Desktop Pass-Through
Network Categories
Personal Area Network (PAN)
Wired – USB, serial
Wireless – Bluetooth, Infrared
Local Area Network (LAN)
Wired – Ethernet (TCP/IP), Token-ring
Wireless – 802.11b “WiFi”, 802.11a
Wide Area Network (WAN)
Wired – Plain Old Telephone System (POTS),
The Internet
Wireless – Mobile phone networks
(GSM/GPRS/CDMA)
Networking APIs (1/8)
Windows Sockets 2.2
TCP/IP connections
No asynchronous support (Windows
message-based support)
IrDA connections
Bluetooth connections
Differences from previous versions
Multiple transport protocols
TCP/IPv4
TCP/IPv6
Multicast support
Overlapped I/O with scatter/gather
Secure socket
Networking APIs (2/8)
Network Support
Windows Internet (WinInet) Services
HTTP clients
FTP clients
No Gopher protocol support
Autodial
Passport
Connection Manager
Container for network connection and
configuration information
Supports connection policy
Networking APIs (3/8)
ActiveSync Service Providers
Synchronization of device data with
desktop
Examples:
Desktop Outlook with Pocket Outlook
Desktop database with device database
Elements
COM-based DLL on desktop
COM-based DLL on device
Enabled with registry settings
Networking APIs (4/8)
Remote API (RAPI)
Available when device is connected via
ActiveSync
Access to device data
File system
Registry
CE property databases
Load & run device-side exucutables:
CeCreateProcess – run program (.exe) file
CeRapiInvoke – load library (.dll) on device
Networking APIs (5/8)
Web services
Formerly known as “XML Web services”
Client/Server Mechanism
Remote Procedure Call (RPC)
SOAP-compliant XML
Sent via HTTP/SMTP ports
Device Side
.NET Compact Framework supports Web
service clients
Server Side
ASP.NET supports Web service servers
Networking APIs (6/8)
Mobile Phone
Assisted Telephony
Phone API
Telephony API (TAPI)
Extended TAPI
Wireless Application Protocol (WAP)
Short Message Service (SMS)
Subscriber Identity Module (SIM) Manager
Networking APIs (7/8)
User Interface Support
NETUI – dialog box library
GetIPAddress
ConnectionDialog
DisconnectDialog
GetUsernamePassword
Connection Setting Applet…
CreateProcess(L”remnet.exe”, …)
Summon ActiveSync:
CreateProcess(L”repllog.exe /remote”, …)
Networking APIs (8/8)
Miscellaneous
Data Security
Cryptography API
Digital Certificates (X.509)
Secure Socket Layer (SSL 2.0 and 3.0)
Private Communications Technology (PCT)
Protocol 1.0
Dial-Up Networking
A.k.a. “Remote Access Service” (RAS)
Call ISP over modem
Establish PPP / SLIP connections
Use Connection Manager instead
Part 2: Connectivity Scenarios
Personal Area Network
Local Area Network
Wide Area Network
Personal Area Network
ActiveSync Connectivity
PAN / Direct connection
USB, serial
Infrared, Bluetooth
Passthrough
Network connection to device in cradle
Supports HTTP, HTTPS, IMAP, FTP, and POP3
Does not support UDP, ICMP, or PPTP
Reference – article by Andreas Sjöström:
http://www.microsoft.com/mobile/developer/tech
nicalarticles/passthrough.asp
Use ActiveSync 3.7 for Windows Mobile
devices
Personal Area Network
Developer Support
ActiveSync supports
Download / deployment
Debugging
*Tip* Developers can speed up download &
debugging with an ActiveSync network
connection
Emulator
Support ActiveSync
Requires network virtual switch
Refer to eVC++ 4.0 documentation
Local Area Network
ActiveSync
First: establish partnership via direct
connection
Can synchronize over any LAN
Wireless: WiFi (802.11b), 802.11a
Wired: Ethernet, Token-ring
Exchange Server ActiveSync to server
*Tip* Developers can speed up download &
debugging with an ActiveSync network
connection (did I already say that?!?)
Local Area Network
”My Work Network”
Can connect via modem
Virtual Private Network
Need host name –or- IP address
VPN Types:
IPSec/L2TP – need certificate –or- pre-shared key
PPTP – need user name/password
Can have proxy settings
HTTP
WAP
Secure WAP
Local Area Network
What is it good for?
Access to any IP-enabled network service or
server
Fun with HTML
Browse WWW, local web servers
Fun with XML
Web service client
Web service server
Fun with TLAs (three-letter acronyms…)
FTP, SSL, VPN, PPTP
Network PPP
Network redirector - SMB protocol
File Servers
Print Servers
Local Area Network
Connect Visual Studio .NET
Use ActiveSync
Establish partnership via USB/serial
Download & Run
Starts device-side conmanclient.exe
Configure TCP/IP Transport
Tools->Options…
[Device Tools]
[Devices]
“Pocket PC Device”,
Click [Configure…]
Options:
Auto IPfrom
address
IP address
ActiveSync
Staticaddress
IP address
Set static
on device
Local Area Network
Download/Debug – eVC++ (no DHCP)
Establish partnership via
USB/serial
Static IP address on
desktop
Static IP Address on smart
device
Set WINS address to desktop
IP address
Start->Settings->
[Connections]
[Network] [Adapters]
<Select Adapter>
[Name Servers]
Local Area Network
Download/Debug – eVC++ (w/ DHCP)
Desktop-Side
Enable network connections
Connect via USB/serial
Device-Side
Enable network connections in ActiveSync
Enable DHCP for network adapter
Attach network adapter
Might need to reset device
Connect to Network
Wired
Wireless
Public Network Support
Connect via:
Dial-in modem
Internet PPTP connection
ActiveSync WAN Connection
VPN / PPTP connection to desktop
Exchange Server ActiveSync to server
Networks
Internet – WWW, http, https:
WAP – wsp://, wsps:
GSM / GPRS / CDMA
Public Mobile Phone Network
WAP Protocol
Wireless Datagram Protocol (WDP)
SMS or UDP Transports
Application Wake up (PPC2003 only)
WDP Phase 1 support
datagrams may originate from the internet
Public Mobile Phone Network
Short Message Service (SMS)
Used for short messages
Length is air link dependent
Capable of message concatenation
APIs
#include <sms.h>
SmsOpen(…);
SmsSendMessage(…);
SmsClose(…);
Part 3: Connection Manager
Overview
Network Model
Configuration
Configuration Service Providers (CSPs)
API Support
Connection Manager
Overview
Umbrella for Network Address Resolution
Voice
Data – Internet, WAP, etc.
Configuration Service Providers (CSP)
Manage service-specific, low-level settings
GPRS settings, Data networks, URL mapping
Connections for: PPP, Proxies, VPN, WiFi
Decide optimal route for connections
Based on ‘cost’ criteria provided by CSPs
Can manage multi-hop connections
Connection Manager
Network Model
VPN
Cingular ISP
The
Internet
Proxy
My
Corporate
Network
MS Paris
RAS
Earthlink ISP
WAP
Gateway
Yahoo.com
MS Redmond
RAS
msw
mail.earthlink.net
WAP
Network
wap.ananova.com
red-msg-06
Connection Manager
Configuration (1/2)
Who can configure
End user
Corporate IT Dept
Mobile phone service
provider
Default Networks
The Internet
Work
The WAP Network
Secure WAP Network
Pocket PC Adds
My Work Network
My ISP
Connection Manager
Configuration (2/2)
Burn into device ROM
Send in CAB provisioning
format (.cpf) file
Install in cradle using
rapiconfig.exe
C> rapiconfig mydoc.xml
Send using Wireless
Application Protocol (WAP)
Push Message
Over-the-air (OTA) protocol
Provisioning XML File
<wap-provisioningdoc>
<characteristic
type="CM_Networks">
<characteristic
type="The Internet">
<parm
name="DestId"
value="{436EF144B4FB-4863-A0418F905A62C572}"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
Connection Manager
Configuration Service Providers (CSP)
Connection Manager UI
Application
XML
Provisioning
Document
URL
Mapper
Planner
Configuration
Manager
Connection Manager Engine
CSPs
Voice
RAS
Proxy
PPTP
GPRS
etc
Connection Manager
API Support (1/2)
ConnMgrMapURL()
Fetch preferred network for a given URL
Allows applications to query for network policy
Default mapping:
*:\\*.*\ - The Internet
*:\\*\ - Private network (intranet)
wsp:\\ - WAP network
wsps:\\ - Secure WAP network
Connection Manager
API Support (1/2)
ConnMgrEstablishConnection()
Creates asynchronous request for connection
ConnMgrConnectionStatus()
Query connection status
ConnMgrEstablishConnectionSync()
Creates synchronous request for connection
ConnMgrReleaseConnection()
Disconnect when finished using network
After This Session…
Visit the Windows Mobile booth to:
Get the Windows Mobile Developer Resource Kit
and start supporting landscape and high DPI
Talk to the Technical Support team
Join the Windows Mobile Solutions Partner
Program
Enter the Microsoft Mobile2Market Application
Contest
Fill in your evaluation form
sponsored by AT&T Wireless
1 MPX200 given away per session.
See www.mscorpevents.com/mdc
Your Questions…
Thank You!
Download the slides for this session at:
http://www.paulyao.com/MSMDC_CLI363.ppt
© 2004 Microsoft Corporation. All rights reserved.
MICROSOFT CONFIDENTIAL. INTERNAL USE ONLY.