Top Banner
39
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Network and Connectivity
Page 2: Network and Connectivity

Network and ConnectivityNetwork and Connectivityfor Windows Mobile Devicesfor Windows Mobile Devices

Paul YaoPaul YaoThe Paul Yao CompanyThe Paul Yao Company-> Microsoft Mobile DevCon -> Microsoft Mobile DevCon Booth #744 <-Booth #744 <-http://www.paulyao.comhttp://www.paulyao.com

Page 3: Network and Connectivity

DisplayDisplayUSB or SerialUSB or Serial

ProcessorProcessorMemoryMemory

GSM/GPRSGSM/GPRSCDMA/1xRTTCDMA/1xRTT

Device Device HardwareHardware

WiFiWiFiBluetoothBluetooth

RadioRadio

DriversDrivers

Windows MobileWindows Mobile CE DBCE DBActiveSyncActiveSync

Pocket OutlookPocket OutlookPocket Internet ExplorerPocket Internet ExplorerWindows Media PlayerWindows Media Player

Windows CEWindows CE

Software Platform (APIs)Software Platform (APIs)

Home ScreenHome ScreenUser Interface/ShellUser Interface/ShellHTML ControlHTML Control

GAPIGAPIRemote APIRemote APIConfigurationConfigurationBluetoothBluetoothSecuritySecurity

Connection ManagerConnection Manager TAPITAPISMS SMS MAPI MAPI POOM POOM ActiveSyncActiveSync

MultimediaMultimediaCommunicatioCommunicationn

Device ManagementDevice Management PresentationPresentation

ADO CEADO CEXMLXMLCE DBCE DBOLE DBOLE DB

Data AccessData Access

NativeNative

Win32Win32

MFCMFC ATLATL

ManagedManaged

.NET Compact.NET CompactFrameworkFramework

Server sideServer side

ASP .NETASP .NETMobile ControlsMobile Controls

NativeNative

Win32Win32

MFCMFC ATLATL

ManagedManaged

.NET Compact.NET CompactFrameworkFramework

Server sideServer side

ASP .NETASP .NETMobile ControlsMobile Controls

Windows Mobile Development PlatformWindows Mobile Development Platform:: TodayToday

Embedded VC++Embedded VC++ Visual Studio .NETVisual Studio .NET

Page 4: Network and Connectivity

AgendaAgendaPart 1: OverviewPart 1: Overview

Part 2: Connectivity ScenariosPart 2: Connectivity Scenarios

Part 3: Connection ManagerPart 3: Connection Manager

Download the slides for this session at: Download the slides for this session at: http://www.paulyao.com/MSMDC_CLI36http://www.paulyao.com/MSMDC_CLI363.ppt3.ppt

Page 5: Network and Connectivity

Part 1: OverviewPart 1: Overview

The Connectivity WheelThe Connectivity WheelNetwork CategoriesNetwork CategoriesNetworking & Connectivity APIsNetworking & Connectivity APIs

Page 6: Network and Connectivity

The Connectivity WheelThe Connectivity WheelCircuit Switched Data Circuit Switched Data (e.g. GSM, CDMA)(e.g. GSM, CDMA)

Packet Data (e.g. Packet Data (e.g. GPRS, 1xRTT)GPRS, 1xRTT)

SMSSMS

802.11802.11

Desktop Pass-ThroughDesktop Pass-Through

BluetoothBluetooth

TCP/IPTCP/IP

WAPWAP

Cable Cable ReplacementReplacement

Page 7: Network and Connectivity

Network CategoriesNetwork Categories

Personal Area Network (PAN)Personal Area Network (PAN)Wired – USB, serialWired – USB, serialWireless – Bluetooth, InfraredWireless – Bluetooth, Infrared

Local Area Network (LAN)Local Area Network (LAN)Wired – Ethernet (TCP/IP), Token-ringWired – Ethernet (TCP/IP), Token-ringWireless – 802.11b “WiFi”, 802.11aWireless – 802.11b “WiFi”, 802.11a

Wide Area Network (WAN)Wide Area Network (WAN)Wired – Plain Old Telephone System Wired – Plain Old Telephone System (POTS), The Internet(POTS), The InternetWireless – Mobile phone networks Wireless – Mobile phone networks (GSM/GPRS/CDMA)(GSM/GPRS/CDMA)

Page 8: Network and Connectivity

Networking APIs (1/8)Networking APIs (1/8)Windows Sockets 2.2Windows Sockets 2.2

TCP/IP connections TCP/IP connections No asynchronous support (Windows No asynchronous support (Windows message-based support) message-based support) IrDA connections IrDA connections Bluetooth connections Bluetooth connections Differences from previous versions Differences from previous versions

