[mythtv] Help with mythprotocol

Dwight Hubbard dhubbard at dwightandamy.com
Tue Nov 15 18:44:51 EST 2005


I've been playing with the python script that was put forward a while back 
to try and implement a simple front end in python.

I had to do some signifcant tweeking to get things to work due to changes 
in the protocol version.  I have some basic stuff working but of course 
I am going to have to re-tweak everything for the new protocol version 
if/when I choose to go to SVN or there is a new version released.

I was curious why the protocol doesn't use an extensible and easily 
parseable format for passing the data between the client and the server?  

For example, if I request the program info from the backend.  I will 
receive a response that requires me to know what fields the program info 
response has, what order they are in, and how many fields there are 
because all the programs information are returned back to back.  If the 
information was returned in a format such  as XML, I could ignore new 
fields that I do not understand and continue to work even if additional 
fields where added in a new backend version. 

Am I missing something obvious?

 On Wed, 9 Nov 2005, Isaac Richards wrote:

> On Wednesday 09 November 2005 08:15 pm, Neil wrote:
> > Having a rather frustrating time with the myth backend protocol at the
> > moment!
> >
> > Been looking at these docs:
> > http://www.mythtv.info/moin.cgi/MythProtocol_5f14
> >
> > Have coded a socket to the appropriate port on the backend server, and
> > send the first command:
> >
> > 22      MYTH_PROTO_VERSION 19
> >
> > to which the server responds:
> >
> > 13      REJECT[]:[]19
> >
> > I would expect to see an ACCEPT message returned (I am, after all,
> > specifying the version that it is expecting!) I realise that the length
> > of the command "MYTH_PROTO_VERSION 19" is actually only 21 bytes, but if
> > I send "21      MYTH_PROTO_VERSION 19", the server doesn't respond at
> > all.
> >
> > Any help massively appreciated!
> 
> Well, the length should be 21 - make sure you're not terminating that string 
> with anything.  Be helpful to see your code, if that's not it.
> 
> Isaac
> 



More information about the mythtv-dev mailing list