1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 11:36:52 +00:00

17 Commits

Author SHA1 Message Date
Ralph Metzler
cd19e9e037 bump version 2017-04-27 17:44:28 +02:00
mvoelkel
1c42bee27f Prefix checking on customized server names changed 2017-03-14 21:49:57 +01:00
mvoelkel
17af2f85c8 fixed a bug with IE11
baseURI not supported by IE11
removed leftover closing tag
2017-02-24 18:27:36 +01:00
mvoelkel
aa3d122fd9 Set version to 1.0.80 2017-02-24 16:21:23 +01:00
Ralph Metzler
4172175691 new fpga image version 1.2 2017-02-24 12:47:20 +01:00
Ralph Metzler
6d6e0a3726 support ISDB-T tuning 2016-12-07 16:00:53 +01:00
Ralph Metzler
dfda1b722b new version 2016-11-24 01:37:35 +01:00
Ralph Metzler
4f4441a68e add global patch directory for init and tc build 2016-11-24 01:37:35 +01:00
mvoelkel
28f48ece42 Temperature monitor: fix broken fix
b6f4ff3206
2016-11-22 12:11:25 +01:00
Ralph Metzler
ddcf792c6a bump version 2016-11-18 13:39:26 +01:00
Ralph Metzler
1fe49c7f2d count frontends after checking config to get right count if internal switch enabled 2016-11-18 13:38:13 +01:00
Ralph Metzler
88574173d9 use seperate patch directory for our own buildroot patches
bump octoserve version
2016-11-17 16:38:41 +01:00
Ralph Metzler
a0e2ee78dc fix addpid 2016-11-17 16:35:33 +01:00
Ralph Metzler
3d45ccf6fc add code to resolve gateway if client not local 2016-11-15 15:50:21 +01:00
mvoelkel
03a15dd9ee System settings page fixes
1. System.html Don't submit when nothing has changed.
2. sync the file system after writing system settings.
2016-11-09 14:34:32 +01:00
mvoelkel
b6f4ff3206 increase startup delay on fancontrol 2016-11-09 12:12:22 +01:00
mvoelkel
f4c574cccd don't crash on empty msmdoe file 2016-11-09 12:10:59 +01:00
20 changed files with 177 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
BR2_arm=y BR2_arm=y
BR2_CCACHE=y BR2_CCACHE=y
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk" BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="$(TOPDIR)/output-octonet-tc/host/usr" BR2_TOOLCHAIN_EXTERNAL_PATH="$(TOPDIR)/output-octonet-tc/host/usr"

View File

@@ -1,6 +1,7 @@
BR2_arm=y BR2_arm=y
BR2_CCACHE=y BR2_CCACHE=y
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk" BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="$(TOPDIR)/output-octonet-tc/host/usr" BR2_TOOLCHAIN_EXTERNAL_PATH="$(TOPDIR)/output-octonet-tc/host/usr"

View File

@@ -1,6 +1,7 @@
BR2_arm=y BR2_arm=y
BR2_CCACHE=y BR2_CCACHE=y
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk" BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
BR2_KERNEL_HEADERS_3_17=y BR2_KERNEL_HEADERS_3_17=y
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y

View File

@@ -0,0 +1,12 @@
diff -rup ../../output-octonet.old/build/dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile
--- ../../output-octonet.old/build/dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile 2016-08-18 16:14:43.996732820 +0200
+++ dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile 2016-11-15 18:40:08.830614417 +0100
@@ -25,6 +25,6 @@ $(binaries): $(objects)
$(objects): atsc_psip_section.c atsc_psip_section.h
atsc_psip_section.c atsc_psip_section.h:
- perl section_generate.pl atsc_psip_section.pl
+ perl section_generate.pl ./atsc_psip_section.pl
include ../../Make.rules
Only in dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan: Makefile~

View File

@@ -13,9 +13,9 @@ if [ ! -e buildroot ]; then
fi fi
tar xf buildroot-2015.02-rc2.tar.bz2 tar xf buildroot-2015.02-rc2.tar.bz2
mv buildroot-2015.02-rc2 buildroot mv buildroot-2015.02-rc2 buildroot
cp dvb-apps-0002-Fix-broken-bitops-on-arm.patch buildroot/package/dvb-apps/ # cp dvb-apps-0002-Fix-broken-bitops-on-arm.patch buildroot/package/dvb-apps/
cp busybox-0001-Fix-zcip-arp-compare.patch buildroot/package/busybox/ # cp busybox-0001-Fix-zcip-arp-compare.patch buildroot/package/busybox/
cp lzop-0001-ACC.patch buildroot/package/lzop/ # cp lzop-0001-ACC.patch buildroot/package/lzop/
if [ -e dl ]; then if [ -e dl ]; then
ln -sf ../dl buildroot ln -sf ../dl buildroot
fi fi

