Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
Some advice please on playback via telnet
04-08-2008, 06:42 PM
Post: #1
Some advice please on playback via telnet
Hey guys...

I am tring to integrate my NMT with my automation kit, I have sucessfully got telnet access, and am playing around with mono...

Is there an easy way to load files and have transport control, or is there a differnet app to mono that would be easier to work with ?

many thanks for your comments, Will
Find all posts by this user
04-09-2008, 01:16 PM
Post: #2
Re: Some advice please on playback via telnet
willplaice Wrote:Is there an easy way to load files and have transport control, or is there a differnet app to mono that would be easier to work with ?

For mvpmc I am using the following command lines:
    audio: /bin/mono -audio -prebuf 100 -bgimg -single FILENAME -dram 1

    video: /bin/mono -single -nogui FILENAME -dram 1

    DVD: /bin/amp_test DIRECTORY --dfb:quiet -osd32 -bgnd:/bin/logo.jpg


Both mono and amp_test will react to commands from the remote control. So you will have to monitor /dev/lircd if you want to know the difference between mono exiting because the file ended, or because the user told it to stop.

Jon
Find all posts by this user
04-11-2008, 03:19 PM
Post: #3
 
thanks for that....

I also don't want to use the Remote, can i mimic the remote strings ?
Find all posts by this user
04-11-2008, 03:46 PM
Post: #4
 
You can write the various remote key codes to /tmp/irkey to simulate commands from the remote. For example, 0xd4 will stop playback.
Find all posts by this user
04-16-2008, 05:07 PM
Post: #5
 
gettler Wrote:You can write the various remote key codes to /tmp/irkey to simulate commands from the remote. For example, 0xd4 will stop playback.

That's great!!! ... but I've not been able to do it ... could you write here a simple example?

Thanks
Find all posts by this user
04-16-2008, 07:45 PM
Post: #6
 
Code:
# echo 212 > /tmp/irkey
I'm not sure why I got the instructions in hex, and then passed them on here as hex, since as far as I can tell the values must be in decimal. Anyway, the above command will cause mono to stop playback and exit.

I don't have a list of commands, but if you run code like the function below from mvpmc, you can find out what the codes are by pressing all the buttons while mono is running and noting what keypress values you get.

Code:
static int
monitor(pid_t pid)
{
    int i;
    char buf[128];
    struct sockaddr_un addr;
    int fd;

    addr.sun_family = AF_UNIX;
    strcpy(addr.sun_path, "/dev/lircd");

    if ((fd=socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
        perror("socket");
        return -1;
    }
    if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
        perror("connect");
        close(fd);
        return -1;
    }

    while (waitpid(pid, NULL, WNOHANG) == 0) {
        fd_set fds;
        struct timeval to;
        int key;

        FD_ZERO(&fds);
        FD_SET(fd, &fds);
        to.tv_sec = 0;
        to.tv_usec = 20000;

        if (select(fd+1, &fds, NULL, NULL, &to) > 0) {
            i=read(fd, buf, sizeof(buf));
            if (i==-1) {
                perror("read");
                break;
            };
            if (!i) {
                break;
            }
            buf[i] = '\0';
            key = atoi(buf);
            printf("keypress: %d\n", key);
        }
    }

    close(fd);

    return 0;
Jon
Find all posts by this user
04-18-2008, 02:31 PM
Post: #7
 
Thank you ... really interesting...
I didn't be able to compile that program for nmt but i made this:

http://www.networkedmediatank.com/viewtopic.php?t=3208
Find all posts by this user
08-16-2008, 06:24 PM
Post: #8
RE:
(04-18-2008 02:31 PM)draio Wrote:  Thank you ... really interesting...
I didn't be able to compile that program for nmt but i made this:

http://www.networkedmediatank.com/viewtopic.php?t=3208

Anything wrong with thread 3208? Iac't read that Sad
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Unable to modify FTP password with telnet goutbouyo 1 1,218 11-08-2011 10:51 PM
Last Post: goutbouyo
  My temp workaround to DVRMS WTV playback informative 0 1,477 09-04-2010 05:53 AM
Last Post: informative
  Telnet jobs stop after exit Boogje 6 3,310 07-16-2010 01:20 PM
Last Post: lordy
Video Telnet OK / Play button kdavid 14 4,292 03-19-2010 02:23 AM
Last Post: rolandhii
  NMT telnet control kdavid 4 3,875 03-16-2010 02:43 PM
Last Post: kdavid
Exclamation Scheduled playback script kdavid 0 1,161 03-16-2010 10:27 AM
Last Post: kdavid
  Start samba service via telnet? gregg098 1 3,248 02-21-2010 02:28 PM
Last Post: DaTiezl
  Telnet Login & Password kr4m17 3 3,703 02-21-2010 07:55 AM
Last Post: dc11ab
  Telnet for complete Newbie [A-110] skibum 1 3,765 01-25-2010 11:54 AM
Last Post: jhmiller
  File operations and Telnet damikeh 4 2,868 01-21-2010 11:49 AM
Last Post: billgatos

Forum Jump: