After a few requests i’ve now tried to install Twonky Server 7 on the NAS_Devices and i can tell you that it works. The following article describes the installation. Before you proceed please check here if Version 7.11-Special is still the current version. If not, please add a comment below.
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:
A while back, Conceptronic has decided to discontinue the CH3SNAS to concentrate on the CH3MNAS and CH3HNAS. Unfortunately users of the CH3SNAS are now stuck with an old firmware and are jealous of the DNS-323 users which get regular updates for their nearly identical device. But luckily there is a way to flash the DNS-323-Firmware on the CH3SNAS so that these users can participate in the run for new features. 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:
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”
This should get you to the screen shown in the picture.
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 funplug
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/passwd and /etc/group are gone, which is why we need to temporarily reactivate telnet to ensure that we can login after the upgrade:
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:
sh fanctl.sh status
chmod a-x fanctl.sh
The 2nd line reports whether the fanctl utility is running. The chmod a-x causes the special fan script to be disabled on the next reboot.
Temporarily disable funplug
Rename the file fun_plug to 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:
ls fun_plug*mv fun_plug fun_plug.bak
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.
The other setting worth saving is any non-default IP address or network name of your CH3SNAS.
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
Goto: Tools >> System >> 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 Setup >> 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
This will lead to a restart after which you will also be able to see the CH3SNAS under its original name on the network and the stored data should be accessible.
At this point you cannot access the CH3SNAS via either telnet or ssh because an out-of-the-box CH3SNAS does not enable either daemon:
rename fun_plug.bak back to fun_plug using SAMBA (e.g. using Windows Exporer)
reboot the CH3SNAS (e.g. using the Configuration page: Tools >> System >> Restart). 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 telnet should work again.
Login with telnet and set the root password again using this procedure. This ends with running store-passwd.sh to save the password information.
deactivate telnet again (first be sure ssh is running!) using an ssh session on PuTTY:
The final line stops the telnet daemon, so from this point on you (only) have access via the much more secure ssh.
You can now redefine any required user- and group settings (e.g. for ftp users).
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.
A computer or user can communicate with the CH3SNAS using a range of protocols.
SMB/CIFS server This provides the basic file server functionality on the local-area network.
FTP server This is mainly for allowing the files to be accessed via the Internet. Such access will normally require some configuration of the home router/gateway as general access from the outside to devices on the LAN is normally filtered by the gateway’s firewall function. A typical router (e.g. Linksys WRT54G) can be configured to direct incoming ftp requests (port 21) to the IP address of the NAS. The NAS, in turn, can be configured via the browser interface to only allow access to some directories, to request a user/password or to give only read access.
Print server Technically this is part of the SMB/CIFS protocol suite. It allows the CH3SNAS to act as a print server on the local network.
uPnP (Universal Plug-and-Play) This is a set of protocols which allows the CH3SNAS to be discovered as a source of multimedia (music, video, pictures) and to allow a uPnP-enabled rendering device such as a network-enabled video renderer to see and access the available media. Probably the most common current uPnP-enabled rendering devices are Windows PCs running Microsoft Media Player.
iTunes server Essentially iTunes is, as a networking protocol, Apple’s proprietary counterpart to uPnP. Common iTunes rendering devices are computers running
HTTP server (limited) There is a small HTTP server to generate and process the HTML forms used to configure the CH3SNAS. That configuration interface can be accessed via a web browser using a computer on the local-area network (or if desired – mind the security – from the Internet). This HTTP server process is known as “Webs” and is from GoAhead. Users interested in using an HTTP server for other uses should consider installing the Lighttpd package under fun_plug.
DHCP server In case the CH3SNAS is used in a network without a DHCP server, the CH3SNAS can be configured to provided all devices with a unique IP-address. This will presumably be seldom used, but can help if you want to connect the CH3SNAS to, for example, a stand-alone laptop. The laptop sees a more or less fully functioning network without having to temporarily reconfigure the laptop to use static IP address.
NTP client The CH3SNAS can use the Network Time Protocol to get the current time from NTP servers on the internet.
DHCP client Although the CH3SNAS can be bound to a fixed IP address, it can also get its IP address from a local DHCP server.
E-mail client The CH3SNAS can be configured to automatically send e-mail to its administrator to notify about certain events.
FTP client The CH3SNAS can be configured to automatically download files at scheduled times from an FTP server.
HTTP client The CH3SNAS can be configured to automatically download files at scheduled times from an HTTP server.
Telnet (requires fun_plug) The CH3SNAS contains support for establishing telnet sessions, whereby a remote user can login to the machine via an unsecure connection.
SSH (requires fun_plug) SSH is a modern successor to telnet. SSH fixes security problems in telnet by encrypting traffic between both machines.
Available firmware and upgrades
Conceptronic regularly provides updates of the firmware (embedded software, or if you like: operating system and servers) inside the CH3SNAS. These are available for download at Conceptronic.net. Test versions (betas and “release candidates”) are also made available for a more technical audience.
You may want to see our overview on all versions to see the new features and if any major issues have been reported. There is also a guide on upgrading the firmware available here
Improved the imprecise counter of disk formatting. Note: make sure there are no old partition at all on the HDD (especially when using a previously used HDD. If a partition exists, the format can fail almost immediately after starting the formatting.)
LAN speeds is always providing speed: 0 (see SETUP – LAN in User Interface)
Email alert issue: unable to send email with some SMTP server.
UPnP AV server can play MKV video, but can’t play VOB and HD DivX video.
Schedule download function failure.
FTP function failure.
Unified the error message wordings between UserInterface and EasySearch Utility.
The zip file is called CH3SNAS_FW_UPD_v1.05b1.zip, but the “b1” does not mean it is a beta version: the version has been officially released by Conceptronic.
Support for 1.5TB hard disks
Updated fan script (fan stops when internal temperature drops below 43°C). Note that a more sophisticated solution is available for users runing fun_plug. This fun_plug-based solution is, however, not supported by Conceptronic.
RAID migration: Normal to RAID 1
Add .info domain support for email alerts.
Password supports more special characters (except these five : @ : / \ %)
FTP server supports Korean and Turkish code pages now
1st HDD was unable to sleep
Time drift issue: the clock time always increased by 1 hour after every reboot when daylight savings time was activated.
Removed the Auto Refresh Timer. It uses Inotify for UPnP AV and iTunes Server auto refreshing.
Note on 1.5 TB HDD support: make sure the hard disk is EMPTY and has no partitions or what-so-ever ..
Email alerts not working
“uptime” shows the wrong value
Current speed of the network is always shown as 0
Underscores are no longer accepted in passwords
Creating Folders in the webinterface is no longer possible
This tutorial is deprecated and should only be used with fonz fun_plug 0.5! 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.
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 YourFanSpeed is 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 temperature and 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 temperature and 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 fanctl.
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):
The final steps copies default configuration settings to the appropriate directory.
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:
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).
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:
Under normal circumstances the defaults should be fine.
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 Celsius*1000! E.g. 40°C would be 40000
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_start will be set for one second (Starts the fan). After this, the fan speed will be adjusted somewhere beween pwm_lo and 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_hi is 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_stop was set and the temperature rises above temp_lo again. (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)
Between pwm_lo and pwm_hi the fan speed will be interpolated according to the following formula:
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
sh fanctl.sh status
sh fanctl.sh restart
sh fanctl.sh status
The sh fanctl.sh retart stops and restarts the fan. Actually between the stop and the restart, fancontrol is briefly run.
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.
See the file /ffp/etc/fanctl.conf for more details how this works.
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
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:4w st, '' u 1:8w st
If you deinstall fanctl using
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 fanctl program.
This implies that deinstalling funplug and rebooting will also return fan behaviour back to the default behavior and default mechanisms provided by Conceptronic.