Binary file not shown.

Binary file not shown.

View File

@@ -528,6 +528,29 @@ static int tune_terr2(struct dvbfe *fe)
return 0; return 0;
} }
static int tune_isdbt(struct dvbfe *fe)
{
struct dtv_property p[] = {
{ .cmd = DTV_CLEAR },
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] * 1000 },
{ .cmd = DTV_BANDWIDTH_HZ, .u.data = fe->param[PARAM_BW_HZ] },
{ .cmd = DTV_TUNE },
};
struct dtv_properties c;
int ret;
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_ISDBT);
c.num = ARRAY_SIZE(p);
c.props = p;
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
if (ret < 0) {
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
return -1;
}
return 0;
}
static int tune(struct dvbfe *fe) static int tune(struct dvbfe *fe)
{ {
int ret; int ret;
@@ -551,6 +574,9 @@ static int tune(struct dvbfe *fe)
case SYS_DVBC2: case SYS_DVBC2:
ret = tune_c2(fe); ret = tune_c2(fe);
break; break;
case SYS_ISDBT:
ret = tune_isdbt(fe);
break;
default: default:
break; break;
} }
@@ -1108,16 +1134,6 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
if (!fe->type) if (!fe->type)
return -1; return -1;
if (fe->type & (1UL << SYS_DVBS2))
os->dvbs2num++;
if (fe->type & (1UL << SYS_DVBT2))
os->dvbt2num++;
else if (fe->type & (1UL << SYS_DVBT))
os->dvbtnum++;
if (fe->type & (1UL << SYS_DVBC2))
os->dvbc2num++;
else if (fe->type & (1UL << SYS_DVBC_ANNEX_A))
os->dvbcnum++;
fe->os = os; fe->os = os;
fe->anum = a; fe->anum = a;
fe->fnum = f; fe->fnum = f;
@@ -1142,7 +1158,19 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
} }
} }
} }
os->dvbfe_num++;
if (fe->type & (1UL << SYS_DVBS2))
os->dvbs2num++;
if (fe->type & (1UL << SYS_DVBT2))
os->dvbt2num++;
else if (fe->type & (1UL << SYS_DVBT))
os->dvbtnum++;
if (fe->type & (1UL << SYS_DVBC2))
os->dvbc2num++;
else if (fe->type & (1UL << SYS_DVBC_ANNEX_A))
os->dvbcnum++;
os->dvbfe_num++;
pthread_mutex_init(&fe->mutex, 0); pthread_mutex_init(&fe->mutex, 0);
return 0; return 0;
} }

View File

@@ -151,3 +151,92 @@ time_t mtime(time_t *t)
return ts.tv_sec; return ts.tv_sec;
} }
struct nlreq {
struct nlmsghdr n;
struct rtmsg r;
char buf[1024];
};
int nlrequest(int fd, struct nlmsghdr *n, unsigned char *gw)
{
char buf[1024];
int rtl, len = 0, c;
struct nlmsghdr *nlp;
struct sockaddr_nl snl;
struct iovec iov = { (void *) n, n->nlmsg_len };
struct msghdr msg = { (void *) &snl, sizeof(snl),
&iov, 1, NULL, 0, 0 };
char *p = (char *) buf;
memset(&snl, 0, sizeof(snl));
snl.nl_family = AF_NETLINK;
sendmsg(fd, &msg, 0);
while (1) {
iov.iov_base = p;
iov.iov_len = sizeof(buf) - len;
c = recvmsg(fd, &msg, 0);
if (c < 0)
return -1;
if (c == 0)
break;
nlp = (struct nlmsghdr *)p;
if (nlp->nlmsg_type == NLMSG_DONE)
break;
if (nlp->nlmsg_type == NLMSG_ERROR)
break;
p += c;
len += c;
break;
}
for (nlp = (struct nlmsghdr *) buf; NLMSG_OK(nlp, len); nlp = NLMSG_NEXT(nlp, len)) {
struct rtmsg *rtp = (struct rtmsg *) NLMSG_DATA(nlp);
struct rtattr *rtap = (struct rtattr *) RTM_RTA(rtp);
for (rtl = RTM_PAYLOAD(nlp); RTA_OK(rtap, rtl); rtap = RTA_NEXT(rtap, rtl)) {
switch (rtap->rta_type) {
case RTA_GATEWAY:
memcpy(gw, RTA_DATA(rtap), 24);
break;
default:
break;
}
}
}
}
int get_route(unsigned char *ip)
{
struct sockaddr_nl snl;
struct nlreq req;
struct nlmsghdr *n = &req.n;
struct rtattr *rta;
int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
memset(&snl, 0, sizeof(snl));
snl.nl_family = AF_NETLINK;
snl.nl_pid = getpid();
bind(fd, (struct sockaddr *) &snl, sizeof(snl));
memset(&req, 0, sizeof(req));
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
req.n.nlmsg_type = RTM_GETROUTE;
req.n.nlmsg_flags = NLM_F_REQUEST;
req.r.rtm_family = AF_INET;
//req.r.rtm_flags |= RTM_F_LOOKUP_TABLE;
req.r.rtm_table = 0;
req.r.rtm_dst_len = 32;
rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
rta->rta_type = RTA_DST;
rta->rta_len = RTA_LENGTH(4);
memcpy(RTA_DATA(rta), ip, 4);
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_LENGTH(4);
nlrequest(fd, n, ip);
printf("IP/GW = %u.%u.%u.%u\n", ip[0], ip[1], ip[2], ip[3]);
close(fd);
}

View File

@@ -126,6 +126,9 @@ static int get_mac(char *ifname, struct sockaddr *sadr, uint8_t *mac)
struct arpreq arpreq; struct arpreq arpreq;
int s; int s;
if (sadr->sa_family == AF_INET)
get_route(&((struct sockaddr_in *) sadr)->sin_addr);
s = socket(AF_INET, SOCK_DGRAM, 0); s = socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0) if (s < 0)
return -1; return -1;
@@ -1423,20 +1426,22 @@ static int merge_pids(struct dvb_params *op, struct dvb_params *p)
{ {
int i, r = 0; int i, r = 0;
dbgprintf(DEBUG_SYS, "merge_pids\n");
if (p->set & (1UL << PARAM_PID)) if (p->set & (1UL << PARAM_PID))
for (i = 0 ; i < 1024 ; i++) for (i = 0; i < 1024; i++)
if (op->pid[i] != p->pid[i]) { if (op->pid[i] != p->pid[i]) {
r |= 1; r |= 1;
op->pid[i] = p->pid[i]; op->pid[i] = p->pid[i];
} }
if (p->set & (1UL << PARAM_APID)) if (p->set & (1UL << PARAM_APID))
for (i = 0 ; i < 1024 ; i++) for (i = 0; i < 1024; i++)
if (!(op->pid[i] & p->pid[i])) { if ((~op->pid[i]) & p->pid[i]) {
r |= 2; r |= 2;
op->pid[i] |= p->pid[i]; op->pid[i] |= p->pid[i];
} }
if (p->set & (1UL << PARAM_DPID)) if (p->set & (1UL << PARAM_DPID))
for (i = 0 ; i < 1024 ; i++) for (i = 0; i < 1024; i++)
if (op->pid[i] & p->dpid[i]) { if (op->pid[i] & p->dpid[i]) {
r |= 4; r |= 4;
op->pid[i] &= ~p->dpid[i]; op->pid[i] &= ~p->dpid[i];

View File

@@ -59,6 +59,7 @@
#include <linux/sockios.h> #include <linux/sockios.h>
#include <linux/filter.h> #include <linux/filter.h>
#include <time.h> #include <time.h>
#include <linux/rtnetlink.h>
#include <libdvben50221/en50221_stdcam.h> #include <libdvben50221/en50221_stdcam.h>
@@ -537,5 +538,6 @@ int sendlen(int sock, char *buf, int len);
int sendstring(int sock, char *fmt, ...); int sendstring(int sock, char *fmt, ...);
time_t mtime(time_t *t); time_t mtime(time_t *t);
int get_route(unsigned char *ip);
#endif #endif

View File

@@ -53,6 +53,8 @@ local StartIndex = 1
local count = interval local count = interval
local fanstate = -1 local fanstate = -1
sleep(30)
local ddbridge = io.open("/sys/class/ddbridge/ddbridge0/devid0","r"); local ddbridge = io.open("/sys/class/ddbridge/ddbridge0/devid0","r");
if ddbridge then if ddbridge then
local devid = ddbridge:read("*l") local devid = ddbridge:read("*l")
@@ -70,8 +72,6 @@ if ddbridge then
end end
end end
sleep(30)
for i = 0,4,1 do for i = 0,4,1 do
temp = ReadTemp(i) temp = ReadTemp(i)
if temp > 0 then if temp > 0 then
@@ -91,7 +91,7 @@ if NumSensors == 0 then
end end
while true do while true do
sleep(1) sleep(1)
temps = "" temps = ""
for i = 0, NumSensors - 1, 1 do for i = 0, NumSensors - 1, 1 do
temp = ReadTemp(Sensor[i]) temp = ReadTemp(Sensor[i])

View File

@@ -106,7 +106,11 @@ function SaveSettings()
param += "strict=" + (NewSettings.strictEnabled?"1":"0"); param += "strict=" + (NewSettings.strictEnabled?"1":"0");
} }
location.replace('/systemsettings.lua?'+param); document.getElementById("SetButton").disabled = true;
if( param != "" )
{
location.replace('/systemsettings.lua?'+param);
}
} }
} }

