Sign up here and you can log into the forum!

cliremote - text-based remote with feedback

Here is the place to inquire about app.bins--Only currently available apps for sigma 8655 based wdtv's belong in this forum. requests go in 'Application Questions'

cliremote - text-based remote with feedback   

Postby mad_ady » Tue Aug 14, 2012 3:42 am

cliremote v0.1 by mad_ady
==============================

Requires WDLXTV firmware version 0.5.0.0 or higher (either
Live or Live Plus versions).

This command-line application allows you to navigate the OSD
from a telnet/ssh session, by pressing keys on your keyboard.
To get feedback of your position on the OSD, /tmp/dmaosd.log
is parsed and cues about your current position are printed
onscreen (even if you navigate with an external remote).

To use it, you would run the command "cliremote.pl" in a shell.

Use the following keys to navigate:
Code: Select all
                                                                               
Enter key -> ENTER                                                             
< -> PREVIOUS                                                                   
> -> NEXT                                                                       
? -> Display help                                                               
Arrow key -> UP                                                                 
Arrow key -> DOWN                                                               
Arrow key -> RIGHT                                                             
Arrow key -> LEFT                                                               
S -> SEARCH                                                                     
b -> BACK                                                                       
e -> EJECT                                                                     
f -> FORWARD                                                                   
h -> HOME                                                                       
o -> OPTION                                                                     
p -> PLAY/PAUSE                                                                 
r -> REWIND                                                                     
s -> STOP                                                                       
x -> Exit application                                                           

Dependencies:
* needs DMAOSD_DEBUG='1' to get current position

Changelog:
0.1 Initial release

Screenshots:
Image
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: cliremote - text-based remote with feedback   

Postby DerFlob » Sun Aug 19, 2012 6:36 am

Hi, I really like it! I've wanted a way to navigate the WDLXTV without turning on my TV for a long time. Great for listening to music.
Unfortunately PLAY/PAUSE doesn't work. The command for irinject is 'pplay' not 'PLAY/PAUSE'.
DerFlob
n00b
 
Posts: 4
Joined: Wed Sep 08, 2010 6:04 am

Re: cliremote - text-based remote with feedback   

Postby mad_ady » Sun Aug 19, 2012 11:54 pm

Thanks for the feedback - never tested play/pause. I'll fix it and upload an updated version.

Edit: Fixed in v0.2.
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: cliremote - text-based remote with feedback   

Postby mad_ady » Tue Dec 30, 2014 1:24 am

A bit of an update - I managed to fix a buffering issue with dmaosd.log in 1.05-based firmwares which made this app useless (you would not get immediate feedback after navigation). Now (or more specifically when the new firmware is released (and by new I mean >= 0.5.2.1)) cliremote should work fine with 1.05 as well..
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: cliremote - text-based remote with feedback   

Postby KAD » Tue Dec 30, 2014 10:08 pm

how do you resolve the buffering issue, if you found a way to force dmaosd to clear the buffers continually, or ....

I'd certainly be interested
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: cliremote - text-based remote with feedback   

Postby mad_ady » Wed Dec 31, 2014 12:06 am

It's a funny story, actually :lol:

TL;DR version: http://svn.wdlxtv.com/diff.php?repname=1.05.04-wdlxtv&path=%2Flive%2Ftrunk%2Fbin%2Fdmaosd.sh&rev=740&peg=740

All this time I was certain that DMAOSD has an internal buffer and only releases output in chunks. So, two days ago I decompiled dmaosd and started to search for functions that have certain strings as parameters, in order to identify some of the logging functions.

I found something that looked like a logging function, but was calling a lot of nested functions and I couldn't understand any of them (lots of ifs, also some cases where it would call a function address loaded from some offset in memory that you couldn't know what it was)... I searched for more strings and was puzzled to find out that some of them were being passed to puts() or printf() or fprintf(). So, this means there is no built-in buffering - something might happen with the standard libc functions...

So, next, I concentrated on the other part of the command (for reference this is what gets executed when starting DMAOSD with logging):
Code: Select all
LC_ALL=en_EN.UTF-8 /bin/dmaosd $1 $2 $3 $4 $5 $6 $ERR | tee /tmp/dmaosd.log &


so I searched for tee buffering and I found some resources that shows how processes using pipes behave differently in terms of output/input than processes using a terminal:
http://www.pixelbeat.org/programming/stdio_buffering/

There are several solutions, but the one that is already part of the firmware is to use the program "script" to unclog the buffer:
http://stackoverflow.com/questions/11337041/force-line-buffering-of-stdout-when-piping-to-tee
http://stackoverflow.com/questions/1401002/trick-an-application-into-thinking-its-stdin-is-interactive-not-a-pipe

So, the good news is you can probably apply this patch easily for your firmwares as well. Also, there isn't any noticeably penalty in performance - if you disable DMAOSD_DEBUG the default behaviour is for dmaosd to output unbuffered text to the serial port anyway.

I'll be contacting you soon with more changes you can/should add to your firmwares to have the same php features I added (namely curl support), add webscreenshot support and some other smaller things.
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: cliremote - text-based remote with feedback   

Postby KAD » Wed Dec 31, 2014 8:59 am

well that's a nice easy fix, that's quite a bit of digging on your part to find it

as for curl php and other stuff, we'll touch base later, but the good news is 90% of binaries that run on the live will run on smp
so I probably just need to copy the new binaries
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA


Return to WDLXTV-G2 & WDLXTV-Live/Plus app.bins

Who is online

Users browsing this forum: No registered users and 2 guests