Multiple transport protocols Multiple transport protocols TCP/IPv4 TCP/IPv4 TCP/IPv6 TCP/IPv6

Multicast support Multicast support Overlapped I/O with scatter/gather Overlapped I/O with scatter/gather Secure socketSecure socket

Page 9: Network and Connectivity

Networking APIs (2/8)Networking APIs (2/8)Network SupportNetwork Support

Windows Internet (WinInet) ServicesWindows Internet (WinInet) ServicesHTTP clients HTTP clients FTP clients FTP clients No Gopher protocol support No Gopher protocol support Autodial Autodial Passport Passport

Connection ManagerConnection ManagerContainer for network connection and Container for network connection and configuration informationconfiguration informationSupports connection policySupports connection policy

Page 10: Network and Connectivity

Networking APIs (3/8)Networking APIs (3/8)ActiveSync Service ProvidersActiveSync Service Providers

Synchronization of device data with Synchronization of device data with desktopdesktopExamples:Examples:

Desktop Outlook with Pocket OutlookDesktop Outlook with Pocket OutlookDesktop database with device databaseDesktop database with device database

ElementsElementsCOM-based DLL on desktopCOM-based DLL on desktopCOM-based DLL on deviceCOM-based DLL on deviceEnabled with registry settings Enabled with registry settings

Page 11: Network and Connectivity

Networking APIs (4/8)Networking APIs (4/8)Remote API (RAPI)Remote API (RAPI)

Available when device is connected Available when device is connected via ActiveSyncvia ActiveSyncAccess to device dataAccess to device data

File systemFile systemRegistryRegistryCE property databasesCE property databases

Load & run device-side exucutables:Load & run device-side exucutables:CeCreateProcessCeCreateProcess – run program (.exe) – run program (.exe) filefileCeRapiInvokeCeRapiInvoke – load library (.dll) on – load library (.dll) on devicedevice

Page 12: Network and Connectivity

Networking APIs (5/8)Networking APIs (5/8)Web servicesWeb services

Formerly known as “XML Web Formerly known as “XML Web services”services”Client/Server MechanismClient/Server Mechanism

Remote Procedure Call (RPC)Remote Procedure Call (RPC)SOAP-compliant XMLSOAP-compliant XMLSent via HTTP/SMTP portsSent via HTTP/SMTP ports

Device SideDevice Side.NET Compact Framework supports .NET Compact Framework supports Web service clientsWeb service clients

Server SideServer SideASP.NET supports Web service serversASP.NET supports Web service servers

Page 13: Network and Connectivity

Networking APIs (6/8)Networking APIs (6/8)Mobile PhoneMobile Phone

Assisted Telephony Assisted Telephony Phone API Phone API Telephony API (TAPI) Telephony API (TAPI) Extended TAPI Extended TAPI Wireless Application Protocol (WAP) Wireless Application Protocol (WAP) Short Message Service (SMS) Short Message Service (SMS) Subscriber Identity Module (SIM) Subscriber Identity Module (SIM) Manager Manager

Page 14: Network and Connectivity

Networking APIs (7/8)Networking APIs (7/8)User Interface SupportUser Interface Support

NETUI – dialog box libraryNETUI – dialog box libraryGetIPAddressGetIPAddressConnectionDialogConnectionDialogDisconnectDialogDisconnectDialogGetUsernamePasswordGetUsernamePassword

Connection Setting Applet…Connection Setting Applet…CreateProcess(L”remnet.exe”, …)CreateProcess(L”remnet.exe”, …)

Summon ActiveSync:Summon ActiveSync:CreateProcess(L”repllog.exe /remote”, CreateProcess(L”repllog.exe /remote”, …)…)

Page 15: Network and Connectivity

Networking APIs (8/8)Networking APIs (8/8)MiscellaneousMiscellaneous

Data SecurityData SecurityCryptography API Cryptography API Digital Certificates (X.509) Digital Certificates (X.509) Secure Socket Layer (SSL 2.0 and 3.0) Secure Socket Layer (SSL 2.0 and 3.0) Private Communications Technology Private Communications Technology (PCT) Protocol 1.0 (PCT) Protocol 1.0

Dial-Up NetworkingDial-Up NetworkingA.k.a. “Remote Access Service” (RAS) A.k.a. “Remote Access Service” (RAS) Call ISP over modemCall ISP over modemEstablish PPP / SLIP connectionsEstablish PPP / SLIP connectionsUse Connection Manager insteadUse Connection Manager instead

Page 16: Network and Connectivity

Part 2: Connectivity Part 2: Connectivity ScenariosScenarios