View File

@@ -40,8 +40,9 @@ function GetBoxName()
local boxname = "" local boxname = ""
local tmp = io.open("/config/boxname") local tmp = io.open("/config/boxname")
if tmp then if tmp then
local pat = "OctopusNet:";
boxname = tmp:read("*l") boxname = tmp:read("*l")
boxname = boxname:gsub("OctopusNet:","",1); boxname = boxname:gsub(pat:gsub(".","%."),"",1);
tmp:close() tmp:close()
end end
return boxname return boxname

View File

@@ -74,8 +74,9 @@ function GetBoxName()
local boxname = "" local boxname = ""
local tmp = io.open("/config/boxname") local tmp = io.open("/config/boxname")
if tmp then if tmp then
local pat = "OctopusNet:";
boxname = tmp:read("*l") boxname = tmp:read("*l")
boxname = boxname:gsub("OctopusNet:","",1); boxname = boxname:gsub(pat:gsub(".","%."),"",1);
tmp:close() tmp:close()
end end
return boxname return boxname
@@ -85,8 +86,11 @@ function GetMSMode()
local msmode = "quad" local msmode = "quad"
local tmp = io.open("/config/msmode") local tmp = io.open("/config/msmode")
if tmp then if tmp then
msmode = tmp:read("*l") local t = tmp:read("*l")
tmp:close() tmp:close()
if t then
msmode = t
end
elseif ReadSetting('noswitch') == "true" then elseif ReadSetting('noswitch') == "true" then
msmode = "none" msmode = "none"
end end
@@ -162,6 +166,7 @@ if query ~= "" then
if name == "strict" then restart = 1 end if name == "strict" then restart = 1 end
end end
end end
os.execute("/bin/sync >/dev/null 2>&1");
if restart == 1 then if restart == 1 then
os.execute("/etc/init.d/S99octo restartoctonet > /dev/null 2>&1 &") os.execute("/etc/init.d/S99octo restartoctonet > /dev/null 2>&1 &")
nextloc = "wait.html?10" nextloc = "wait.html?10"

View File

@@ -24,7 +24,7 @@ function Wait()
function OnLoad() function OnLoad()
{ {
var param = document.baseURI.match(/\d+$/); var param = document.URL.match(/\d+$/);
WaitCounter = 5; WaitCounter = 5;
if( param ) WaitCounter = parseInt(param); if( param ) WaitCounter = parseInt(param);
@@ -48,7 +48,7 @@ function OnLoad()
</td></tr> </td></tr>
<tr><td class="maintd" colspan="2">&nbsp;</td></tr> <tr><td class="maintd" colspan="2">&nbsp;</td></tr>
<tr> <tr>
<td class="maintd"></script></td> <td class="maintd"></td>
<td class="content"> <td class="content">
<div> <div>
<!-- Begin Content --> <!-- Begin Content -->

View File

@@ -19,5 +19,5 @@
#ifndef _OCTOSERVE_VERSION_ #ifndef _OCTOSERVE_VERSION_
#define _OCTOSERVE_VERSION_ #define _OCTOSERVE_VERSION_
#define OCTOSERVE_VERSION "1.0.72" #define OCTOSERVE_VERSION "1.0.81"
#endif #endif