Sunday, July 15, 2007

A victory

In following up on the compile error mentioned earlier, I found comments about trying to compile MythTV after installing a MythTV package. So, I shut down MythTV and moved the existing binaries and libraries out of the /usr/bin and /usr/lib directories, and then I recompiled (after making sure the configuration files were coded to /usr instead of /usr/local, since --prefix=/usr didn't seem to work as advertised). And the compile completed with zero errors.

After running make install on the newly-compiled binaries, I rebooted, and to my surprise and delight, MythTV came right up. Better still, all of the picoLCD's keys were behaving exactly as I had programmed them. Success!

So, just about all that's left is remote control. IR will be a long time coming, if I ever get it at all, because of the lack of an appropriate driver. I did install the MythWiFi plug-in for a web-based remote, which is probably my best hope for full remote control. But, when I click any button on the web remote, I get:

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:6546 in /var/www/remote/backend.php on line 115
ERROR: Connection refused (111)

The answer to this turned out to be a big "duh" moment -- Network Control must be enabled. Unfortunately, since I coded the LCD module to send "Key_Space" on the enter keypress instead of "Key_Enter" (because I was unsure of using "Key_Enter" vs. "Key_Return", I thought I was playing it safe), I had no way to navigate the config menus to enable that ("Space" doesn't activate the "Next" button). However, all was not lost -- since MythTV stores its configuration in a MySQL database, all I had to do was run the following query in MySQL:

update settings set data = '1' where value = 'NetworkControlEnabled';

A quick reboot (since exiting and restarting MythTV is also a little problematic with the keypad), and as if by magic, I can now control MythTV with a web browser.

2 comments:

Unknown said...

Hello,
I also have the picoLCD display but I can't get the keypad to work.

I am using lcdProc patched with picoLCD support but it doesn't seem to be working.

I start lcdproc in the forground with maximum verbosity and I can see that when I press a key something is going on, but I can't get it to perform even the most significant action.

Since lcdproc is patched with keypad support I assume I have the configuration files wrong.

Can you please help me figure this out?

I don't know how I can contact you so assume you can see my gmail address.

Thanks in advance,
Bogdan

Yakko Warner said...

Sorry it took me so long to get back to this; since I got it up and running, I admit it has taken a back seat to a lot of other priorities.

Actually Blogger didn't give me your address when it gave me the comment notification, so hopefully you'll see this reply. Besides, with any luck, keeping the conversation in the public will help others with the same problem, or let others offer their advice.

I don't want to make any assumptions, so let me start off by making sure: are you trying to get this to work with MythTV?

The first thing I'll suggest is making sure you look over my previous few posts. Out of the box, Myth and lcdproc don't speak the same language -- Myth expects keypresses of "ABCDEF" (single letters) and lcdproc sends "Plus Minus F1 F2..." (actual names). I went through a few code changes to Myth to get it to recognize names from LCD controls, but another (possibly easier) option could be to alter lcdproc to send single letter key names instead.