0xfab-ri / upnpx

Automatically exported from code.google.com/p/upnpx
0 stars 0 forks source link

UPNP device is not updating #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Switch on the demo application. Demo app will show all the upnp devices
2. Now switch OFF any upnp device, demo app's upnp list is taking time to 
remove that upnp device which is just switched off.
3. Now again switch On that device, demo app will not show that upnp device 
again in that list.

What is the expected output? What do you see instead?
Demo app should immediately update the list which the upnp device is switched 
ON & OFF.

What version of the product are you using? On what operating system?
upnpx-1.2.2.tar.gz   upnpx Release 1.2.2   UPnP upnpx

Please provide any additional information below.
Testing the upnpx demo

Original issue reported on code.google.com by kapilat...@gmail.com on 5 Sep 2011 at 9:40

GoogleCodeExporter commented 8 years ago
Could not reproduce this issue.
Some UPnP devices don't sent the right notifications (BYE) at shut down (so 
they are only removed after atimeout). 
What UPnP device is used here ?

Original comment by bruno.ke...@gmail.com on 5 Sep 2011 at 1:30

GoogleCodeExporter commented 8 years ago
Is it possible to make pcap file of the traffic between the device and the upnp 
stack while the device is switched off?

Original comment by bruno.ke...@gmail.com on 5 Sep 2011 at 4:02

GoogleCodeExporter commented 8 years ago
Thanks for your reply
Could you please tell me the steps to make pcap file so that i can send you.
We are using a camera which is upnp enabled & connected on a wifi network.

In our testing we have seen the following things:
1. When we switch OFF the camera, the device list in demo app is updating after 
1:25 to 1:50 minutes & removing the camera name from the list.
2. When we switch ON the camera, the device list in demo app is updating after 
1.2 to 2.2 minutes & showing the camera name in the list.

We have another query, in our application we are searching the upnp devices for 
10 to 15 seconds only & don't want to run the upnp discovery continuously in 
the background. For this we are using the following code, Could you please 
guide us, are we going in the right direction or doing some mistake.

To start the upnp discovery we are using the following code:

    UPnPDB* db = [[UPnPManager GetInstance] DB];    
    mDevices = [db rootDevices]; //--BasicUPnPDevice
    [mDevices retain];    
    [db addObserver:(UPnPDBObserver*)self];    
    //--Optional; set User Agent
    [[[UPnPManager GetInstance] SSDP] setUserAgentProduct:@"upnpxdemo/1.0" andOS:@"OSX"];    
    //--Search for UPnP Devices 
    [[[UPnPManager GetInstance] SSDP] searchSSDP];

To stop the upnp discovery we are using the following code:

    [[[UPnPManager GetInstance] SSDP] stopSSDP];

Original comment by kapilat...@gmail.com on 7 Sep 2011 at 7:30

GoogleCodeExporter commented 8 years ago
Hi,

The way you use ssdp is just fine, the update methods will be called when 
devices are removed or added from  the network.

You can make the pcap file with Wireshark (http://www.wireshark.org/).

It looks like:
- the camera dont send a "NOTIFY with ssdp:byebye" when swithed off, so the 
stack will only remove it after a timeout.
- the camera don't send a "NOTIFY with ssdp:alive" at startup 

See UPnP specifications, "1.2 Advertisement"

But the wireshark pcap will make things clear, try to capture while doing the 
sequence : switch camera on, start upnpx demo, stop camera, wait until it 
disappears, start camera again and wait until it appears

Send the pcap to my email if you want, I update the ticket when the issue is 
solved/found.

Thanks 

Bruno

Original comment by bruno.ke...@gmail.com on 7 Sep 2011 at 1:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Could reproduce on device, not on emulator.

Original comment by bruno.ke...@gmail.com on 13 Sep 2011 at 9:17

GoogleCodeExporter commented 8 years ago
Thanks to report this.

Original comment by bruno.ke...@gmail.com on 13 Sep 2011 at 10:56

GoogleCodeExporter commented 8 years ago
Hi, 

We have tested this issue on the new release (Release 1.2.3), it is still there.

What steps will reproduce the problem?
1. Switch on the demo application. Demo app will show all the upnp devices
2. Now switch OFF any upnp device, demo app's upnp list is taking time to 
remove that upnp device which is just switched off.
3. Now again switch On that device. If we test this on iphone simulator it will 
show that device again in the upnp device list after some time(1 to 2 minutes), 
but if we test this on iphone device, demo app will not show that upnp device 
again in the list.
4. If we force quit the demo app & start all over again immediately after 
switching ON the upnp device, that device will get populated in the upnp device 
list(both on simulator & iPhone device).

What is the expected output? What do you see instead?
Demo app should immediately update the list which the upnp device is switched 
ON & OFF both on iphone simulator & device.

What version of the product are you using? On what operating system?
upnpx-1.2.3.tar.gz   upnpx Release 1.2.3   UPnP upnpx

Please provide any additional information below.
Testing the upnpx demo

Original comment by kapilat...@gmail.com on 22 Sep 2011 at 11:49

GoogleCodeExporter commented 8 years ago
Do i need to post a fresh issue for this?

Original comment by kapilat...@gmail.com on 23 Sep 2011 at 4:24