This tutorial requires an installed fun_plug!
Many people asked me to compile various packages over the last few years. Sometimes i was able to help and sometimes (in rare occasions) i had to reject a request when it was impossible to fulfill it. Then i often told the requestor to install optware which originated from the NSLU2-Project and provides many addition packages. I didn’t have experienc on this, so i had to leave them in the dark. Until recently. Continue reading Installation of Optware on the D-Link DNS-323 and Conceptronic CH3SNAS
This tutorial is deprecated, please use the tutorial for the current version.
Since a while there is a new version of the Twonkymedia Server 6 available. Many readers asked me how to update to this version without loosing the configuration of the already installed version. This article describes the update for the following devices:
- Conceptronic CH3SNAS
- D-Link DNS-323
For other devices, please follow this article. If you are searching for the article regarding the initial installation (not the update), please look here for this.
Continue reading Update of Twonkymedia Server 6 on the Conceptronic CH3SNAS and the D-Link DNS-323
This tutorial is deprecated, please use the tutorial for the current version.
If you need an advanced Mediaserver, Twonkymedia Server is one of the best choices. The Problem is that the installation of Twonkymedia Server 6 is a little bit more complicated than just running a Setup. Before you go on, please make sure that the Fonz fun_plug is installed. The following article has only been tested on the CH3SNAS, DNS-323. An Article for other devices can be found here. If you want to update to the newest version of twonky (and if you’ve already followed this article in the past), then check this out.
Continue reading Installation of Twonkymedia Server 6 on the Conceptronic CH3SNAS and the D-Link DNS-323
Continue reading Flashing the Conceptronic CH3SNAS with the Firmware of the D-Link DNS-323
This procedure allows you to upgrade (or downgrade) the version of the firmware running on the NAS. Although backups are always nice (if you have that option), the data stored on the NAS is not affected. Similarly, any servers (daemons) running under fun_plug are also unaffected (although they are temporarily turned off and later turned on again).
Note that this somewhat elaborate procedure is needed if you are running fun_plug. If you do not have fun_plug installed, or it is no running, you can should use the simpler instructions provided by Conceptronic with the firmware file.
Checking the firmware version
You can tell which firmware version you are running by using a web browser:
- browse to the CH3SNAS using an IP address (default is http://192.168.0.20) or a network name (maybe http://CH3SNAS)
- If this brings you to a web page you created yourself, you are likely running fun_plug and have the lighttpd HTTP server running on port 80 and need to use port 81 to reach the configuration screen (e.g. using http://192.168.0.20:81). If you don’t know what funplug is, you are not using it and you can ignore this comment.
- login as admin
- Then go to: ”Configuration” >> ”Tools” >> ”Firmware”
Downloading firmware versions
An overview of the current stable version, any more recent beta (or “Release Candidate”) versions, or older versions can be found here.
The page contains links to sites where the firmware can be downloaded. After downloading the required version you will need to unzip or unrar it.
Installation if you don’t use
If you are not running fun_plug, you can simplify things by following the instructions in the PDF readme file supplied with the downloaded firmware rather than following the fancier instructions below which assume you may be running various special servers and running with special settings.
So, in the following, we assume that you are running fun_plug.
Temporarily reactivate Telnet
If you are running funplug, it is likely that you enabled
ssh (Secure Shell) and disabled
telnet for security reasons. After the reboot, all modifications to
/etc/group are gone, which is why we need to temporarily reactivate
telnet to ensure that we can login after the upgrade:
ssh(e.g. using PuTTY)
- activate the
telnetdaemon so you can easily login later:
cd /ffp/start ls -al telnetd.sh chmod a+x telnetd.sh ls -al telnetd.sh
This means that on the next reboot telnet should be enabled.
Notes on CH3SNAS Firmware 1.05 regarding the fan
If you are upgrading from a pre-1.0.5 firmware version to version 1.0.5 or later, you may decide to replace the special fan control script “
fanctl” from Fonz (see the fan control tutorial) with the standard fan control feature built into the Conceptronic firmware.
Which option is better? The firmware version 1.0.5 has a very simple fan control algorithm. The fan only runs when the internal temperature is 43°C or higher. This is a bit high. Furthermore, the fan speed does not depend on the temperature: the fan is either on or off. Fonz’ solution instead increases the fan speed as the temperature rises. This avoids the fan repeatedly turning on and off when the fan needs to spin, but doesn’t need to run at full speed.
If you decide to try the firmware’s solution, you can deactivate Fonz’ control program using:
cd /ffp/start sh fanctl.sh status ls -al fanctl.sh chmod a-x fanctl.sh ls -al fanctl.sh
Temporarily disable funplug
Rename the file
fun_plug.bak to deactivate ffp on the next boot. You can easily do this using e.g. Windows Explorer or using the command shell:
cd /mnt/HD_a2 ls fun_plug* mv fun_plug fun_plug.bak ls fun_plug*
Write down any special configurations you have set up in the system.
The main place to look is in the ”Advanced” tab of the Configuration web page. Write down a reminder to set any particular settings such as ”’users”’ who have access, ”’groups”’ you may have created, ”’ftp access”’ you may have given to groups, etc. If you forget to reconfigure these, you will find out later when e.g. an ftp account doesn’t work. Unfortunately there is no simple way to save these settings and later reload them: you will, for example, have to reenter or define new passwords.
Installing new firmware
Update the firmware via the web interface (see picture above). During the update, you will get a progress bar. Then, after confirmation, the CH3SNAS will reboot.
Next reset the CH3SNAS firmware settings to the factory defaults (the new firmware may interpret settings stored in Flash memory differently that the previous version). This step is mandatory to ensure correct operation!
- Open the configuration page
Restore To Factory Default Settings
This will cause another reboot during which the IP address, group/user information, user privileges will be lost. Your browser may not find the device again if you use a non-default name. Try the default “http://CH3SNAS/” or using Conceptronic’s “Easy Search Utility” to find your NAS in the network.
At this point, the administrator password is empty, so you can log onto the Config web page as
admin with an empty password. Then you need to run
Run Wizard to get the basic settings correct again. These include
- the admin password
- timezone and daylight savings time setting
- IP address (if set to static)
- the network workgroup
- the network name of the CH3SNAS
At this point you cannot access the CH3SNAS via either
ssh because an out-of-the-box CH3SNAS does not enable either daemon:
fun_plugusing SAMBA (e.g. using Windows Exporer)
- reboot the CH3SNAS (e.g. using the Configuration page:
Note that before the reboot, your Config page is on port 80. It may be on port 81 after the reboot. From this point on
telnetshould work again.
- Login with
telnetand set the root password again using this procedure. This ends with running
store-passwd.shto save the password information.
telnetagain (first be sure
sshis running!) using an ssh session on PuTTY:
cd /ffp/start ls -al telnetd.sh chmod a-x telnetd.sh ls -al telnetd.sh sh telnetd.sh stop
The final line stops the telnet daemon, so from this point on you (only) have access via the much more secure
You can now redefine any required user- and group settings (e.g. for
Note that after updating the firmware, the NAS will spend a few hours reindexing the hard disks (searching for movies and audio-files) for the itunes and UPnP-services. You can stop this activity by deactivating the respective services.
Please check the tutorial page for updated tutorials on this topic!
The CH3SNAS, as well as other small nas devices, has a small fan at the back. This fan is necessary because the NAS can generate significant amounts of heat when one or two drives are used heavily.
Although the fan is speed-controlled through software provided by Conceptronic, the fan never switches off completely. Some people find this too noisy for quiet environments like bedrooms or even some offices. An obvious solution is to turn the CH3SNAS off entirely when it is not in use (e.g. at night), but this is very inconvenient and it gives problems when the CH3SNAS may be accessed occasionally by remote (Internet) users.
Thanks to the fun_plug, the user can change the fan control algorithm to reduce noise, save a bit of power and reduce wear on the fan itself.
- Replacing the default fan control software
- How fanctl works
Replacing the default fan control software
The standard fan control solution
By default, the fan is controlled by a program embedded within the CH3SNAS called
fancontrol. This program adjusts the fan speed depending on the temperature measured inside the CH3SNAS.
Conceptronic also provides two other utilities which are helpful to control the fan:
temperature– shows the actual temperature (on some devices in Fahrenheit and on others in Celsius) by entering the command
"temperature g 0"
fanspeed– returns the current fan speed when you enter
"fanspeed g". It can also set a new fan speed by entering the command
"fanspeed w YourFanSpeed"(where
YourFanSpeedis the desired speed in Rotations Per Minute).
Using shell scripts versus using binaries
There are different ways to control the fan. In any case the new software needs to stop (“kill”) the built-in
fancontrol program provided by Conceptronic before it takes over control.
One approach is to use the programs
fanspeed within a simple
bash script that repeatedly measures the temperature and adjusts the fan speed accordingly. Such a script can even choose to turn off the fan entirely below a certain temperature. But a script-based approach, which, compared to a compiled C program, uses more (valuable) memory and CPU cycles.
Fortunately Fonz, the author of fun_plug, has written a small and efficient binary program named
fanctl. It controls the fan without relying on the
fanspeed) programs and without using the
bash shell. This efficiency is nice as the program is intended to run as long as the CH3SNAS is powered up. By default,
fanctl adjusts the fan speed every 30 seconds if needed.
Uli has created a package to simplify installation of
In this tutorial we assume that the fun_plug is already installed on the NAS and that you synchronized Uli’s repository (see here for instructions on how to do this). Afterwards install the package (see detailed instructions here):
funpkg -i /ffp/pkg/additional/ffp-misc/fanctl-*.tgz cp /ffp/etc/examples/fanctl.conf /ffp/etc/fanctl.conf
Please make sure, that no other scripts than the original fancontroller are active! You can check this by:
ps aux|grep fan
This should show the following output (the process identification numbers will vary):
1431 root fancontrol 12620 root grep fan
These are all the running processes (
ps) which were filtered (
grep) on whether they include the text
fan somewhere in their name. Despite appearances, [http://en.wikipedia.org/wiki/Ps_(Unix)#Options aux] is not a command or name, but 3 separate options for
ps with a missing “-” this time.
Now test the first run of the
fanctl script by entering the following command on the command line:
sh /ffp/start/fanctl.sh start
After entering the above command, the fan will run with a audible noise for a few seconds. You can check the correct opertion of fanctl now:
ps aux|grep fan
This should show the following output (again the PID numbers will vary):
12628 root /ffp/sbin/fanctl /ffp/etc/fanctl.conf 12635 root grep fan
This shows that the
fancontrol process disappeared and was replaced by the
fanctl process (with its configuration file).
As the last step, you can activate the daemon permanently:
chmod a+x /ffp/start/fanctl.sh
To understand or to adjust the behaviour of
fanctl, you may want to inspect its configuration file
/ffp/etc/fanctl.conf. If you use the nanoeditor:
Do not change these values unless you completely understand the consequences.
Overheated hard drives can lead to data loss or early drive failure. So if you want to change the settings in the configuration file, please study the following documentation carefully and test any modifications you make carefully.
The graph (by Uli) explains how the program adjusts the fan speed. It assumes the default settings (which you won’t change unless you need to and know what you are doing – right?). Room temperature is typically about 20 degrees Celcius (68 degrees Fahrenheit).
When you boot the CH3SNAS, but hardly use the drives the temperature should increase a few degrees, but stay well below 40 degrees. In that case, the fan follows the blue line: it stays off because there is no real need to cool the CN3SNAS yet. However, when you use the drives a lot, the temperature can rise above 40 degrees. Especially if the room temperature also happens to be hot. This causes the fan to switch on. The fan speed (in RPM) follows the curved slope (part of a parabolic curve). The maximum fan speed is limited by default to 6300 RPM (called
pwm_hi). Like the original software, there is a actually a safety threshold as well: above 51 degrees, the CN3SNAS is turned off. The latter shouldn’t normally happen unless something goes very wrong (like a broken drive, or operating your CH3SNAS in the sauna).
Now assume that the CH3SNAS has become relatively hot (say 45 degrees Celcius), but the drives now enter a period of infrequent access. This causes the drive motors to automatically shut down, reducing heat production and causing the temperature to drop. Every 30 seconds, a drop in temperature will cause the fan to slow down. When the temperature drops below 40 degrees (called
temp_hi) the fan speed stabilizes for a while. When the temperature then drops below 37 degrees (called
temp_lo), the fan is turned off.
Note that turning the fan on and off occur at different temperatures. This is called (hysteresis). This reduces the chance that at some temperature the fan repeatedly runs for 30 seconds, then turns off for 30 seconds, and then turns on again.
If you want to change the temperatures (e.g. if the fan never switches off completely (NAS too warm) or you want to cool it down to a certain level), there are various values in the script for configuring these. All values have to be set in
40°C would be
There are four different values:
temp_stop: If the temperature decreases below this value, the fan is set to the speed, which is configured as the variable
pwm_stop(normally this will be zero and thus stops the fan). If the temperature rises about this temperature, nothing happens (hysteresis). Default is 37 degrees Celcius.
temp_lo: If the temperature rises above this temperature,
pwm_startwill be set for one second (Starts the fan). After this, the fan speed will be adjusted somewhere beween
pwm_hi– depending on the measured temperature. If the temperature drops below this temperature, the fan runs at
pwm_lo(hysteresis). Default is 40 degrees Celcius.
temp_hi: If the temperature rises above this value,
pwm_hiis set as fan speed. Default is 50 degrees Celcius.
temp_crit: If the temperature rises above this value, the CH3SNAS is shut down to prevent damage. Default is 51 degrees Celcius. Be extra careful with this value.
If you want to change the fan speed (e.g. if you think, the fan turns too slowly or if you want the fan to idle and not to stop), there are various values in the script for configuring these.
pwm_stop: This is the speed which is set below
temp_stop. If set to zero, the fan will halt. It may not be a good idea to use really low non-zero values here (difficult to run the fan smoothly at these speeds).
pwm_start: This is the speed which is set for one second if
pwm_stopwas set and the temperature rises above
temp_loagain. (Default: 3200 rpm)
pwm_lo: This is the speed which is set at
temp_lo. (Default: 2700 rpm)
pwm_hi: This is the speed which is set at
temp_hi. (Default: 6300 rpm)
pwm_hi the fan speed will be interpolated according to the following formula:
RPM = (pwm_hi - pwm_lo) * (temp - temp_lo) / (temp_hi - temp_lo) * (temp - temp_lo) / (temp_hi - temp_lo) + pwm_lo
Again, editing fanctl.conf should be done with care. Just editing the file will not cause the new values to be used immediately because the running program reads the file once when it starts. One safe way to reload a modified
/ffp/etc/fanctl.conf file is to simply reboot the CH3SNAS. When the program is started, it will load the modified
/ffp/etc/fanctl.conf file. Another way is to use
cd /ffp/start sh fanctl.sh status sh fanctl.sh restart sh fanctl.sh status
A CH3SNAS in a hot room
According to the graph, if you put the CH3SNAS in a very hot environment (e.g. 38 degrees Celcius), the fan will turn on – even when the hard disks are not being used. Turning the fan on wouldn’t help lower the device temperature: it will only get the device temperature closer to room temperature. Currently the software cannot distinguigh this condition (but this obviously also applies to the default
fancontrol software which never turns the fan off).
Shut down on overheating
In exceptional conditions, the CH3SNAS will shut down if it ever reaches
temp_crit (typically 51′ Celcius). When it shuts down, it will create a file named
OVERHEAT in the root directory. By checking for this file and its creation or modification time, you can get confirmation about the cause of the shutdown.
Logging the temperature
From an E-mail exchange with fonz (this hasn’t been tested):
PeterH> Other features might be more fun (e.g. log of temperature?).
That’s pretty easy. Just change /ffp/start/fanctl.sh and replace/ffp/sbin/fanctl $fanctl_config >/dev/null 2>/dev/null </dev/null &
with/ffp/sbin/fanctl $fanctl_config >/mnt/HD_a2/fan.log 2>&1 </dev/null &
You can plot nice graphs from the log file using gnuplot:gnuplot> set timefmt "%Y-%m-%d %H:%M:%S" gnuplot> set xdata time gnuplot> plot '< grep fan /path/to/fan.log' u 1:4 w st, '' u 1:8 w st
If you deinstall
funpkg -r /ffp/pkg/additional/fanctl-2-1.tgz
and reboot your CH3SNAS, you will find using
ps aux|grep fan
that the original
fancontrol appication automatically reappears. This is because
fanctl is activated via a script (
/ffp/start/fanctl.sh) that stops the default
fancontrol process before starting the
This implies that deinstalling funplug and rebooting will also return fan behaviour back to the default behavior and default mechanisms provided by Conceptronic.
But there could be cases where you want to completely remove fun_plug. Because the folder containing the fun_plug packages is owned by user
root, this folder can only be deleted by
root. This can be done by a single
rm (remove) command in a PuTTY (ssh) terminal session if you are log in as root. You may want to see this article on root user for information about the special role of the
But let’s assume pessimistically that that doesn’t work because the
ssh server is not running or because you have problems logging in as root. Fortunately, the fun_plug script is no owned by
root can still be modified by non-root users. This enables a trick to remove the folders without using root privileges: simply add commands for the removal of the fun_plug folder and the fun_plug script to the script itself. These commands will be executed under
root privileges during the next reboot.
You have to download the Script for the Removal here
Installation and execution
Rename the downloaded script to
fun_plug and copy it to the NAS in the topmost directory of Volume_1. This will probably overwrite a existing script file
Reboot the CH3SNAS by holding down the power button 5 seconds or via the web interface (Tools -> System -> Reboot). During the reboot,
fun_plug will be completely removed.
Here the output of
cat /proc/cpuinfo on the D-Link DNS-323:
Processor : ARM926EJ-Sid(wb) rev 0 (v5l) BogoMIPS : 331.77 Features : swp half thumb fastmult edsp java CPU implementer : 0x41 CPU architecture: 5TEJ CPU variant : 0x0 CPU part : 0x926 CPU revision : 0 Cache type : write-back Cache clean : cp15 c7 ops Cache lockdown : format C Cache format : Harvard I size : 32768 I assoc : 1 I line length : 32 I sets : 1024 D size : 32768 D assoc : 1 D line length : 32 D sets : 1024 Hardware : MV-88fxx81 Revision : 0000 Serial : 0000000000000000
Here the output of
cat /proc/meminfo on the D-Link DNS-323:
MemTotal: 61948 kB MemFree: 6040 kB Buffers: 13360 kB Cached: 16344 kB SwapCached: 6968 kB Active: 32444 kB Inactive: 12696 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 61948 kB LowFree: 6040 kB SwapTotal: 1060208 kB SwapFree: 1047916 kB Dirty: 56 kB Writeback: 0 kB Mapped: 22616 kB Slab: 8404 kB CommitLimit: 1091180 kB Committed_AS: 36204 kB PageTables: 620 kB VmallocTotal: 450560 kB VmallocUsed: 9804 kB VmallocChunk: 440316 kB