OpenHome Forum
Unable to discover device by Type - Printable Version

+- OpenHome Forum (
+-- Forum: OpenHome (/forumdisplay.php?fid=1)
+--- Forum: Net (/forumdisplay.php?fid=5)
+--- Thread: Unable to discover device by Type (/showthread.php?tid=1026)

Unable to discover device by Type - dough - 05-07-2012 09:54 AM

Using the ohNet C API, when I create a device list to discover all UPnP devices, following a successful CP start, I get device discoveries.

stb_list_handle = CpDeviceListCreateUpnpAll(&UPnPDeviceDiscoverSink, NULL, &UPnPDeviceRemoveSink, NULL);

However, if I create a device list for discovering a specific type of device, I get no discovery call back. I am a little confused about the type parameter in the API guide for the CpDeviceListCreateUpnpDeviceType function...
I have used it like this...

const char domain[]  = "schemas-upnp-org";
const char dv_type[] = "DigitalSetTopBox";
uint32_t   version   = 1;

stb_list_handle = CpDeviceListCreateUpnpDeviceType(domain, dv_type, version, &UPnPDeviceDiscoverSink, NULL, &UPnPDeviceRemoveSink, NULL);

...When using ohNetGen, the domain argument was the same as I have used here, but the "type" represented the type of service. On one UPnP browser I have, it shows "Device Type" as the complete URN. Like this:


Am I using this call correctly? Should I need to refresh the device list? Any advice is appreciated...


RE: Unable to discover device by Type - simonc - 05-07-2012 10:02 AM

Use "" as the domain and "DigitalSetTopBox" as the type. The device list will handle the canonical -> upnp domain translation for you.