attn naim devs: possible bug in Unity UPnP renderer implementation

Posted by: bubbleguuum on 28 August 2010

I'm troubleshooting the problem reported in this thread:

https://forums.naimaudio.com/ev...2903417/m/9842922437


The Unity UPnP renderer is told to play a WAV file. THe problem is that the TransportState returned by GetTransportInfo() sent by the Unity is corrupted. See below the logs of foo_upnp, my plugin for foobar2000:

  
105.670: FbMediaServer::ProcessHttpRequest(306)/5056: INFO: received LAN request: http://192.168.0.20:56923/cont...ile_id=0&convert=wav (User-Agent: WinampMPEG/2.8)
105.670: PLT_HttpHelper::ToLog(410)/5056: INFO: 
GET /content/e5ceaf769f325d7c1afb1437fd908478.wav?profile_id=0&convert=wav HTTP/1.1
Host: 192.168.0.20:56923
Icy-MetaData: 1
Connection: close
transferMode.dlna.org: Streaming
User-Agent: WinampMPEG/2.8
Accept: */*

105.858: upnp_server_conf::get_profile(720)/5056: INFO: using default profile (User-Agent:WinampMPEG/2.8)
opened 'file://E:\JEAN LUC\MUSIC wav\Stacey Kent\Breakfast On The Morning Tram\01-The Ice Hotel.wav' for streaming, profile: Default, WAV / 44100 Hz / 16 bits / 2 channels, replaygain: off, DSP chain: off
106.046: RendererController::InvokeAction(88)/5208: INFO: >>>> CALL GetTransportInfo
106.285: PLT_StateVariable::ValidateValue(219)/4068: WARNING: Invalid value of TRANSITII«`ð5 for state variable TransportState [allowed range { STOPPED,PLAYING,PAUSED_PLAYBACK,TRANSITIONING,NO_MEDIA_PRESENT }]
106.285: PLT_Argument::SetValue(130)/4068: SEVERE: NPT_CHECK failed, result=-20000 (NPT_ERROR_INVALID_PARAMETERS) [(ValidateValue(value))]
106.285: PLT_Argument::CreateArgument(107)/4068: WARNING: Invalid value of TRANSITII«`ð5 for argument CurrentTransportState of action GetTransportInfo
106.285: PLT_Action::SetArgumentValue(222)/4068: SEVERE: NPT_CHECK failed, result=-20000 (NPT_ERROR_INVALID_PARAMETERS) [(PLT_Argument::CreateArgument(m_ActionDesc, name, value, arg))]
106.286: PLT_Action::VerifyArguments(270)/4068: WARNING: Argument CurrentTransportState for action GetTransportInfo not found
106.286: RendererController::OnActionResponse(127)/4068: INFO: <<<< Uniti-6139: RET GetTransportInfo: res = -1
106.286: UPnPAVRendererController::OnGetTransportInfoResponse(564)/4984: INFO: failure: InstanceID=0, CurrentTransportStatus=OK, CurrentSpeed=1
106.287: UPnPAVRendererController::OnGetTransportInfoResponse(578)/4984: INFO: failure: InstanceID=0, CurrentTransportStatus=OK, CurrentSpeed=1
116.418: RendererController::InvokeAction(88)/4984: INFO: >>>> CALL Stop
117.319: PLT_HttpServerSocketTask::Write(348)/5056: WARNING: NPT_CHECK failed, result=-20401 (NPT_ERROR_CONNECTION_ABORTED) [(NPT_StreamToStreamCopy( *body_stream.AsPointer(), *output_stream.AsPointer(), 0, entity->GetContentLength(), 0, abort))]
117.347: RendererController::OnActionResponse(127)/4076: INFO: <<<< Uniti-6139: RET Stop: res = -20010
117.347: controller_window::set_track_info_string(1028)/4984: INFO: track info display: Stop Error: Action Failed (501)
117.347: RendererController::OnActionResponse(118)/4984: INFO: Stop Error: Action Failed (501)



Notice the line:

106.285: PLT_Argument::CreateArgument(107)/4068: WARNING: Invalid value of TRANSITII«`ð5 for argument CurrentTransportState of action GetTransportInfo


we should have TRANSITIONING but we receive part of the string as it is corrupted.

moreover later on, the Stop() action fails with error code 501 which let to think the Unity is not responding.
Posted on: 28 August 2010 by 0rangutan
Nice work bubbleguum.

While you are at it, any chance of identifying why the Uniti cannot send a suitable pause command to most UPNP servers?
The pause button on the Uniti remote works with Twonky and some others, but fails with Windows Media Player, EyeConnect, Majestic and Playback.

It may be fixed in firmware v3.0.0 but Naim aren't saying yet.
Posted on: 28 August 2010 by bubbleguuum
quote:
Originally posted by John Bleasdale:
Nice work bubbleguum.

While you are at it, any chance of identifying why the Uniti cannot send a suitable pause command to most UPNP servers?
The pause button on the Uniti remote works with Twonky and some others, but fails with Windows Media Player, EyeConnect, Majestic and Playback.

It may be fixed in firmware v3.0.0 but Naim aren't saying yet.


Pause stops a http audio stream. Most UPnP Servers will close the connection to the client (Unity) after a period of inactivy (ie the client reads no data), usually a few minutes. If when resuming playback the client do not reconnect to the server and seeks to the playing position (assuming the http server supports seeking), pausing indeed do not work.
I tkink Twonky has no timeout on an idle connection and that's why pausing works. I've added such an option very recently in foo_upnp to make pausing work.
Posted on: 28 August 2010 by David Dever
Why not contact Naim directly on Tuesday?

As this is a User Forum rather than a developer bb, you might find direct contact with the factory to be more responsive.

Also - any efforts spent on anything but the 3.XX.XX codebase may prove to be futile...!
Posted on: 28 August 2010 by pcstockton
Thanks for working on this.... for free.
Posted on: 29 August 2010 by Guido Fawkes
Good luck bubblegum - interesting project you've taken on; I hope Naim can support third party freeware developers like yourself.
Posted on: 29 August 2010 by JLD
quote:
Originally posted by ROTF:
Good luck bubblegum - interesting project you've taken on; I hope Naim can support third party freeware developers like yourself.


Yes that could be nice to have the uniti profile after the Linn DS in the UPnP preferences...

(File>Preferences>Tools>UPnP>Server>Streaming Profiles "select profil to edit"