Network and Connectivity


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Microsoft provides you with a unified and consistent development platform , so that the device hardware is abstracted away, and you can concentrate on creating compelling applications that will run on all Windows Mobile-based devices. Above the device hardware and drivers, the Windows Mobile platform, based on Windows CE as the core OS, provides a familiar user experience and applications , such as Windows Media player, Pocket Outlook and Pocket Internet Explorer. The platform is exposed to you through rich API support allowing you flexibility and control, for a variety of scenarios. <Describe some APIs such as Connection Manager, Config Manager, GAPI, etc.) There are different approaches and tools for developing and running your applications: Native – for client-side, low-level applications, use Embedded VC++ 3 or 4 Managed (.NET CF) – for most client-side, managed code applications, use Visual Studio .NET Mobile Web (ASP .NET Mobile Controls)– for server-side applications, use Visual Studio .NET
  • The Developer Resource Kit contains tools, SDKs and white papers to get started developing for devices up to and including Second Edition today The Technical support team are at the booth and are there to try to answer your technical questions If you haven’t already, go to the booth to register for our free Windows Mobile Solution Partner Program - we are offering free t-shirts and a chance to win a device If you already have an application or are planning to build one soon, join the Mobile2Market application contest – we’re giving out 4 $25,000 prizes and retail distribution for winning apps Insert only sessions that follow yours and are pertinent to the information you have presented or you think will be interesting. You can insert none, one or more than one
  • Network and Connectivity

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