ReneZ wrote:Hi, I get the following error when I try to control the Oppo. Any idea what the issue is and what I need to do to prevent it? Currently I can't use Leia to control the Oppo, although other control points are able to.
The problem with somewhat fuzzy standards like UPnP/AV is that that theory and practice actually differs a lot. All the UPnP AV Renderer programmers (like the one for the Oppo) implement the standard and see that nearly no Control application is working flawlessly with the device. So they "bend" the implementation so it's still nearly standard but compatibility with existing Control applications are better. The same is true for the Control application programmers. So in fact we have a lot of Control applications and Renderer devices which all behaves differently, and everyone tries to get his stuff working with most applications/devices as possible. Since most of them is tying to make money with their device or application, blaming the other side is not a practical solution even if the error clearly is in the application resp. firmware on the other side. (The user is paying for working stuff only, the user is not interested why it's not working and who takes the blame, the user wants it to have working. So in practice all of them insert adaptions to faulty behavior of the other side inside their own code.)
Back to your problem: "PrepareForConnection" is a function a UPnP Control application has to call to get a so called AVTransportID, an identifier you need for further function calls like "Play" and "Pause". When Leia is calling this function the OPPO returns the error you get. So the error is actually appearing inside the OPPO, and Leia is just showing it to you. The error text "Incompatible directions" is not a text coming from Leia (which can easily proved by searching this text inside the sources of Leia) but coming from the OPPO instead.
But why the OPPO does not like how Leia is calling "PrepareForConnection"? I must confess that I don't have a clue. "Incompatible directions" usually means the direction I pass as parameter to this function is wrong, but Leia simply passes "Output" as parameter which should be correct, at least the UPnP AV Specification told me so.
But what can we do about it?
1. If someone will lend me an OPPO for a few weeks I could try to find out what is going wrong and try to correct it. (And I would be willing to do so.) Since other Control applications seem to work fine, I can trace on the ethernet what other applications are doing differently than Leia, and so adapt Leia to the OPPO.
2. OPPO could try out Leia and tell me what I'm doing wrong. Or they decide that Leia is doing it correctly (but different than other applications which is possible since UPnP AV is quite a fuzzy standard) and will fix their firmware.
3. Inside media_renderer.c you'll find the code line "if ( err->code == 401 /* Invalid action */ /*|| err->code == 702*/ /* Rhythmbox */ )". You could change that to "if ( err->code == 401 || err->code == 702 )", compile Leia and see if this will make a change. At least it should since this change tells Leia to ignore this error. Background: As I found out some if not even most Control applications do not even call "PrepareForConnection" (which is clearly an error but device manufacturers have adapted their devices to this), so maybe OPPO is just not prepared that some Control application will actually call this function!? Well, this is just a guess but since this is quite easy to find out it's clearly worth a try.
Axel