D-Link Forums

The Graveyard - Products No Longer Supported => Routers / COVR => DIR-655 => Topic started by: tramvon on August 15, 2014, 08:02:08 AM

Title: Bugs in DIR-655 UPNP implementation
Post by: tramvon on August 15, 2014, 08:02:08 AM
 Hi!

 I try to write the UPNP Control Point software and I try to subscrive for events on DIR-655.
Subscription works fine, but subscription renewal fails with HTTP 412 code -  Precondition Failed, bad SID.
 My Control Point software work fine with any other UPNP devices in my network work, including D-Link DI-624.

The HTTP messages (captired by wireshark):

Subscription:

SUBSCRIBE /l3fw HTTP/1.0
Host: 192.168.0.1
CALLBACK: <http://192.168.0.100:7169/evt/43E47718-E7F6-D950-A503-71346C1D9944>
NT: upnp:event
TIMEOUT: Second-60

HTTP/1.1 200 OK
SID: uuid:5B68F900-2863-104D-8000-002401F35BC2
TIMEOUT: Second-60
SERVER: ipOS/7.6 UPnP/1.0 ipGENADevice/1.0


Renewal (50 seconds later):

SUBSCRIBE /l3fw HTTP/1.0
Host: 192.168.0.1
SID: uuid:5B68F900-2863-104D-8000-002401F35BC2
TIMEOUT: Second-60

HTTP/1.1 412 Precondition Failed, bad SID
SERVER: ipOS/7.6 UPnP/1.0 ipGENADevice/1.0


Also I tried to use HTTP/1.1 in subscription requests (and add "Connection:close" header), but there is no effect.

What I'm doing wrong?
Title: Re: Bugs in DIR-655 UPNP implementation
Post by: FurryNutz on August 15, 2014, 08:18:39 AM
Link>Welcome! (http://forums.dlink.com/index.php?topic=48135.0)

Title: Re: Bugs in DIR-655 UPNP implementation
Post by: tramvon on August 15, 2014, 08:32:01 AM
H/W: A4
F/W: 1.34WW / 1.37WW - problem still exist
Russia
Title: Re: Bugs in DIR-655 UPNP implementation
Post by: tramvon on August 15, 2014, 02:57:40 PM
I've download DIR-655_GPL_code_revb.rar but at this moment I can't find the part of source code for UPNP/GENA when I investigate that source codes to find answers for errors (my or d-link errors).
Title: Re: Bugs in DIR-655 UPNP implementation
Post by: tramvon on August 17, 2014, 08:11:55 AM
When I try to renew subscription immediately after subscribe, it works. Wait 750ms and renew - works. Wait 900ms and renew - fails with HTTP 412. It seems that there is a bugs in D-Link equipment (another D-Link router DI-624 works in the same manner). Intel device validator (https://software.intel.com/en-us/articles/intel-tools-for-upnp-technologies) validates DIR-655 and DI-624 eventing without errors, but, I think, there is no pause between subscribing and renewal steps. So, I think, UPNP eventing is not a reliable mechanism and it is better don't to use it.

Such device behavior compromises an upnp eventing mechanism idea.
Title: Re: Bugs in DIR-655 UPNP implementation
Post by: FurryNutz on August 19, 2014, 06:46:24 AM
I recommend that you phone contact your regional D-Link support office and ask for help and information regarding this. We find that phone contact has better immediate results over using email.
Let us know how it goes please.