Personal Area NetworkPersonal Area NetworkLocal Area NetworkLocal Area NetworkWide Area NetworkWide Area Network

Page 17: Network and Connectivity

Personal Area NetworkPersonal Area NetworkActiveSync ConnectivityActiveSync Connectivity

PAN / Direct connectionPAN / Direct connectionUSB, serialUSB, serialInfrared, BluetoothInfrared, Bluetooth

PassthroughPassthroughNetwork connection to device in cradleNetwork connection to device in cradleSupports HTTP, HTTPS, IMAP, FTP, and Supports HTTP, HTTPS, IMAP, FTP, and POP3POP3Does not support UDP, ICMP, or PPTP Does not support UDP, ICMP, or PPTP Reference – article by Andreas Reference – article by Andreas Sjöström:Sjöström:

http://www.microsoft.com/mobile/developerhttp://www.microsoft.com/mobile/developer/technicalarticles/passthrough.asp/technicalarticles/passthrough.asp

Use ActiveSync 3.7 for Windows Use ActiveSync 3.7 for Windows Mobile devicesMobile devices

Page 18: Network and Connectivity

Personal Area Network Personal Area Network Developer SupportDeveloper Support

ActiveSync supports ActiveSync supports Download / deploymentDownload / deploymentDebuggingDebugging*Tip* Developers can speed up *Tip* Developers can speed up download & debugging with an download & debugging with an ActiveSync network connectionActiveSync network connection

EmulatorEmulatorSupport ActiveSyncSupport ActiveSyncRequires network virtual switchRequires network virtual switchRefer to eVC++ 4.0 documentation Refer to eVC++ 4.0 documentation

Page 19: Network and Connectivity

Local Area NetworkLocal Area NetworkActiveSyncActiveSync

First: establish partnership via direct First: establish partnership via direct connectionconnectionCan synchronize over any LANCan synchronize over any LAN

Wireless: WiFi (802.11b), 802.11aWireless: WiFi (802.11b), 802.11aWired: Ethernet, Token-ringWired: Ethernet, Token-ring

Exchange Server ActiveSync to Exchange Server ActiveSync to serverserver*Tip* Developers can speed up *Tip* Developers can speed up download & debugging with an download & debugging with an ActiveSync network connection (did I ActiveSync network connection (did I already say that?!?)already say that?!?)

Page 20: Network and Connectivity

Local Area NetworkLocal Area Network”My Work Network””My Work Network”

Can connect via modemCan connect via modemVirtual Private NetworkVirtual Private Network

Need host name –or- IP addressNeed host name –or- IP addressVPN Types:VPN Types:

IPSec/L2TP – need certificate –or- pre-IPSec/L2TP – need certificate –or- pre-shared keyshared keyPPTP – need user name/passwordPPTP – need user name/password

Can have proxy settingsCan have proxy settingsHTTPHTTPWAPWAPSecure WAPSecure WAP

Page 21: Network and Connectivity

Local Area NetworkLocal Area NetworkWhat is it good for?What is it good for?

Access to any IP-enabled network service Access to any IP-enabled network service or serveror serverFun with HTMLFun with HTML

Browse WWW, local web serversBrowse WWW, local web servers

Fun with XMLFun with XMLWeb service clientWeb service clientWeb service serverWeb service server

Fun with TLAs (three-letter acronyms…)Fun with TLAs (three-letter acronyms…)FTP, SSL, VPN, PPTPFTP, SSL, VPN, PPTPNetwork PPPNetwork PPP

Network redirector - SMB protocolNetwork redirector - SMB protocolFile ServersFile ServersPrint ServersPrint Servers

Page 22: Network and Connectivity

Local Area NetworkLocal Area NetworkConnect Visual Studio .NETConnect Visual Studio .NET

Use ActiveSync Use ActiveSync Establish partnership via USB/serialEstablish partnership via USB/serialDownload & RunDownload & RunStarts device-side conmanclient.exeStarts device-side conmanclient.exe

Configure TCP/IP TransportConfigure TCP/IP TransportTools->Options…Tools->Options…[Device Tools][Device Tools][Devices][Devices]“Pocket PC Device”, “Pocket PC Device”, Click [Configure…]Click [Configure…]

Options:Options:Auto IP addressAuto IP addressStatic IP addressStatic IP addressSet static address on Set static address on

devicedevice

IP address from IP address from ActiveSyncActiveSync

Page 23: Network and Connectivity

Local Area NetworkLocal Area NetworkDownload/Debug – eVC++ (no Download/Debug – eVC++ (no DHCP)DHCP)Establish partnership Establish partnership

via USB/serialvia USB/serialStatic IP address on Static IP address on desktopdesktopStatic IP Address on Static IP Address on smart devicesmart device

Set WINS address to Set WINS address to desktop IP addressdesktop IP addressStart->Settings-> Start->Settings-> [Connections][Connections][Network] [Adapters][Network] [Adapters]<Select Adapter><Select Adapter>[Name Servers][Name Servers]

Page 24: Network and Connectivity

Local Area NetworkLocal Area NetworkDownload/Debug – eVC++ (w/ Download/Debug – eVC++ (w/ DHCP)DHCP)Desktop-SideDesktop-Side

Enable network connectionsEnable network connectionsConnect via USB/serialConnect via USB/serial

Device-SideDevice-SideEnable network connections in Enable network connections in ActiveSyncActiveSyncEnable DHCP for network adapterEnable DHCP for network adapterAttach network adapterAttach network adapterMight need to reset deviceMight need to reset device

Connect to NetworkConnect to NetworkWiredWiredWirelessWireless

Page 25: Network and Connectivity

Public Network SupportPublic Network Support

Connect via:Connect via:Dial-in modemDial-in modemInternet PPTP connectionInternet PPTP connection

ActiveSync WAN ConnectionActiveSync WAN ConnectionVPN / PPTP connection to desktopVPN / PPTP connection to desktopExchange Server ActiveSync to serverExchange Server ActiveSync to server

NetworksNetworksInternet – WWW, http, https:Internet – WWW, http, https:WAP – wsp://, wsps:WAP – wsp://, wsps:GSM / GPRS / CDMAGSM / GPRS / CDMA

Page 26: Network and Connectivity

Public Mobile Phone Public Mobile Phone NetworkNetworkWAP ProtocolWAP ProtocolWireless Datagram Protocol (WDP)Wireless Datagram Protocol (WDP)

SMS or UDP TransportsSMS or UDP TransportsApplication Wake up (PPC2003 only)Application Wake up (PPC2003 only)WDP Phase 1 supportWDP Phase 1 support

datagrams may originate from the datagrams may originate from the internetinternet

Page 27: Network and Connectivity

Public Mobile Phone NetworkPublic Mobile Phone NetworkShort Message Service (SMS)Short Message Service (SMS)

Used for short messagesUsed for short messagesLength is air link dependentLength is air link dependentCapable of message concatenationCapable of message concatenation

APIsAPIs#include <sms.h>#include <sms.h>

SmsOpen(…);SmsOpen(…);

SmsSendMessage(…);SmsSendMessage(…);

SmsClose(…);SmsClose(…);

Page 28: Network and Connectivity

Part 3: Connection Part 3: Connection ManagerManager

OverviewOverviewNetwork ModelNetwork ModelConfigurationConfigurationConfiguration Service Providers Configuration Service Providers (CSPs)(CSPs)API SupportAPI Support

Page 29: Network and Connectivity

Connection ManagerConnection ManagerOverviewOverview

Umbrella for Network Address Umbrella for Network Address ResolutionResolution

VoiceVoiceData – Internet, WAP, etc.Data – Internet, WAP, etc.

Configuration Service Providers Configuration Service Providers (CSP)(CSP)

Manage service-specific, low-level Manage service-specific, low-level settingssettingsGPRS settings, Data networks, URL GPRS settings, Data networks, URL mappingmappingConnections for: PPP, Proxies, VPN, WiFiConnections for: PPP, Proxies, VPN, WiFi

Decide optimal route for connectionsDecide optimal route for connectionsBased on ‘cost’ criteria provided by Based on ‘cost’ criteria provided by CSPsCSPsCan manage multi-hop connectionsCan manage multi-hop connections

Page 30: Network and Connectivity

Connection ManagerConnection ManagerNetwork ModelNetwork Model

The The InternetInternet

My My Corporate Corporate NetworkNetwork

WAP WAP NetworkNetwork

VPNVPN

ProxyProxy

WAPWAPGatewayGateway

Cingular ISPCingular ISP

Earthlink ISPEarthlink ISP

MS RedmondMS RedmondRASRAS

MS ParisMS ParisRASRAS

Yahoo.comYahoo.com

mswmsw

mail.earthlink.netmail.earthlink.net

red-msg-06red-msg-06

wap.ananova.comwap.ananova.com

Page 31: Network and Connectivity

Connection ManagerConnection ManagerConfiguration (1/2)Configuration (1/2)

Who can configureWho can configureEnd userEnd userCorporate IT DeptCorporate IT DeptMobile phone Mobile phone service providerservice provider

