The OpenNMP & NPKG Project

QNAP NMP-1000P & NMP-1000 Network Multimedia Player related questions

Re: The OpenNMP & NPKG Project

Postby adnovea » Sat Feb 27, 2010 4:26 pm

Hi Schumaku,

You're of great help on the OpenNMP support.
I do actually check for both (eth0 and ra0) but my code may be fooled or not strong enough.
Here the code from /.onmp/web/inc/conf.php

Code: Select all
$output = null;
exec("/sbin/ifconfig eth0 2> /dev/null | /bin/awk '/addr:/{print $2}' | cut -f2 -d:", $output);
if (trim($output[0])!="") define("IP_ADDR", $output[0]);
else {
   $output = null;
   exec("/sbin/ifconfig ra0 | /bin/awk '/addr:/{print $2}' | cut -f2 -d:", $output);
   if (trim($output[0])!="") define("IP_ADDR", $output[0]);
      else define("IP_ADDR", "127.0.0.1");
}



I suggest to replace the 2 tests (lines 63 & 66) to see if it improves:
Code: Select all
trim($output[0])!=""

by
Code: Select all
$output!=null

I cannot test it because none of my USB Wifi sticks are compatible with the NMP-1000.
Last edited by adnovea on Sat Feb 27, 2010 8:24 pm, edited 3 times in total.
User avatar
adnovea
Easy as a breeze
 
Posts: 439
Joined: Sat Jan 26, 2008 2:47 am
NAS Model: TS-109/209

Re: The OpenNMP & NPKG Project

Postby schumaku » Sat Feb 27, 2010 5:43 pm

Laurent,
Thout it's worth mentioning the WLAN thingie before.

Here a minor one: Accessing the OpenNMP homepage with IE8, is leading to the situation where all the big slider icons are shown in top right position, starting with AjaXplorer, Internet Radio, myPVR, and Sample.

ONMP_Slider_icons_IE8.jpg


The error shown by IE might be misleading:
...
Meldung: Syntaxfehler
Zeile: 20
Zeichen: 21
Code: 0
URI: http://nmp-1000:8080/opennmp/index.php

No issues e.g. on Chrome. Fun enough, similar issues with QNAP's original slider on Safari.
You do not have the required permissions to view the files attached to this post.
User avatar
schumaku
Guru
 
Posts: 22232
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: The OpenNMP & NPKG Project

Postby paolo » Sat Feb 27, 2010 6:38 pm

Great thread!!! I post to follow it ...

An answer: is possible to install NPKG features also on the little TS-109 Pro?
TS109-Pro - v.3.1.0 Build 0708T

The strawbale house
http://www.paesaggio.net/strawbales.htm
Image
User avatar
paolo
Getting the hang of things
 
Posts: 73
Joined: Wed Oct 15, 2008 6:52 am
Location: South Sardinia
NAS Model: TS-109/209

Re: The OpenNMP & NPKG Project

Postby petur » Sat Feb 27, 2010 7:08 pm

paolo wrote:is possible to install NPKG features also on the little TS-109 Pro?


On NAS boxes you install QPKG...
User avatar
petur
Moderator
 
Posts: 4458
Joined: Sun Mar 30, 2008 5:42 pm
Location: Gent, Belgium
NAS Model: TS-x69 Pro

Re: The OpenNMP & NPKG Project

Postby adnovea » Sat Feb 27, 2010 8:19 pm

Hi Schumaku,

Just made quick tests on Internet Explorer 8 and it works.
Shall you encountered presentation issues, just press the compatibility button on the right side of the URL bar

http://www.microsoft.com/nz/windows/int ... ation.aspx
User avatar
adnovea
Easy as a breeze
 
Posts: 439
Joined: Sat Jan 26, 2008 2:47 am
NAS Model: TS-109/209

Re: The OpenNMP & NPKG Project

Postby petur » Sun Feb 28, 2010 3:55 am

adnovea wrote:Could you try the cmd in a console and check if it returns your IP correctly ?

The complete command is to extract the IP addr is:
Code: Select all
/sbin/ifconfig eth0 2> /dev/null | /bin/awk '/addr:/{print $2}' | cut -f2 -d:


That command returns nothing at all, but I think you already guessed that, I'm going to do the suggested edit now...
User avatar
petur
Moderator
 
Posts: 4458
Joined: Sun Mar 30, 2008 5:42 pm
Location: Gent, Belgium
NAS Model: TS-x69 Pro

Re: The OpenNMP & NPKG Project

Postby petur » Sun Feb 28, 2010 4:02 am

adnovea wrote:I do actually check for both (eth0 and ra0) but my code may be fooled or not strong enough.
Here the code from /.onmp/web/inc/conf.php

Code: Select all
$output = null;
exec("/sbin/ifconfig eth0 2> /dev/null | /bin/awk '/addr:/{print $2}' | cut -f2 -d:", $output);
if (trim($output[0])!="") define("IP_ADDR", $output[0]);
else {
   $output = null;
   exec("/sbin/ifconfig ra0 | /bin/awk '/addr:/{print $2}' | cut -f2 -d:", $output);
   if (trim($output[0])!="") define("IP_ADDR", $output[0]);
      else define("IP_ADDR", "127.0.0.1");
}



I suggest to replace the 2 tests (lines 63 & 66) to see if it improves:
Code: Select all
trim($output[0])!=""

by
Code: Select all
$output!=null

I cannot test it because none of my USB Wifi sticks are compatible with the NMP-1000.


This fixes the issue! Thanks!
User avatar
petur
Moderator
 
Posts: 4458
Joined: Sun Mar 30, 2008 5:42 pm
Location: Gent, Belgium
NAS Model: TS-x69 Pro

Re: The OpenNMP & NPKG Project

Postby petur » Sun Feb 28, 2010 4:04 am

Feature request: remove the beep that OpenNMP generates, or make it optional. If not, I'll have to remove OpenNMP again, my wife hates beeps :)
User avatar
petur
Moderator
 
Posts: 4458
Joined: Sun Mar 30, 2008 5:42 pm
Location: Gent, Belgium
NAS Model: TS-x69 Pro

Re: The OpenNMP & NPKG Project

Postby adnovea » Sun Feb 28, 2010 1:21 pm

petur wrote:Feature request: remove the beep that OpenNMP generates, or make it optional. If not, I'll have to remove OpenNMP again, my wife hates beeps :)

As far as I remember there is only one beep (except during install where there may be two) when the NPKG are enabled/disable.
There are no beep during normal functioning. OpenNMP behaves pretty much as the NAS in term of beeping, nevertheless you must be able to disable some beeps in the /.onmp/config.ini file
Code: Select all
[ONMP]
; Enabled/disabled [TRUE,FALSE] beep generated by OpenNMP
onmp.beeper            = FALSE
User avatar
adnovea
Easy as a breeze
 
Posts: 439
Joined: Sat Jan 26, 2008 2:47 am
NAS Model: TS-109/209

Re: The OpenNMP & NPKG Project

Postby petur » Sun Feb 28, 2010 7:44 pm

It was beeping at every boot, setting Beeper to FALSE fixed that. Thanks.

After changing changing the network detection, I found that (with the dongle in the lower port) it no longer found the dongle. I swapped memory stick with network dongle and now it works again.
User avatar
petur
Moderator
 
Posts: 4458
Joined: Sun Mar 30, 2008 5:42 pm
Location: Gent, Belgium
NAS Model: TS-x69 Pro

Re: The OpenNMP & NPKG Project

Postby schumaku » Tue Mar 02, 2010 1:11 am

adnovea wrote:Shall you encountered presentation issues, just press the compatibility button on the right side of the URL bar

If the code requires IE7 emulation (strange anyway), I suggest adding the following PHP code to the header area:

Code: Select all
<?php header("X-UA-Compatible: IE=EmulateIE7"); ?>


This will do automatically whay you expect. The user should not take care about emulation.

Salutations,

-Kurt.
User avatar
schumaku
Guru
 
Posts: 22232
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: The OpenNMP & NPKG Project

Postby XabiX » Wed Mar 03, 2010 7:21 pm

If we have to upgrade from one version to another one. What is the best approach?
Re-install over the USB key or is there an upgrade path?

Thanks
XabiX
XabiX
Know my way around
 
Posts: 122
Joined: Thu Apr 02, 2009 3:11 am
NAS Model: TS-109/209 Pro II

Re: The OpenNMP & NPKG Project

Postby schumaku » Sat Mar 27, 2010 3:03 pm

Salut,
Correct me if I'm wrong - rdate does make use of RFC 868, which is not really popular anymore, and no longer commonly available on public or official name servers.

As OpenNMP->System NKP->Date and Time says "Synchronize with an Internet time server (NTP) automatically", can you consider adding ntpclient to the list of required IPKG, so we are really using NTP?

Dependencies: Optware
IPKG required: lighttpd, sqlite, screen, openssh, ntpclient

This makes a ctrontab entry feasible:

0 */1 * * * /opt/bin/ntpclient -h europe.pool.ntp.org -s

The show stopper ... as of v1.1.5:

System is configured for "GMT+01:00 Amsterdam, Berlin, ..." time zone, time roughly set manually, of by sync from PC using the Web UI.

NMP-1000[~]$ date
Sat Mar 27 07:15:06 CEST 2010

Going to the shell, and use either rdate (busybox) or ntpclient (ipkg) does set the time one hour ahead of time.

NMP-1000[~]$ ntpclient -h europe.pool.ntp.org -s
40262 18911.599 33756.0 59.0 3731542557.1 38375.9 0
NMP-1000[~]$ date
Sat Mar 27 08:17:26 CEST 2010

What is wrong? CEST is Central European Summer Time - but we don't have it (yet): By definition, CEST is active between 1:00 UTC on the last Sunday of March and 1:00 on the last Sunday of October.

Sat Mar 27 is _not_ in this time window (but we will be there within some hours).

Suspect the time zone file is outdated (unlikely, as CEST used to start end of April earlier...), broken, corrupt.

---
The very perfect solution would be run the complete ntp for smooth time adjustments - but this seems to be beyond the scope for now, because QNAP seems to prefer much more complex time controls require scheduling, create time jumps, ...

Let's continue dreaming of a perfect world.

-Kurt.
User avatar
schumaku
Guru
 
Posts: 22232
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: The OpenNMP & NPKG Project

Postby buky » Thu Apr 15, 2010 5:22 pm

Just installed OpenNMP.
But if i try to go to webinterface http://nmp_ip:8080/ i get error 408-Forbidden
buky
Starting out
 
Posts: 22
Joined: Thu Apr 15, 2010 4:07 am
NAS Model: TS-419P

Re: The OpenNMP & NPKG Project

Postby schumaku » Fri Apr 16, 2010 2:13 am

Evaluating if this is a generic problem, or limited to php - can you access just the picturee:
http://[nmp-1000]:8080/opennmp/images/nmp-1000.png
User avatar
schumaku
Guru
 
Posts: 22232
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

PreviousNext

Return to NMP

Who is online

Users browsing this forum: No registered users and 1 guest