Multiple Ways to Update the STB Configuration

This forum is dedicated to the discussion of how Cilutions implements digital signage using the DMB Media Player.

Multiple Ways to Update the STB Configuration

Postby Edward.P » Wed Aug 15, 2012 9:36 am

I have a network of A540s all running signage. What are the various ways I can change the configuration of each box? For example, how can I change the FTP Server to point to a different machine? Only through the Web Forms?
Edward.P
 
Posts: 15
Joined: Mon Apr 25, 2011 3:08 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Wed Aug 15, 2012 10:00 am

There are four ways to change the configuration settings on an A540 (or an A140). They are:

    Web Forms: Direct access using a browser on a PC with direct IP access to the STB. Discussed here: viewtopic.php?f=20&t=45
    SNMP: Direct or Indirect (e.g., over the Internet) access using an SNMP Management program (e.g., a MIB Browser) with access to the STB. Discussed here: viewtopic.php?f=20&t=45
    Telnet or ssh: Direct or Indirect (e.g., over the Internet) access using a telnet (or ssh) client on a PC. Once logged into the STB the user can edit the various configuration files using the vi text editor. The significant files on an A540 are:
    /PVR/pdreceiver/ftpc.cnf: FTP Settings
    /PVR/pdreceiver/agent.ini: SNMP Settings
    The fields in these files are self-explanatory and correspond to the field names presented in the Web Forms and SNMP MIB. Here is an example ftpc.cnf file:
    RATE_KBPS=0
    FTP_PORT=21
    FTP_USER=a540
    FTP_PASSWORD=
    FTP_SERVER=ftp.digitalmediabridge.com
    TOD_FILE_DOWN=
    SLEEP_SEC=0
    FTP_HOME_DIR=Content
    SECURITY=NONE

    The SLEEP_SEC field designates the number of seconds to wait in between polling cycles to look for updated content on the FTP Server. A value of 0 disables polling.

    Here is an example of an agent.ini file:
    SNMP_V3=YES
    SNMP_V1_2=YES
    LOCAL_PORT=161
    AGENT_ID=D0021666
    PROXY_PORT=
    PROXY_IP=
    PUNCH_FREQUENCY_SEC=
    BOOT_COUNTER=3

    Also, there are other config values which can be set from the command line inside a telnet session. Contact support@cilutions.com for a comprehensive list.
    stbremoteconf: Direct access using a PC with direct IP access to the STB. Contact support@cilutions.com to acquire this stand-alone program which permits reviewing or modifying a collection of STB manufacturer config settings from a Windows machine on the same network.
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Multiple Ways to Update the STB Configuration

Postby Henry.G » Fri Dec 28, 2012 2:19 pm

What about on the A140? Do these same files apply? If so, where are they?
Henry.G
 
Posts: 45
Joined: Mon Apr 25, 2011 12:54 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Mon Jan 07, 2013 4:34 pm

On the A140 these files are here:

/mnt/nv/ftpc.cnf (the FTP client config file)
/mnt/nv/agent.ini (the SNMP agent config file)
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Mon Jan 07, 2013 4:42 pm

To select telnet or ssh as the command line login mode browse to (using 192.168.1.29 as an example):

http://192.168.1.29/config/
or
http://192.168.1.29:88/config/

and find the Remote Login selection.

Then reboot the A140 to apply.
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Wed Aug 06, 2014 1:57 pm

This shows another means of installing a new agent.ini on an A140 and applying it.

It assumes the A140 is configured to retrieve content from an FTP Server at start-up and periodically. The network administrator can include the following files in the same content location on the FTP Server:

snmp_agent.ini (the configuration file for the A140 - as described above. Here it is named snmp_agent.ini so it will download after finstall_ftp in the download sequence)
finstall_ftp (a shell script which installs snmp_agent.ini and starts/restarts the SNMP proxy agent on the A140)

Here is an example finstall_ftp file which installs a new snmp_agent.ini file:
Code: Select all
#!/bin/sh
UPDATE_FILE=/PVR/snmp_agent.ini
DESTINATION_FILE=/mnt/nv/agent.ini
#Only run this if we just downloaded a new update file
#and make sure the destination file exists - else ignore
if [ $1 = ${UPDATE_FILE} ]  && [ -f ${DESTINATION_FILE} ]; then
  cp ${UPDATE_FILE} ${DESTINATION_FILE}
  killall agent
  /mnt/nv/agent &
fi
exit 0

IMPORTANT: The finstall_ftp file must be created using Unix/Linux end-of-line formatting. Be careful to avoid DOS/Windows/MAC formatting as these formats will not execute on the Linux STBs.

DOUBLY IMPORTANT: The finstall_ftp file must be created using great care and certified to execute correctly before deploying for production use. This programmatic level of access to the STB has potential, if done improperly, to corrupt internal elements of the STB rendering it useless and requiring a re-imaging to recover. EXTREME CARE MUST BE TAKEN.
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Thu Aug 07, 2014 1:59 pm

Here is an example of another finstall_ftp which changes a single string in a text file leaving all other lines in the file unchanged. It is a variation of the finstall_ftp for agent.ini, shown above, which updates the entire file because it copies in an entirely new one.

In the following example it changes the string server.com to 192.168.1.45 in place so all other fields in agent.ini remain unchanged.

