FAQ  •  Register  •  Login

User-Agent headers help

<<

mightymouse2045

Streaming enthusiast

Posts: 45

Joined: Sun Jan 15, 2012 11:16 am

Post Tue Dec 17, 2013 9:14 am

User-Agent headers help

Hi,

Can someone help me with a search for the following user-agent from Skifta? I've tried multiple searches and none work - it just keeps being detected as generic device.

These are the logs - I have removed the device in the console, and then reconnected so this is a fresh connection:

  Code:
2013-12-17 17:09:13,568 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target upnp:rootdevice from address /10.5.0.22:51461s
2013-12-17 17:09:13,568 DEBUG [DiscoverySearchResponder] Sending 1 M-SEARCH response message(s) to /10.5.0.22:51461
2013-12-17 17:09:13,690 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target upnp:rootdevice from address /10.5.0.22:51461s
2013-12-17 17:09:13,690 DEBUG [DiscoverySearchResponder] Sending 1 M-SEARCH response message(s) to /10.5.0.22:51461
2013-12-17 17:09:13,853 DEBUG [ServiioHttpService] Incoming request from /10.5.0.22:37242: GET /deviceDescription/a23ffba0-b845-325f-a053-7d7326efc856 HTTP/1.1, headers = [Host: 10.5.0.3:8895,Connection: Keep-Alive]]
2013-12-17 17:09:13,853 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.22
2013-12-17 17:09:13,854 DEBUG [DeviceDescriptionRequestHandler] DeviceDescription request received for device a23ffba0-b845-325f-a053-7d7326efc856 from 10.5.0.22 (headers = [Host: 10.5.0.3:8895,Connection: Keep-Alive])
2013-12-17 17:09:13,854 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.22
2013-12-17 17:09:13,855 INFO  [RendererManager] Stored a new renderer: uuid='92d41b26-d327-4d27-aacb-8a030457c85d', name = 'Unrecognized device', ipAddress='10.5.0.22', profile = '1'
2013-12-17 17:09:13,855 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.22
2013-12-17 17:09:13,917 DEBUG [ServiioHttpService] Incoming request from /10.5.0.22:42496: GET /serviceDescription/ConnectionManager HTTP/1.1, headers = [User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.3; GT-N7100 Build/JSS15J),Host: 10.5.0.3:8895,Connection: Keep-Alive,Accept-Encoding: gzip]]
2013-12-17 17:09:13,918 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.22
2013-12-17 17:09:13,947 DEBUG [ServiioHttpService] Incoming request from /10.5.0.22:42496: GET /serviceDescription/ContentDirectory HTTP/1.1, headers = [User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.3; GT-N7100 Build/JSS15J),Host: 10.5.0.3:8895,Connection: Keep-Alive,Accept-Encoding: gzip]]
2013-12-17 17:09:13,947 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.22
2013-12-17 17:09:14,025 DEBUG [ServiioHttpService] Incoming request from /10.5.0.22:42496: GET /serviceDescription/X_MS_MediaReceiverRegistrar HTTP/1.1, headers = [User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.3; GT-N7100 Build/JSS15J),Host: 10.5.0.3:8895,Connection: Keep-Alive,Accept-Encoding: gzip]]
2013-12-17 17:09:14,025 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.22


This is a snippet from my profile for this device:

  Code:
      
   <Profile id="Note II" name="Samsung GT-N7100" extendsProfileId="1">
        <ContentDirectoryMessageBuilder>org.serviio.upnp.service.contentdirectory.SamsungDLNAMessageBuilder</ContentDirectoryMessageBuilder>
        <ResourceTransportProtocolHandler>org.serviio.upnp.protocol.http.transport.SamsungWiseLinkProtocolHandler</ResourceTransportProtocolHandler>
      <Detection>
         <HttpHeaders>
            <User-Agent>.*GT-N7100.*</User-Agent>
         </HttpHeaders>
      </Detection>


Can anyone help me out with this?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 17, 2013 1:16 pm

Re: User-Agent headers help

It only matches the user agent on the /deviceDescription request, which (looking at the logs) does not provide any user agent
<<

mightymouse2045

Streaming enthusiast

Posts: 45

Joined: Sun Jan 15, 2012 11:16 am

Post Tue Dec 17, 2013 3:21 pm

Re: User-Agent headers help

zip wrote:It only matches the user agent on the /deviceDescription request, which (looking at the logs) does not provide any user agent



I thought Skifta was well supported by Serviio?

This is the first request: Incoming request from /10.5.0.22:37242: GET /deviceDescription/a23ffba0-b845-325f-a053-7d7326efc856 HTTP/1.1, headers = [Host: 10.5.0.3:8895,Connection: Keep-Alive]]

So yeah as you say it doesn't include it in there.

What about with UPnPSearch - a combination of that and HttpHeaders - would that make any difference? Because after that first /devicedescription request it does provide the full User-Agent headers ie:

[ServiioHttpService] Incoming request from /10.5.0.22:42496: GET /serviceDescription/ConnectionManager HTTP/1.1, headers = [User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.3; GT-N7100 Build/JSS15J),Host: 10.5.0.3:8895,Connection: Keep-Alive,Accept-Encoding: gzip]]
<<

mightymouse2045

Streaming enthusiast

Posts: 45

Joined: Sun Jan 15, 2012 11:16 am

Post Tue Dec 17, 2013 4:05 pm

Re: User-Agent headers help

mightymouse2045 wrote:
zip wrote:It only matches the user agent on the /deviceDescription request, which (looking at the logs) does not provide any user agent



I thought Skifta was well supported by Serviio?

This is the first request: Incoming request from /10.5.0.22:37242: GET /deviceDescription/a23ffba0-b845-325f-a053-7d7326efc856 HTTP/1.1, headers = [Host: 10.5.0.3:8895,Connection: Keep-Alive]]

So yeah as you say it doesn't include it in there.

What about with UPnPSearch - a combination of that and HttpHeaders - would that make any difference? Because after that first /devicedescription request it does provide the full User-Agent headers ie:

[ServiioHttpService] Incoming request from /10.5.0.22:42496: GET /serviceDescription/ConnectionManager HTTP/1.1, headers = [User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.3; GT-N7100 Build/JSS15J),Host: 10.5.0.3:8895,Connection: Keep-Alive,Accept-Encoding: gzip]]


I just tried out BubbleUPnP on my tablet with a fresh connection:

  Code:
2013-12-17 23:55:16,890 DEBUG [ServiioHttpService] Incoming request from /10.5.0.25:45677: POST /serviceControl HTTP/1.1, headers = [Content-type: text/xml;charset="utf-8",Soapaction: "urn:schemas-upnp-org:service:ConnectionManager:1#GetProtocolInfo",Content-Length: 288,Host: 10.5.0.3:8895,Connection: Keep-Alive,User-Agent: Android/4.0.4 UPnP/1.0 BubbleUPnP/1.7.6.1]]
2013-12-17 23:55:16,890 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.25
2013-12-17 23:55:16,891 DEBUG [ServiceControlRequestHandler] ServiceControl request received for action '"urn:schemas-upnp-org:service:ConnectionManager:1#GetProtocolInfo"' from 10.5.0.25
2013-12-17 23:55:16,891 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.25
2013-12-17 23:55:16,903 DEBUG [ServiioHttpService] Incoming request from /10.5.0.25:37277: GET /icon/largePNG HTTP/1.1, headers = [Host: 10.5.0.3:8895,Connection: Keep-Alive,User-Agent: BubbleUPnP UPnP/1.1,Accept-Encoding: gzip,deflate]]
2013-12-17 23:55:16,903 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.25
tail: ‘../log/serviio.log’ has become inaccessible: No such file or directory
tail: ‘../log/serviio.log’ has appeared;  following end of new file
2013-12-17 23:58:32,856 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:schemas-upnp-org:service:AVTransport:1 from address /10.5.0.25:41530s
2013-12-17 23:58:32,857 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:av-openhome-org:service:Product:1 from address /10.5.0.25:41530s
2013-12-17 23:58:32,873 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:schemas-upnp-org:service:ContentDirectory:1 from address /10.5.0.25:41530s
2013-12-17 23:58:32,874 DEBUG [DiscoverySearchResponder] Sending 1 M-SEARCH response message(s) to /10.5.0.25:41530
2013-12-17 23:58:33,357 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:schemas-upnp-org:service:AVTransport:1 from address /10.5.0.25:41530s
2013-12-17 23:58:33,358 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:av-openhome-org:service:Product:1 from address /10.5.0.25:41530s
2013-12-17 23:58:33,390 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:schemas-upnp-org:service:ContentDirectory:1 from address /10.5.0.25:41530s
2013-12-17 23:58:33,391 DEBUG [DiscoverySearchResponder] Sending 1 M-SEARCH response message(s) to /10.5.0.25:41530
2013-12-17 23:58:33,883 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:schemas-upnp-org:service:AVTransport:1 from address /10.5.0.25:41530s
2013-12-17 23:58:33,887 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:av-openhome-org:service:Product:1 from address /10.5.0.25:41530s
2013-12-17 23:58:33,892 DEBUG [DiscoverySSDPMessageListener] Received a valid M-SEARCH message for search target urn:schemas-upnp-org:service:ContentDirectory:1 from address /10.5.0.25:41530s
2013-12-17 23:58:33,892 DEBUG [DiscoverySearchResponder] Sending 1 M-SEARCH response message(s) to /10.5.0.25:41530
2013-12-17 23:58:34,060 DEBUG [ServiioHttpService] Incoming request from /10.5.0.25:47532: GET /deviceDescription/a23ffba0-b845-325f-a053-7d7326efc856 HTTP/1.1, headers = [Host: 10.5.0.3:8895,Connection: Keep-Alive,User-Agent: Android/4.0.4 UPnP/1.0 BubbleUPnP/1.7.6.1]]
2013-12-17 23:58:34,060 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.25
2013-12-17 23:58:34,061 DEBUG [DeviceDescriptionRequestHandler] DeviceDescription request received for device a23ffba0-b845-325f-a053-7d7326efc856 from 10.5.0.25 (headers = [Host: 10.5.0.3:8895,Connection: Keep-Alive,User-Agent: Android/4.0.4 UPnP/1.0 BubbleUPnP/1.7.6.1])
2013-12-17 23:58:34,062 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.25
2013-12-17 23:58:34,122 INFO  [RendererManager] Stored a new renderer: uuid='ab0bb911-4457-4abf-8080-76fd86dbbf4a', name = 'Samsung Galaxy Tab 10.1', ipAddress='10.5.0.25', profile = 'MyTablet'
2013-12-17 23:58:34,122 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 10.5.0.25


So looks like it's not Serviio's fault, it's Skifta not following DLNA standards or something along those lines.

It does actually work on Skifta as well but ONLY if Skifta is acting as a media server as well - which i don't want. So I think I'll just stick with BubbleUPnP as my default for all android devices.
<<

mightymouse2045

Streaming enthusiast

Posts: 45

Joined: Sun Jan 15, 2012 11:16 am

Post Tue Dec 17, 2013 4:28 pm

Re: User-Agent headers help

zip wrote:It only matches the user agent on the /deviceDescription request, which (looking at the logs) does not provide any user agent


Ah the issue though is that searching for BubbleUPnP with no other matching will apply the same profile for all my android devices, which I don't want.

The thing with Skifta is it combines the manufacturer and model into the User-Agent headers which allows me to distinguish the profiles.

The User-Agent for BubbleUPnP doesn't include that - it just includes generic information regardless of the device it's on...

The renderer has a firendly name set as well but I can't see it being sent at all in the logfiles.. Is there a anyway to search for that on the local renderer, or as you said the profile is set from whatever the devicedescription request headers show?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 17, 2013 5:35 pm

Re: User-Agent headers help

You have to set the controller's IP address to the renderer's profile, so I don't think the friendly name coming from the renderer's search response will help (it's set the right profile to the renderer's IP, not the controller's one)
<<

mightymouse2045

Streaming enthusiast

Posts: 45

Joined: Sun Jan 15, 2012 11:16 am

Post Tue Dec 17, 2013 5:40 pm

Re: User-Agent headers help

zip wrote:You have to set the controller's IP address to the renderer's profile, so I don't think the friendly name coming from the renderer's search response will help (it's set the right profile to the renderer's IP, not the controller's one)


Ok I'll just look at the two headers for the android devices and see what i can use to distinguish them - mayne the android version will work instead

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 51 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.