Default NetworksDefault NetworksThe InternetThe InternetWorkWorkThe WAP NetworkThe WAP NetworkSecure WAP Secure WAP NetworkNetwork

Pocket PC AddsPocket PC AddsMy Work NetworkMy Work NetworkMy ISPMy ISP

Page 32: Network and Connectivity

Connection ManagerConnection ManagerConfiguration (2/2)Configuration (2/2)

Burn into device ROMBurn into device ROMSend in CAB Send in CAB provisioning format provisioning format (.cpf) file(.cpf) fileInstall in cradle using Install in cradle using rapiconfig.exerapiconfig.exeC> rapiconfig mydoc.xmlC> rapiconfig mydoc.xml

Send using Wireless Send using Wireless Application Protocol Application Protocol (WAP) (WAP)

Push MessagePush MessageOver-the-air (OTA) Over-the-air (OTA) protocolprotocol

Provisioning Provisioning XML FileXML File

<wap-provisioningdoc><wap-provisioningdoc>

<characteristic <characteristic type="CM_Networks">type="CM_Networks">

<characteristic <characteristic type="The Internet">type="The Internet">

<parm <parm name="DestId" name="DestId" value="{436EF144-value="{436EF144-B4FB-4863-A041-B4FB-4863-A041-8F905A62C572}"/>8F905A62C572}"/>

</characteristic></characteristic>

</characteristic></characteristic>

</wap-provisioningdoc></wap-provisioningdoc>

Page 33: Network and Connectivity

Connection ManagerConfiguration Service Providers (CSP)

Connection Manager EngineConnection Manager Engine

VoiceVoice RASRAS ProxyProxy PPTPPPTP GPRSGPRS etcetc

PlannerPlannerConfigurationConfiguration

ManagerManager

Connection Manager UIConnection Manager UI

XMLXMLProvisioningProvisioning

DocumentDocument

URLURLMapperMapper

ApplicationApplication

CSPsCSPs

Page 34: Network and Connectivity

Connection ManagerConnection ManagerAPI Support (1/2)API Support (1/2)

ConnMgrMapURL()ConnMgrMapURL()Fetch preferred network for a given URLFetch preferred network for a given URLAllows applications to query for network Allows applications to query for network policypolicy

Default mapping:Default mapping:*:\\*.*\*:\\*.*\ - The Internet - The Internet*:\\*\*:\\*\ - Private network (intranet) - Private network (intranet)wsp:\\wsp:\\ - WAP network - WAP networkwsps:\\wsps:\\ - Secure WAP network - Secure WAP network

Page 35: Network and Connectivity

Connection ManagerConnection ManagerAPI Support (1/2)API Support (1/2)

ConnMgrEstablishConnection()ConnMgrEstablishConnection()Creates asynchronous request for Creates asynchronous request for connectionconnection

ConnMgrConnectionStatus()ConnMgrConnectionStatus()Query connection statusQuery connection status

ConnMgrEstablishConnectionSynConnMgrEstablishConnectionSync()c()

Creates synchronous request for Creates synchronous request for connectionconnection

ConnMgrReleaseConnection()ConnMgrReleaseConnection()Disconnect when finished using Disconnect when finished using networknetwork

Page 36: Network and Connectivity

After This Session…After This Session…

Visit the Windows Mobile Visit the Windows Mobile booth to:booth to:

Get the Get the Windows Mobile Developer Windows Mobile Developer Resource Kit Resource Kit and start supporting and start supporting landscape and high DPI landscape and high DPI Talk to the Talk to the Technical SupportTechnical Support team teamJoin the Windows Mobile Solutions Join the Windows Mobile Solutions Partner Partner ProgramProgramEnter the Microsoft Enter the Microsoft Mobile2Market Mobile2Market Application ContestApplication Contest

Fill in your evaluation form Fill in your evaluation form sponsored by AT&T Wirelesssponsored by AT&T Wireless

1 MPX200 given away per 1 MPX200 given away per session. See session. See www.mscorpevents.com/mdcwww.mscorpevents.com/mdc

Page 37: Network and Connectivity

Your Questions…Your Questions…

Page 38: Network and Connectivity

Thank You!Thank You!

Download the slides for this session at: Download the slides for this session at: http://www.paulyao.com/MSMDC_CLI363.phttp://www.paulyao.com/MSMDC_CLI363.pptpt

Page 39: Network and Connectivity

© 2004 Microsoft Corporation. All rights reserved.© 2004 Microsoft Corporation. All rights reserved.MICROSOFT CONFIDENTIAL. INTERNAL USE ONLY.MICROSOFT CONFIDENTIAL. INTERNAL USE ONLY.