Slide1 l.jpg
1 / 31

Windows CE SDK.


105 views
Uploaded on:
Category: General / Misc
Description
Windows CE .net SDK Miro Juric Software Design Engineer/Test Microsoft Introduction Overview of UPnP support in Windows CE (device side) Overview of UPNP support in Windows CE (control point side) IPv6 support Windows CE support for UPnP Internet Gateway Device – Demo Q/A
Transcripts
Slide 1

Windows CE .net SDK Miro Juric Software Design Engineer/Test Microsoft

Slide 2

Introduction Overview of UPnP backing in Windows CE (gadget side) Overview of UPNP backing in Windows CE (control point side) IPv6 bolster Windows CE support for UPnP Internet Gateway Device – Demo Q/A

Slide 3

UPnP support on CE Device facilitating APIs Allow usage of UPnP gadgets COM (essential SDK API) C ( accessible to OEMs) Control point APIs Discovery and control of remote gadgets COM Bridging Expose non-UPnP gadgets as UPnP No unique backing obliged

Slide 4

IUpnpDeviceFinder IUPnPRegistrar Device facilitating COM layer Control Point COM layer App IUpnpDevice IUpnpService IUPnPEventSink Device API Control Point API UPNP C API WININET Callback Device IOCTL Device.exe HTTPD Web Server UPNP SERVICE ISAPI extn Eventing (GENA) SSDP UPnP structural planning on CE

Slide 5

UPnP Device Host Infrastructure that rearranges building UPnP gadgets and scaffolds on Windowsâ® Allows facilitating of different gadgets

Slide 6

What does the gadget host foundation do? Declares vicinity of enlisted gadgets Renews the promotions consequently Responds to hunt demands also Responds to asks for gadget/administration depictions Invokes activities asked for by control focuses on administrations Handles eventing Accepts membership solicitations Maintains the rundown of supporters per administration Sends occasions to every one of the endorsers

Slide 7

So what does the facilitated gadget actualize? IUPnPDeviceControl Is the gadget chief for contained administrations and gadgets An administration object for every facilitated administration. For every administration item, actualize the accompanying: IDispatch Service uncovered a dispatch interface for its uncovered activities and state variables IUPnPEventSource [Optional] Service executes this interface to send state variable changes to the gadget host framework Device host foundation deals with everything else!

Slide 8

UPnP gadget facilitating (COM) Need a XML gadget portrayal layout Need a SCPD XML document for every administration Implement a COM article uncovering IUPnPDeviceControl Implement a Dispatch interface for every administration Call IUPnPRegisterRunningDevice to distribute the gadget

Slide 9

UPnP Device Hosting (COM) Device Implementation UPnP COM Device Hosting Layer Device Description Template .xml IUPnPDeviceControl IUPnPRegistrar Service 2 Service 1 execution IDispatch Scpd2.xml IUPnPEventSource Scpd1.xml IUPnPEventSink

Slide 10

UPnP Device Hosting (COM) IUPnPDeviceControl is the top level interface to your gadget Initialize (/*[in]*/BSTR bstrXMLDesc,/*[in]*/BSTR bstrDeviceIdentifier,/gadget to Init (RegisterDevice)/*[in]*/BSTR bstrInitString);/distinguishes the init string particular to gadget GetServiceObject (/*[in]*/BSTR bstrUDN,/Device UDN/*[in]*/BSTR bstrServiceId,/Service ID for which to acquire pointer/*[out, retval]*/IDispatch ** ppdispService);/Idispatch pointer to administration protest Each administration item uncovered IDispatch and IUPnPEventSource IDispatch is summoned for each control demand IUPnPEventSource is utilized for outbound occasion warnings when a state variable changes

Slide 11

Eventing To bolster eventing, an administration item actualizes IUPnPEventSource Interface has two systems: Advise Device host calls this strategy and gives the administration question a pointer to an IUPnPEventSink interface This gives the administration question an approach to go back state changes to gadget host Unadvise Device host calls this technique to tear down eventing To send an occasion Service calls IUPnPEventSink::OnStateChanged with a rundown of dispids for state variables that have changed Device host inquiries the dispids, gets the changed values and sends an occasion to the endorsers

Slide 12

Device Registration Device Host produces the proper URLs in the gadget depiction format Device Host replaces UDNs in the gadget portrayal layout with all around exceptional identifiers Allows the gadget to be enrolled on various machines utilizing the same format Allows the gadget to be enlisted on the same machine different times utilizing the same format Identifier went back that permits a gadget to be unregistered

Slide 13

UPnP Device Hosting (COM) Use UPnPRegistrar item to distribute your gadget RegisterDevice (/* [in] */BSTR bstrXMLDesc, /* [in] */BSTR bstrProgIDDeviceControlClass, … /* [retval][out] */BSTR *pbstrDeviceIdentifier); Registers the gadget to keep running in setting of gadget host – endures crosswise over sys boots RegisterRunningDevice (/* [in] */BSTR bstrXMLDesc, /* [in] */IUnknown *punkDeviceControl, //IUPnPDeviceControl … /* [retval][out] */BSTR *pbstrDeviceIdentifier); Returns Device identifier to be utilized for Unregister – does not continue crosswise over sys boots UnregisterDevice (/* [in] */BSTR bstrDeviceIdentifier,/* [in] */BOOL fPermanent); GetUniqueDeviceName Retrieves the UDN of a gadget

Slide 14

UPnP Device Hosting (C) Using low level C-style API (OEM just) In this methodology UPnP stack interprets UPnP messages for the UPnP gadget to calls into a C-style callback capacity gave by gadget usage. UPnP stack doesn’t perform any encoding/interpreting of contentions or state variables so gadget execution needs to manage values in the configuration ordered by UPnP. Not as full included, but rather littler foot shaped impression for OEMs making little gadgets

Slide 15

UPnP Device Hosting (C) UPnPAddDevice to make a named gadget taking into account your portrayal. Supply a callback capacity UPnPPublishDevice to report the gadget on the system Callback capacity summoned on accepting control demands UPnPSetControlResponse to send a reaction back UPnPSubmitEvent to send occasion notices to endorsers

Slide 16

Control Point API COM interfaces for building UPnP control focuses IUPnPDeviceFinder IUPnPDevices IUPnPDevice IUPnPServices IUPnPService

Slide 17

Devices Collection Device Services Collection Object Model Device Finder

Slide 18

Services Collection Service XML (SOAP) to gadget Events (GENA) from gadget Object Model

Slide 19

UPnP Control Point Creating Device Finder IUPnPDeviceFinder * pDevFind = NULL; CoCreateInstance(CLSID_UPnPDeviceFinder, … IID_IUPnPDeviceFinder, (void **) &pDevFind); Search for Device IUPnPDevices * pFoundDevices = NULL; bstrTypeURI = SysAllocString (L”urn:schemas-upnp-org:device:clockdevice”); pDevFind->FindByType(bstrTypeURI, 0, &pFoundDevices); ::FindByType strategy looks by gadget or administration sort

Slide 20

UPnP Control Point Enumerate Device IUPnPDevices *pFoundDevices IUnknwn *pUnk = NULL; pFoundDevices->get_NewEnum(&pUnk) Device Objects in the accumulation are contained inside of VARIANT structures – these structures contain pointers to IDispatch interfaces on the gadget objects/Obtain IUPnPDevice *pDevice interface Get IUPnPServices – administration gathering GetService(IUPnPDevice *pDevice) IUPnPServices *pServices = NULL; IUPnPService *pClockServics = NULL; pDevice->get_Services(&pServices)

Slide 21

UPnP Control Point Get Service Object We have IUPnPServices *pServices IUPnPService *pClockService = NULL; IUPnPService *pAlarmService = NULL; bstrClockSvcId = SysAllocString (L”urn:upnp-org:serviceId:ClockService”) pServices->get_Item(bstrSvcId, &pClockService) pServices->get_Item(bstrAlarmSvcID, &pAlarmService)

Slide 22

UPnP Control Point Invoke Actions – control IUPnPService::InvokeAction – technique pClockService->InvokeAction ( bstrActionName, varInArgs, &varOutArgs, &varReturnVal); VARIANT varInArgs; QueryStateVariable Discouraged by UPnP Forum

Slide 23

IPv6 Windows CE bolsters UPnP over IPv4 and IPv6 systems IPv6 bolster just UPnP gadgets will utilize just IPv6 addresses IPv4 + IPv6 UPnP gadgets will utilize IPv6 address with IPv6 competent hosts on the system and IPv4 address with gadgets supporting just IPv4 just UPnP gadgets use IPv4 just - Default

Slide 24

IPv6 Scope Link Local  Addresses (starts with FE80:…..) This implies listening and television on FF02::C, the connection neighborhood scope multicast address for the connection nearby degree multicast address for SSDP – Default Site Local  Addresses– (starts with FEC0:….) Link nearby is utilized dependably. Site neighborhood is discretionary notwithstanding connection nearby . Utilizations checking of IPv6 locations to control the engendering of SSDP messages rather than Hop Limit (identical to as far as possible in IPv4).

Slide 25

UPnP Samples in Windows CE .Net Devices: Internet Gateway Device Implements obliged pattern and communicates with a real Gateway execution. Completely practical IGD – UPnP confirmed Control Point: Universal Control Point test

Slide 26

Platform Builder 4.10 Platform Builder is a coordinated improvement environment (IDE) for building modified implanted stages in light of the Microsoft⮠Windows⮠CE .NET working framework (OS). Stage Builder accompanies all the improvement instruments vital for you to outline, make, construct, test, and troubleshoot a Windows CE–based stage. The IDE gives a solitary incorporated workspace in which you can take a shot at both stages and tasks

Slide 27

PB Configurations Residential_gateway PDA Web Pad Enterprise …

Slide 28

Building Windows CE based Residential Gateway Image with UPnP Internet Gateway Device Miro Juric Software Design Engineer/Test Windows CE

Slide 29

Summary UPnP upheld in Windows CE Pocket PC – Windowc CE OS Device facilitating included in 4.0 Control point included in 4.0 Same API’s as XP!! Non specific Control Point test Working IGD for Gatewa