Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to discover device by Type
05-07-2012, 09:54 AM
Post: #1
Unable to discover device by Type
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...

Find all posts by this user
05-07-2012, 10:02 AM
Post: #2
RE: Unable to discover device by Type
Use "" as the domain and "DigitalSetTopBox" as the type. The device list will handle the canonical -> upnp domain translation for you.
Find all posts by this user

Forum Jump: