Mailing List Archive

Yamaha DLNA compatibility
Hello Developers,

I’m trying to debug an interesting problem with a new Yamaha CRX-N470D hifi system. It has DLNA capability (specifically bought to interact with my mythtv mediacenter), and is able to browse my music collection on the mythbox. However, it only seems to play the first 2’36” of whichever song I select, before moving on to the next song in the playlist. My Android client plays fine.

From the mythbackend.log (link below), I suspect this is something to do with how the hifi is requesting the music files. Firstly, there is no Keep-Alive header in the request (which there is with the Android renderer), and secondly, the request appears to have a range. Is this expected? Also, it looks like the HTTP connection is timing out — as though the hifi stops listening?

Annoyingly, the hifi works fine with other DLNA servers such as UMS. I’d like to get a handle on what’s going on with myth, and possibly contribute to a patch. Can anyone assist me in understanding what’s going on?

Thanks,

Chris

Mythbackend.log: https://lancaster.box.com/s/e1t249tol8rkpk4cqqnyc2vg9ogkb5w8

Server config (with hostname and address for logfile purposes):
Hostname: cobalt
Address: 192.168.1.110
OS: LinHES R8.4
MythTV version: 0.28-fixes from LinHES repo. (updated this morning)
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Yamaha DLNA compatibility [ In reply to ]
Hi,

I did some DLNA work some time ago, I may be able to help.

Can you provide a Ethernet capture of the interaction between the 2 devices?


Rune
On 04/02/17 20:15, Chris Jewell wrote:
> Hello Developers,
>
> I’m trying to debug an interesting problem with a new Yamaha CRX-N470D hifi system. It has DLNA capability (specifically bought to interact with my mythtv mediacenter), and is able to browse my music collection on the mythbox. However, it only seems to play the first 2’36” of whichever song I select, before moving on to the next song in the playlist. My Android client plays fine.
>
> From the mythbackend.log (link below), I suspect this is something to do with how the hifi is requesting the music files. Firstly, there is no Keep-Alive header in the request (which there is with the Android renderer), and secondly, the request appears to have a range. Is this expected? Also, it looks like the HTTP connection is timing out — as though the hifi stops listening?
>
> Annoyingly, the hifi works fine with other DLNA servers such as UMS. I’d like to get a handle on what’s going on with myth, and possibly contribute to a patch. Can anyone assist me in understanding what’s going on?
>
> Thanks,
>
> Chris
> —
> Mythbackend.log: https://lancaster.box.com/s/e1t249tol8rkpk4cqqnyc2vg9ogkb5w8
>
> Server config (with hostname and address for logfile purposes):
> Hostname: cobalt
> Address: 192.168.1.110
> OS: LinHES R8.4
> MythTV version: 0.28-fixes from LinHES repo. (updated this morning)
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Yamaha DLNA compatibility [ In reply to ]
Hi Rune,

Sorry for the delay — it’s taken a while to get a good packet capture with associated mythbackend log. Thanks for your offer of help! I’m not a packet capture specialist by any means, but it looks as though I’ve a slightly flakey wifi, possibly on the MythTV server itself.

Capture: https://lancaster.box.com/s/6tcmyop665rp8uwwpm0ahd1gguxvlnib
Log: https://lancaster.box.com/s/igdoz8uf5uz5scuwfs7zj1u0chfem2i8 <https://lancaster.box.com/s/igdoz8uf5uz5scuwfs7zj1u0chfem2i8>

Hifi: 192.168.1.103
MythTV server: 192.168.1.110

You can see that track id 2728 plays fine. Track 2729 is then requested twice, due to a RST packet from the MythTV server. Playback of 2729 is cut short by a TCP RST packet sent from mythbox to hifi, and playback moves on to 2730.

So, flakey wifi on the MythTV server, or intolerance of a flakey wifi by mythbackend?

Cheers,

Chris





> On 4/02/2017, at 11:22 PM, Rune Petersen <rune@megahurts.dk> wrote:
>
> Hi,
>
> I did some DLNA work some time ago, I may be able to help.
>
> Can you provide a Ethernet capture of the interaction between the 2 devices?
>
>
> Rune
> On 04/02/17 20:15, Chris Jewell wrote:
>> Hello Developers,
>>
>> I’m trying to debug an interesting problem with a new Yamaha CRX-N470D hifi system. It has DLNA capability (specifically bought to interact with my mythtv mediacenter), and is able to browse my music collection on the mythbox. However, it only seems to play the first 2’36” of whichever song I select, before moving on to the next song in the playlist. My Android client plays fine.
>>
>> From the mythbackend.log (link below), I suspect this is something to do with how the hifi is requesting the music files. Firstly, there is no Keep-Alive header in the request (which there is with the Android renderer), and secondly, the request appears to have a range. Is this expected? Also, it looks like the HTTP connection is timing out — as though the hifi stops listening?
>>
>> Annoyingly, the hifi works fine with other DLNA servers such as UMS. I’d like to get a handle on what’s going on with myth, and possibly contribute to a patch. Can anyone assist me in understanding what’s going on?
>>
>> Thanks,
>>
>> Chris
>> —
>> Mythbackend.log: https://lancaster.box.com/s/e1t249tol8rkpk4cqqnyc2vg9ogkb5w8
>>
>> Server config (with hostname and address for logfile purposes):
>> Hostname: cobalt
>> Address: 192.168.1.110
>> OS: LinHES R8.4
>> MythTV version: 0.28-fixes from LinHES repo. (updated this morning)
>> _______________________________________________
>> mythtv-dev mailing list
>> mythtv-dev@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Re: Yamaha DLNA compatibility [ In reply to ]
Hi Chris,

no problem, it just gave me more time to regret my offer to help =)


The first RST:
###############
This one isn't fatal so can safely be ignored.
The HTTP server closing the connection after it sent the whole file:
2017-02-07T11:36:24.159597+00:00 mythbackend[2202]: I HttpServer89
httpserver.cpp:685 (run) HttpWorker(89): Connection 89 closed. 1 requests were
handled

this isn't to nice considering the server set "Connection: Keep-Alive" in the
response, but it isn't really a problem.

The reason for the RST is that for some unknown reason the server doesn't send a
FIN packet when closing the connection, which is quite unusual.
And since the client (Yamaha) doesn't get the FIN packet it thinks that the
connection is still open. so when the time comes to play the next file it
requests the next file over the same connection, and the server responds with RST.



The second RST:
################
The server times out waiting to be able to write to the socket.
2017-02-07T11:39:11.899382+00:00 mythbackend[2202]: W HttpServer63
httpserver.cpp:667 (run) HttpWorker(63): Timed out waiting to write bytes to the
socket, waited 5 seconds

Again the reason for the RST is that for some unknown reason the server doesn't
send a FIN packet when closing the connection, which is quite unusual.

There isn't really any good reason the timeout should be this short for static
content. Increasing the timeout to 20 or 30 secs should fix your issue.

Better WiFi on your end might also fix it, but then again limiting the bandwidth
used when streaming would likely also fix it for you =)


Rune

On 07/02/17 13:12, Chris Jewell wrote:
> Hi Rune,
>
> Sorry for the delay ? it?s taken a while to get a good packet capture with
> associated mythbackend log. Thanks for your offer of help! I?m not a packet
> capture specialist by any means, but it looks as though I?ve a slightly flakey
> wifi, possibly on the MythTV server itself.
>
> Capture: https://lancaster.box.com/s/6tcmyop665rp8uwwpm0ahd1gguxvlnib
> Log: https://lancaster.box.com/s/igdoz8uf5uz5scuwfs7zj1u0chfem2i8
>
> Hifi: 192.168.1.103
> MythTV server: 192.168.1.110
>
> You can see that track id 2728 plays fine. Track 2729 is then requested twice,
> due to a RST packet from the MythTV server. Playback of 2729 is cut short by a
> TCP RST packet sent from mythbox to hifi, and playback moves on to 2730.
>
> So, flakey wifi on the MythTV server, or intolerance of a flakey wifi by
> mythbackend?
>
> Cheers,
>
> Chris
>
>
>
>
>
>> On 4/02/2017, at 11:22 PM, Rune Petersen <rune@megahurts.dk
>> <mailto:rune@megahurts.dk>> wrote:
>>
>> Hi,
>>
>> I did some DLNA work some time ago, I may be able to help.
>>
>> Can you provide a Ethernet capture of the interaction between the 2 devices?
>>
>>
>> Rune
>> On 04/02/17 20:15, Chris Jewell wrote:
>>> Hello Developers,
>>>
>>> I?m trying to debug an interesting problem with a new Yamaha CRX-N470D hifi
>>> system. It has DLNA capability (specifically bought to interact with my
>>> mythtv mediacenter), and is able to browse my music collection on the
>>> mythbox. However, it only seems to play the first 2?36? of whichever song I
>>> select, before moving on to the next song in the playlist. My Android client
>>> plays fine.
>>>
>>> From the mythbackend.log (link below), I suspect this is something to do with
>>> how the hifi is requesting the music files. Firstly, there is no Keep-Alive
>>> header in the request (which there is with the Android renderer), and
>>> secondly, the request appears to have a range. Is this expected? Also, it
>>> looks like the HTTP connection is timing out ? as though the hifi stops
>>> listening?
>>>
>>> Annoyingly, the hifi works fine with other DLNA servers such as UMS. I?d
>>> like to get a handle on what?s going on with myth, and possibly contribute to
>>> a patch. Can anyone assist me in understanding what?s going on?
>>>
>>> Thanks,
>>>
>>> Chris
>>> ?
>>> Mythbackend.log: https://lancaster.box.com/s/e1t249tol8rkpk4cqqnyc2vg9ogkb5w8
>>>
>>> Server config (with hostname and address for logfile purposes):
>>> Hostname: cobalt
>>> Address: 192.168.1.110
>>> OS: LinHES R8.4
>>> MythTV version: 0.28-fixes from LinHES repo. (updated this morning)
>>> _______________________________________________
>>> mythtv-dev mailing list
>>> mythtv-dev@mythtv.org <mailto:mythtv-dev@mythtv.org>
>>> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
>>> http://wiki.mythtv.org/Mailing_List_etiquette
>>> MythTV Forums: https://forum.mythtv.org
>>>
>>
>> _______________________________________________
>> mythtv-dev mailing list
>> mythtv-dev@mythtv.org <mailto:mythtv-dev@mythtv.org>
>> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>
>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org