LinHES Forums
http://forums.linhes.org/

HOWTO: firewire Power and Panel commands on all Set top box
http://forums.linhes.org/viewtopic.php?f=25&t=21057
Page 1 of 1

Author:  christ [ Sun May 09, 2010 7:13 pm ]
Post subject:  HOWTO: firewire Power and Panel commands on all Set top box

Hi folks,

Based on mihanson's successes on playing with the panel commands on his Motorola box, I was inspired to generalize and update my code (formerly sa3250cmd).

The code can be found at: http://code.google.com/p/stb-command/

It includes complete documentation and has implemented:
* Power - on/off/status
* Panel Passthrough commands (ie. simulates user pressing buttons on the set top box or remote).

Power commands should work on everything, though we know that some boxes are always on. mihanson discovered this with his Motorola QIP box which instead displays "press menu" when it has been too idle. But he had luck being able to clear the "press menu" screen by simulating the "menu" and "exit" keys.

Some set top boxes respond to key releases instead of key presses so I added a "-r" switch on the command line.

If the addition of the panel commands proves useful then I will look to implement the function commands. For reference the channel changers use the "tune_function" but there are others.

Let me know of your successes/failures so I can document these and where possible I will update the code.

Sadly, though I have written this, I have Scientific Atlanta boxes which do not respond to any of the panel passthrough commands except for channel change (which I am thankful for). So I have not been able to test these commands directly. Thus I rely on your input.

christ

Author:  steeve [ Sun Jul 25, 2010 8:51 pm ]
Post subject: 

Christ,
I finally got around to attempting to install this app, and I keep getting this error when I type "make":

Code:
Makefile:1: *** missing separator.  Stop.


I've been googling that error and have come up dry. Any ideas? Some hits from google suggest that a TAB should exist where a SPACE resides...?

-Thanks!!

-sTv

Author:  tjc [ Thu Jul 29, 2010 7:51 pm ]
Post subject: 

What does line 1 of the make file look like?

Author:  steeve [ Thu Jul 29, 2010 8:15 pm ]
Post subject: 

tjc wrote:
What does line 1 of the make file look like?


I tried copying and pasting the code, but failed miserably (using the File Manager in Webmin).

If I open the makefile in a text editor, it's all gobbledy-gook. IOW, it looks like a binary file, but my Mac laptop sees it as a text file. So does Webmin's file manager.

I downloaded another copy, same story.

An "A-Ha!" moment. I just downloaded a previous version (1.0). Its makefile line 1 looks like this:

Code:
TARGET=stb-command


Perhaps the makefile in v1.1 is corrupted?

Thanks for the response, tjc.

-sTv

Author:  christ [ Sat Jul 31, 2010 9:45 am ]
Post subject: 

Steeve,
Thanks for bringing this to my attention. It was indeed a corrupted Makefile. I've fixed the archive and re-uploaded.
C

Author:  steeve [ Sat Jul 31, 2010 1:08 pm ]
Post subject: 

christ wrote:
Steeve,
Thanks for bringing this to my attention. It was indeed a corrupted Makefile. I've fixed the archive and re-uploaded.
C


Thanks, christ. I downloaded the new version and it seems to have installed with no errors. However, when I try a command I get this:

Code:
segfault at 0 ip 0804ada2 sp bfe5dec0 error 6 in stb-command[8048000+5000]


libavc1394-dev and libraw1394-dev are not in the sync db.

Any ideas?

-sTv

Author:  christ [ Sun Aug 01, 2010 9:36 am ]
Post subject: 

steeve wrote:
Thanks, christ. I downloaded the new version and it seems to have installed with no errors. However, when I try a command I get this:

Code:
segfault at 0 ip 0804ada2 sp bfe5dec0 error 6 in stb-command[8048000+5000]

What user are you running this as and what user did you compile this as? Try it as root if you have not done so.

steeve wrote:
libavc1394-dev and libraw1394-dev are not in the sync db.

Where did you get them from?

Also can you show me the exact command you used (add the -v option) plus it's output? Also display the output of "plugreport".

I am thinking it is either a permission issue, library sync issue, or potentially an invalid node id. I note I am not doing enough error checking on invalid nodes which will cause a segfault.

Author:  steeve [ Sun Aug 01, 2010 10:45 am ]
Post subject: 

christ wrote:
steeve wrote:
Thanks, christ. I downloaded the new version and it seems to have installed with no errors. However, when I try a command I get this:

Code:
segfault at 0 ip 0804ada2 sp bfe5dec0 error 6 in stb-command[8048000+5000]

What user are you running this as and what user did you compile this as? Try it as root if you have not done so.


I compiled and executed as root.

christ wrote:
steeve wrote:
libavc1394-dev and libraw1394-dev are not in the sync db.

Where did you get them from?


Since I could not install them from the sync db, I did not attempt to find them. If they exist, they were installed with LinHes, but I haven't searched to see if they are there.

christ wrote:
Also can you show me the exact command you used (add the -v option) plus it's output? Also display the output of "plugreport".


Code:
[root@mythbackend rek]# stb-command -v -n node  power_status
  Sending Command:  0x01FFB27F
  Command Failed, No Response
Segmentation fault


Code:
[root@mythbackend rek]# plugreport
Host Adapter 0
==============

Node 0 GUID 0x0001560000000579
------------------------------
libiec61883 error: error reading oMPR
libiec61883 error: error reading iMPR

Node 1 GUID 0x0016b5fffeb59a92
------------------------------
oMPR n_plugs=1, data_rate=2, bcast_channel=63
oPCR[0] online=1, bcast_connection=0, n_p2p_connections=0
   channel=63, data_rate=1, overhead_id=0, payload=376
iMPR n_plugs=0, data_rate=2


christ wrote:
I am thinking it is either a permission issue, library sync issue, or potentially an invalid node id. I note I am not doing enough error checking on invalid nodes which will cause a segfault.


Thanks!!!

-sTv

Author:  christ [ Mon Aug 02, 2010 10:45 am ]
Post subject: 

steeve wrote:
Code:
[root@mythbackend rek]# stb-command -v -n node  power_status
  Sending Command:  0x01FFB27F
  Command Failed, No Response
Segmentation fault



Was your command actually:
Code:
stb-command -v -n 1 power_status


Only "1" will work based on plugreport. Looks like it is a Motorola STB of some form.

Author:  steeve [ Mon Aug 02, 2010 10:59 am ]
Post subject: 

christ wrote:
steeve wrote:
Code:
[root@mythbackend rek]# stb-command -v -n node  power_status
  Sending Command:  0x01FFB27F
  Command Failed, No Response
Segmentation fault



Was your command actually:
Code:
stb-command -v -n 1 power_status


Only "1" will work based on plugreport. Looks like it is a Motorola STB of some form.


:oops: Ahhhh, that must be where I made my mistake. There are no examples with the README, so I was trying my best to figure it out, and, well, FAIL.

When I say "examples", I mean specific examples, because my Linux illiteracy is still clearly evident.

I'll try that when I get home this evening.

-Thanks!!

-sTv

Author:  christ [ Mon Aug 02, 2010 6:51 pm ]
Post subject: 

no worries. At least you found a couple of bugs for me!

Usually when a parameter is specified as <node> or <command> it means substitute for an appropriate value.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/