[solved] ohNet Java: CpDeviceListUpnpDeviceType Problem
|
15-06-2014, 03:04 PM
(This post was last modified: 18-06-2014 08:18 PM by triplem.)
Post: #1
|
|||
|
|||
[solved] ohNet Java: CpDeviceListUpnpDeviceType Problem
Hello,
I try to use the ohNet bindings for Java, and try to get a List of MediaRenderer Devices: Code: CpDeviceListUpnpDeviceType list = new CpDeviceListUpnpDeviceType("upnp.org", "MediaRenderer", 1, this); The Callback-Method deviceAdded is not called at all. If I use Code: CpDeviceListUpnpDeviceType list = new CpDeviceListUpnpDeviceType("upnp.org", "MediaServer", 1, this); Then it is working fine. Now I tried to get the list of all Devices using the following code snippet: Code: CpDeviceListUpnpAll list = new CpDeviceListUpnpAll(this); Which works as well and prints one MediaRenderer (like expected): Code: deviceType: urn:schemas-upnp-org:device:MediaRenderer:1 Am I doing something wrong? |
|||
16-06-2014, 08:52 AM
Post: #2
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem
(15-06-2014 03:04 PM)triplem Wrote: I try to use the ohNet bindings for Java, and try to get a List of MediaRenderer Devices: That's the correct way to discover all MediaRenderer devices. The code works for me. Is it possible there was a typo (incorrect domain or device type string) in your original test? |
|||
16-06-2014, 09:24 PM
Post: #3
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem
(16-06-2014 08:52 AM)simonc Wrote: That's the correct way to discover all MediaRenderer devices. The code works for me. Is it possible there was a typo (incorrect domain or device type string) in your original test? Hm, I copied the above mentioned code, so no Typo. I still wonder why this device is shown with one call, but not the other one. Probably the device is not answering correctly to this query? |
|||
16-06-2014, 09:28 PM
Post: #4
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem
(16-06-2014 09:24 PM)triplem Wrote: Hm, I copied the above mentioned code, so no Typo. I still wonder why this device is shown with one call, but not the other one. Probably the device is not answering correctly to this query? That sounds quite likely. I got responses from all renderers on my network when I tried. If you've found a device which doesn't respond correctly to searches by device type, you could try searching by service type instead: Code: CpDeviceListUpnpServiceType list = new CpDeviceListUpnpServiceType("upnp.org", "AVTransport", 1, this); |
|||
16-06-2014, 09:42 PM
Post: #5
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem
Did this using RendererControl. Works like a charm. Can you possibly point me what to adjust on the renderer to answer correctly? Looks like it is a device of correct type.
|
|||
17-06-2014, 07:53 AM
Post: #6
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem
(16-06-2014 09:42 PM)triplem Wrote: Did this using RendererControl. Works like a charm. Can you possibly point me what to adjust on the renderer to answer correctly? Looks like it is a device of correct type. If the renderer uses ohNet, can you post the code you use to create the DvDevice and set its attributes please? If you didn't write the code for the renderer, I suspect it's just buggy and you won't be able to get it to respond to device type MSEARCHes. |
|||
17-06-2014, 03:27 PM
(This post was last modified: 17-06-2014 03:27 PM by triplem.)
Post: #7
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem
Sure,
I am developing currently together with Pete on the MediaPlayer for the Raspi. I guess the wanted code is: Code: String iDeviceName = "device-" + friendly_name + "-" + NetworkUtils.getHostName() + "-MediaRenderer"; Thanks for your support. |
|||
17-06-2014, 04:09 PM
Post: #8
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem
The domain you're using looks wrong. Can you try
Code: iDevice.setAttribute("Upnp.Domain", "upnp.org"); instead please? |
|||
18-06-2014, 08:17 PM
Post: #9
|
|||
|
|||
RE: ohNet Java: CpDeviceListUpnpDeviceType Problem | |||
« Next Oldest | Next Newest »
|