Code: Select all
#!/bin/sh
DESTINATION_FILE=/mnt/nv/agent.ini
FINSTALL_FTP_FILE=/PVR/finstall_ftp
#Only run this if we just downloaded a new finstall_ftp file
#and make sure the destination file exists - else ignore
if [ $1 = ${FINSTALL_FTP_FILE} ]  && [ -f ${DESTINATION_FILE} ]; then
  sed -i -e s/server.com/192.168.1.45/ ${DESTINATION_FILE}
  killall agent
  /mnt/nv/agent &
fi
exit 0
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Tue Aug 12, 2014 3:27 pm

The A140/A540 STBs come equipped with a set of Linux commands and utilities useful when writing finstall_ftp scripts which execute on the STB. These commands can also be executed by an administrator from a login shell.

Here is the BusyBox man page:

Code: Select all
BusyBox v1.20.2 (2013-10-15 14:21:00 EDT) multi-call binary.
Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: busybox --list
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
        [, [[, ash, awk, basename, bunzip2, bzcat, cat, chgrp, chmod, chown, chroot, chrt, clear, cp, cttyhack, cut, date, dd,
        df, dirname, dmesg, dnsdomainname, du, echo, egrep, env, expr, false, fdisk, fgrep, find, free, fsync, fuser, getty,
        grep, gunzip, halt, hd, head, hexdump, hostname, id, ifconfig, ifdown, ifup, inetd, init, insmod, iostat, ipcs, kill,
        killall, klogd, less, ln, loadkmap, logger, login, logread, ls, lsmod, lsof, lsusb, md5sum, mesg, mkdir, mkfifo,
        mknod, mkswap, more, mount, mpstat, mv, nice, nmeter, od, ping, ping6, pmap, poweroff, printf, ps, pstree, pwd,
        readlink, reboot, renice, reset, resize, rm, rmdir, rmmod, route, sed, seq, setserial, sh, sha1sum, sleep, sort, stty,
        swapoff, swapon, sync, syslogd, tail, tar, telnet, telnetd, test, tftp, time, timeout, top, touch, tr, traceroute,
        traceroute6, true, tty, umount, uname, uniq, usleep, vconfig, vi, wc, wget, which, whoami, yes, zcat
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Sat Sep 27, 2014 3:18 pm

Here is an example of how to enable the telnet proxy agent in each A140. It also assumes the A140 is configured to retrieve content from an FTP Server at start-up and periodically. The network administrator can include the following files in the same content location on the FTP Server:

tunnel.cnf -the telnet agent configuration file for the A140 described as follows:
Code: Select all
LOCAL_IP=ANY
LOCAL_PORT=0
PROXY_IP=telnetproxyserver.com
AGENT_ID=
PROXY_PORT=11111
PUNCH_FREQUENCY_SEC=30


Of course, replace telnetproxyserver.com with the name of the actual server where the telnet proxy resides. This can be either a name or IP address.
Also, leave AGENT_ID blank as shown above. When it is blank like this the A140 will use the unique serial number of the STB as its agent id.

finstall_ftp (a shell script which installs tunnel.cnf)

Here is an example finstall_ftp file which installs a new tunnel.cnf file:
Code: Select all
#!/bin/sh
UPDATE_FILE=/PVR/tunnel.cnf
DESTINATION_FILE=/mnt/nv/tunnel.cnf
#Only run this if we just downloaded a new update file
#and make sure the destination file exists - else ignore
if [ $1 = ${UPDATE_FILE} ]  && [ -f ${DESTINATION_FILE} ]; then
  cp ${UPDATE_FILE} ${DESTINATION_FILE}
fi
exit 0

IMPORTANT: The finstall_ftp file must be created using Unix/Linux end-of-line formatting. Be careful to avoid DOS/Windows/MAC formatting as these formats will not execute on the Linux STBs.

DOUBLY IMPORTANT: The finstall_ftp file must be created using great care and certified to execute correctly before deploying for production use. This programmatic level of access to the STB has potential, if done improperly, to corrupt internal elements of the STB rendering it useless and requiring a re-imaging to recover. EXTREME CARE MUST BE TAKEN.

LASTLY: This example shows updating the telnet agent configuration. It will take effect after the next A140 reboot.
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Re: Multiple Ways to Update the STB Configuration

Postby Cilutions Support » Wed Nov 12, 2014 3:34 pm

Here is an example of the wifi configuration file on an A540 configured with:
Antenna Type: C.Crane Super USB
Region: North America
SSID: CilutionsWRT54G
Security Key: abc123
DHCP: Enabled
DNS: 8.8.8.8

Location: /mnt/nv/wifi.conf

Contents:
## WIFI Configuration File
WIFI_ENABLE=Y
WIFI_NETWORK_TYPE=Infra
WIFI_SECURITY_TYPE=WPA-PSK-TKIP
WIFI_SSID=CilutionsWRT54G
WIFI_PASSWORD='abc123'
WIFI_DEFAULT_GATEWAY=
WIFI_IP_ADDRESS=
WIFI_IP_MASK=
WIFI_DNS=8.8.8.8

Note that the Amino 3x3 USB Antenna Type is configured outside the wifi.conf file. Contact support@cilutions.com for the Amino NORFLASH settings for this antenna.
Cilutions Support
Site Admin
 
Posts: 139
Joined: Mon Feb 07, 2011 3:03 pm

Next

Return to Digital Signage

Who is online

Users browsing this forum: No registered users and 1 guest

cron