SourceForge has been redesigned. Learn more.
Close

SSDP discovery

2012-10-24
2012-12-14
  • Bacchus Beale

    Bacchus Beale - 2012-10-24

    hello,
    I have managed to get the Advertising working and saw NOTIFY messages in Wireshark.
    Next, I need to listen for clients eg Windows Explorer sending SEARCH messages.
    I am using BasicDevice which does not require a service- just discovery and a description XML doc.

    I can see a function to send a search request, but how do I use libupnp to listen and accept these messages?
    thanks
    Bacchus

     
  • Tieske

    Tieske - 2012-11-12

    First; when on windows use the developer tools for UPnP, specifically the DeviceSpy and the sniffer, see http://opentools.homeip.net/dev-tools-for-upnp

    When you create a device through the API, you need to provide a callback function. This callback function will be called when a controlpoint requests a subscription to the device events, or when it tries to execute actions.
    For this to work, your device must at least have 1 service (controlpoints subscribe to services, not devices).

    Using the developertools above, find your device in the tree on the left, in the device find the service (you need to add that), right click and pick 'subscribe'.
    The subscription request will be passed on to the callback function.

    hth
    Thijs

     

Log in to post a comment.