2
votes

I am developing a hardware device that should be automatically discovered in Windows, so I prefer to do it through SSDP instead of mDNS (Zeroconf, etc.) to avoid to force users to install its support applications. I just need that the device appears in the network in Windows Explorer, and clicking on it to open the default browser using the device IP address in the URL. I've already made the code (answering in unicast to multicast M-SEARCH requests and sending NOTIFY messages on boot and periodically), I can see the messages in Wireshark on the Windows PC but the device still doesn't appear in the explorer network folder, and I can see there other devices like my printer, TV, media player, etc, and I see their messages also on Wireshark. I'm searching for some advice in the content of the notify and response messages, and also in the xml file with the device profile for such a simple device - I just want to advertise that the device has a webserver on its IP address.

These are the messages that I'm sending:

In multicast:

NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
NT: upnp:rootdevice
USN: uuid:c5baf4a1-0c8e-44da-9714-ef0123411223::upnp:rootdevice
NTS: ssdp:alive
SERVER: NodeMCU/20150415 UPnP/1.1 xpto/0.1
Location: http://192.168.3.246/deviceprofile.xml

In unicast as a reply to the M-SEARCH:

HTTP/1.1 200 OK
Cache-Control: max-age=100
EXT:
SERVER: NodeMCU/20150415 UPnP/1.1 xpto/0.1
ST: upnp:rootdevice
USN: uuid:c5baf4a1-0c8e-44da-9714-ef0123411223
Location: http://192.168.3.246/deviceprofile.xml

deviceprofile.xml:

<?xml version='1.0'?>
<root xmlns='urn:schemas-upnp-org:device-1-0'>
<device>
<deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
<presentationURL>http://192.168.3.246/</presentationURL>
<friendlyName>Remote control</friendlyName>
<manufacturer>xpto.com</manufacturer>
<manufacturerURL>http://xpto.com/</manufacturerURL>
<serialNumber>10275488</serialNumber>
<UDN>uuid:c5baf4a1-0c8e-44da-9714-ef0123411223</UDN>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:Basic:1</serviceType>
<serviceId>urn:upnp-org:serviceId:1</serviceId>
</service>
</serviceList>
</device></root>

Anything else needed in order for the device to show up in the windows explorer network folder?

Thanks in advance

Fernando

1
I've just updated the post with the content of the SSDP messages sent by the node. If necessary I can upload the code also, I'm just focusing on the SSDP messages content since I can see the messages arriving to the windows PC in Wireshark, with the correct IP/PORT - Notify messages are sent in multicast for the IP 239.255.255.250 port 1900, the reply to M-SEARCH messages (received in multicast at port 1900) are sent in unicast to the M-SEARCH sender, for the same port where the M-SEARCH message has been sent.Fernando Gomes
That seems Windows-related, not about "embedded devices". I only can advise to test that thing on a Linux box with a recent kernel to see which side actualy denies cooperation. However, I cannot help further - no idea (just some thoughts I keep private) about Windows, but now your chances might be better to get quailfied help.too honest for this site
Thanks for your comments! i'm not a windows person also, and I prefer to do the device discovery using ZeroConf, but the requirements are for the device to be discovered by Windows PCs without installing any additional application. I have the same device working with mDNS/ZeroConf, detected by Windows, Mac and Linux PCs, but it was necessary to install its support in Windows.Fernando Gomes
Ok. And you are sure the device does support SSDP actually? If you have SSDP support on Linux/Mac: does it work there? (no offense - just guessing, I do not even know what SSDP actually is. Sometimes one forgets the most obvious until someone actually asks. I know that myself very well)too honest for this site
I've developed the SSDP implementation for the embedded device, and I'm checking in a Windows PC that supports SSDP. In the PC I see other devices that advertise through SSDP, like a printer, a media device, etc. I'm not able to see the device I've implemented, but I see the messages arrive according to the standard like I stated above. Could it be that Windows only shows devices of a certain type in the explorer?Fernando Gomes

1 Answers

2
votes

Your deviceprofile.xml is not well formed according to UPnP Specification. Other element is needed under<service> tag. Also, urn:schemas-upnp-org:service:Basic:1 is illegal, you need to change to UPnP pre-defined or customise under your own namespace. An example could be:

<service>
    <serviceType>urn:schemas-upnp-org:service:XXXX:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:1</serviceId>
    <SCPDURL>URL to service description.xml</SCPDURL>
    <controlURL>URL for control</controlURL>
    <eventSubURL>URL for eventing</eventSubURL> 
</service>

You can check: Part2.3 of http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf