Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does ohnet support Embedded devices?
03-07-2015, 11:02 AM
Post: #21
RE: Does ohnet support Embedded devices?
(02-07-2015 02:39 PM)simonc Wrote:  
(02-07-2015 01:19 PM)SiMet Wrote:  
(01-07-2015 01:17 PM)simonc Wrote:  You should provide the 'real' domain for device lists, not a UPnP representation. So, for services/devices defined by the UPnP forum, use "upnp.org" as the domain throughout your code.

Here I could not agree with you. Upnp specify in their documents (for example http://upnp.org/specs/av/UPnP-av-Content...ervice.pdf or http://upnp.org/specs/av/UPnP-av-MediaSe...evice.pdf) that ContentDirectory service have serviceType: "urn:schemas-upnp-org:service:ContentDirectory:1" and MediaServer deviceType is "urn:schemas-upnp-org:device:MediaServer:1".
If I'd like make valid MediaServer with ContentDirectory which pass UCTT tests. This types have to be as above and it's my scenario.

I agree that we need to send "schemas-upnp-org" over the wire. You shouldn't specify this when calling device lists however. If you specify "upnp.org" as the domain of a device list, it'll convert this as required for network requests.

Could you explain me how this conversion works and how to use it?
It's strange to me that I create device with Upnp.Domain "schemas-upnp-org" and have to make CP list with "upnp.org" type.
Is there other conversions?
Find all posts by this user
03-07-2015, 01:14 PM
Post: #22
RE: Does ohnet support Embedded devices?
(03-07-2015 11:02 AM)SiMet Wrote:  Could you explain me how this conversion works and how to use it?
It's strange to me that I create device with Upnp.Domain "schemas-upnp-org" and have to make CP list with "upnp.org" type.
Is there other conversions?

You should set the domain for the device as "upnp.org" also. ohNet will automatically convert this to "schemas-upnp-org" where appropriate.
Find all posts by this user
03-07-2015, 01:59 PM
Post: #23
RE: Does ohnet support Embedded devices?
(03-07-2015 01:14 PM)simonc Wrote:  
(03-07-2015 11:02 AM)SiMet Wrote:  Could you explain me how this conversion works and how to use it?
It's strange to me that I create device with Upnp.Domain "schemas-upnp-org" and have to make CP list with "upnp.org" type.
Is there other conversions?

You should set the domain for the device as "upnp.org" also. ohNet will automatically convert this to "schemas-upnp-org" where appropriate.

If I could ask why do you do such translation?
Find all posts by this user
03-07-2015, 02:08 PM
Post: #24
RE: Does ohnet support Embedded devices?
(03-07-2015 01:59 PM)SiMet Wrote:  
(03-07-2015 01:14 PM)simonc Wrote:  You should set the domain for the device as "upnp.org" also. ohNet will automatically convert this to "schemas-upnp-org" where appropriate.

If I could ask why do you do such translation?

ohNet is intended to be capable of communicating using multiple different protocols. In addition to UPnP we currently support LPEC (a simple serial protocol used by very simple controllers) and Dv (a dummy protocol used when control point and device are in the same address space). Device stack clients can publish devices on all available protocols simultaneously.

Given that the same device is available on multiple protocols, it seemed most sensible to keep any rules that are specific to UPnP (such as how to present domain names) inside our UPnP protocol implementation.
Find all posts by this user
09-07-2015, 01:50 PM (This post was last modified: 09-07-2015 02:55 PM by M-Art.)
Post: #25
RE: Does ohnet support Embedded devices?
(30-06-2015 07:43 AM)SiMet Wrote:  Embedded devices are discovered but not by ohNet control point stack.

@SiMet is right. Using CpiDeviceListCppUpnpAll class, OhNet does send M-SEARCH with "ST: ssdp:all" header, but handles only response with root device. It should handle all notifies.

Here is the fix:

Code:
diff --git a/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp b/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp
index 0d048ad..74641c2 100644
--- a/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp
+++ b/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.cpp
@@ -862,6 +862,23 @@ void CpiDeviceListUpnpAll::SsdpNotifyRootAlive(const Brx& aUuid, const Brx& aLoc
     }
}

+void CpiDeviceListUpnpAll::SsdpNotifyUuidAlive(const Brx& aUuid, const Brx& aLocation, TUint aMaxAge)
+{
+    this->SsdpNotifyRootAlive(aUuid, aLocation, aMaxAge);
+}
+
+void CpiDeviceListUpnpAll::SsdpNotifyDeviceTypeAlive(const Brx& aUuid, const Brx& /*aDomain*/, const Brx& /*aType*/,
+                                                 TUint /*aVersion*/, const Brx& aLocation, TUint aMaxAge)
+{
+    this->SsdpNotifyRootAlive(aUuid, aLocation, aMaxAge);
+}
+
+void CpiDeviceListUpnpAll::SsdpNotifyServiceTypeAlive(const Brx& aUuid, const Brx& /*aDomain*/, const Brx& /*aType*/,
+                                                  TUint /*aVersion*/, const Brx& aLocation, TUint aMaxAge)
+{
+    this->SsdpNotifyRootAlive(aUuid, aLocation, aMaxAge);
+}
+

// CpiDeviceListUpnpRoot

diff --git a/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.h b/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.h
index 9f7d48c..6b89a54 100644
--- a/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.h
+++ b/OpenHome/Net/ControlPoint/Upnp/CpiDeviceUpnp.h
@@ -180,6 +180,11 @@ public:
     ~CpiDeviceListUpnpAll();
     void Start();
     void SsdpNotifyRootAlive(const Brx& aUuid, const Brx& aLocation, TUint aMaxAge);
+    void SsdpNotifyUuidAlive(const Brx& aUuid, const Brx& aLocation, TUint aMaxAge);
+    void SsdpNotifyDeviceTypeAlive(const Brx& aUuid, const Brx& aDomain, const Brx& aType, TUint aVersion,
+                                   const Brx& aLocation, TUint aMaxAge);
+    void SsdpNotifyServiceTypeAlive(const Brx& aUuid, const Brx& aDomain, const Brx& aType, TUint aVersion,
+                                    const Brx& aLocation, TUint aMaxAge);
};

/**
Find all posts by this user
16-07-2015, 01:14 PM
Post: #26
RE: Does ohnet support Embedded devices?
any comment for the fix?
Find all posts by this user
16-07-2015, 05:09 PM
Post: #27
RE: Does ohnet support Embedded devices?
(16-07-2015 01:14 PM)M-Art Wrote:  any comment for the fix?

Apologies for the delay. You're suggested fix looks good - thanks for posting it. I'll try to get it committed tomorrow.
Find all posts by this user


Forum Jump: