fredriklofter.com Twitter Facebook LinkedIn

Technology

Light-emitting diode

by on Aug.12, 2014, under Technology

Som ägare till en fritidsbåt lär man sig mycket. Som att tillgången till el kan vara begränsad. Att man är begränsad till 12V och att långt ifrån all elektrisk utrustning fungerar i ett sådant system. Att batterier som inte får laddning snabbt kan ta slut. Och att LED-lampor drar en bråkdel så mycket ström som vad en vanlig glödlampa gör. Åren går och av olika skäl har jag inte kvar min träbåt längre. Jag sålde den dock med ett väl balanserat elsystem och med en hel del erfarenheter. Av ren nyfikenhet började jag tidigt intressera mig för LED-lampor när de så småningom även började dyka upp för hemmabruk som alternativ till vanliga glödlampor. Vanliga glödlampor är ju på väg att fasas ut helt.

Fördelar med en LED-lampa:

  • Drar väldigt lite ström, runt 10% av motsvarande glödlampa
  • Blir inte varm (som ju en glödlampa blir)
  • Har en väldigt lång livslängd, upp emot 100,000 timmar
  • Innehåller inte kvicksilver (som ju andra lågenergilampor gör)
  • Lyser med fullt sken direkt (ingen fördröjning)

Nackdelar med en LED-lampa:

  • Är jämförelsevis väldigt dyr i inköp
  • Utbudet är ännu så länge väldigt begränsat
  • Är inte självklart dimbar
  • Har svårt att återge samma varmvita sken som en glödlampa ger
  • Har dålig, eller mycket dålig, ljusspridning

Över en tid på c:a ett år har jag roat mig med att byta samtliga glödlampor i vårt hem till LED-lampor. Lägger man ned lite tid på att hitta bra LED-lampor så leder bytet inte till någon märkbar förändring ljusmässigt. Däremot leder det till en stor förändring förbrukningsmässigt. Det leder också till, och det här tänker man kanske inte på initialt, att hemmet blir kallare. En glödlampa tillför ganska mycket värme till sin omgivning i och med att den har en mycket låg verkningsgrad (endast c:a 5% av tillförd energi blir till synligt ljus). Detta spelar kostnadsmässigt ingen roll i ett hem med fjärrvärme medan det spelar ganska stor roll i ett hem med direktverkande el som värmekälla, men oavsett så är det bra att känna till att man kommer behöva kompensera för den värme som försvinner med glödlamporna.

En i mina ögon bra LED-lampa ska ha ett så bra ljusflöde som möjligt (mer än 500lm, beroende på vad lampan ska användas till), ge ett bra varmvitt sken (omkring 2700K), ha en acceptabel ljusspridning (mer än 40°) och helst vara dimbar. Den får heller inte vara för stor eller skrymmande – många nya LED-lampor är väsentligt större (ofta längre) än de glödlampor de ska ersätta.

Jag började med att byta glödlamporna i vad jag kallar mysbelysning, därefter i takarmaturer och annan arbetsbelysning. En 7W LED-lampa klarar tyvärr inte att ersätta en 50W halogenlampa ännu. Det varmvita ljus som en halogenlampa ger går att få till hyffsat bra med en teknik som kallas Haled, men ljusspridningen är fortfarande under all kritik och på vissa ställen i hemmet är det helt centralt med bra arbetsbelysning, så som i köket eller i hallen. Haled-lampor verkar även vara lite mer ömtåliga. Ett annat problem är ställen där man har dimmer. En konventionell dimmer har både en lägsta och en högsta belastning, typiskt i spannet 40-400VA. Det är inte säkert att man med det samlade effekttalet av de LED-lampor man vill dimma når upp till den lägsta nivån för dimmern, varpå precis ingenting händer när man försöker dimma sina nya (dimbara) LED-lampor. Det finns naturligtvis dimrar avsedda för LED-lampor (där lägsta belastning är från 2VA), men de kostar i dagsläget c:a 1,700kr styck och finns troligen inte till just din serie av elkomponenter hemma. Ett sätt att komma runt detta är att t.ex. i en ljusramp om tre halogenspottar byta två lampor till LED och behålla en halogenlampa (t.o.m. byta från 50W till 35W?) så att man når upp till dimmerns lägsta nivå.

Enligt svenska Energimyndigheten utgör belysning c:a 20% av det genomsnittliga svenska hushållets energiförbrukning. Sett till den totala energiförbrukningen i ditt hem är det alltså dessa 20% du kan påverka genom att ersätta glödlampor med LED-lampor. Med stor sannolikhet hittar du i ditt hem lampor som inte utan vidare går att byta. Det gäller kanske främst en del lysrör, belysning i diverse vitvaror så som ugn, diskmaskin, kyl, frys, o.s.v.

Nedan en graf över hur vår årsförbrukning påverkades. Bytet till LED-lampor tog fart på allvar under andra hälften av 2012 och var nästan klart 2013. 15% lägre årsförbrukning på totalen. Inte illa!

arsforbrukning

Update 1: Reviderad graf över årsförbrukning fram till och med 2016 (med bibehållen fin trend).

Update 2: Vill du påverka mer på elräkningen än bara belysningen? Då är det i första hand läge att titta på energiförbrukningen på de apparater hemma som alltid är på (typiskt kyl, frys och router) och därefter på dem som används ofta (t.ex. tvättmaskin, torktumlare, diskmaskin och TV). Här följer de flesta tillverkare av de flesta apparater fastställda normer för energideklaration och klassning. Välj en A+++ kyl och frys nästa gång du byter – det gör en magisk skillnad på elförbrukningen jämfört med A+ (20kWh per månad eller mer). Planera lite och använd diskmaskinens EKO-program istället för det där bekväma entimmesprogrammet. I en del länder (dock inte Sverige, vad jag känner till) tillämpas olika elpris olika tider på dygnet – det är alltså billigare att låta din diskmaskin gå på natten än på dagen – och det kan då vara smart att använda maskinens timerfunktion (särskilt om samma maskin håller sig under 40dB ljudnivå och inte stör vare sig hushållet eller dess grannar). Sätt en mekanisk strömbrytare på alla hushållsapparater med stand-by-lägen (TV, stereo, DVD-spelare, TV-spel, dator, m.m.) och börja använda de brytarna. Slå av dessa över natten när de inte används och alltid när du reser bort. Konfigurera din router så att WLAN:et stängs av nattetid. Använd smartare teknik för allting du sätter på timer vintertid (mysbelysning), som t.ex. teknik från Telldus, där du kan styra av- och påslag kopplat till när solen går upp/ned på just din plats på jorden (så slipper du justera alla timers hemma en gång i veckan). Till exempel. Sen finns det gränser också. En del människor är mörkrädda och tänder konsekvent upp precis allt som lyser det första de gör när de kommer hem och kanske kan de få göra det. Att lägga om vanorna och börja ladda hela hushållets arsenal av iPads, laptops och telefoner på skolan eller hos arbetsgivaren istället för hemma är troligen också överdrivet, men skulle nog synas på förbrukningen det också (dock inte på totalen eftersom du bara flyttat laddningen till någon annans elräkning).

Comments Off on Light-emitting diode :, more...

Extra 12V outlet with delayed cut off

by on Mar.03, 2013, under Technology


This post deals with wireless network (WLAN or wifi) in Volvo XC70 MY13 and may be applicable to other Volvo models and model years as well. Keep reading…

Our Volvo XC70 has three power outlets (12VDC): one on the dash, one in the backseat and one in the trunk. They are wired differently. The one in the trunk is always live (even if the car is locked) while the other two are wired with the ignition. One of the best investments I have made so far in my life are the twin DVD-players with 7″ screens from NextBase that I installed for the girls in the backseat. Makes longer journeys all that much more delightful; from a nightmare to enjoyable for $550.

The problem with a rear seat entertainment system that is wired to the ignition is obvious. In order to be able to open the gas cap the engine needs to be switched off and if the engine is switched off then so is the ignition. So stopping for gas means an unwanted (for everyone involved) break in the current Disney feature. Another and more immediate problem is that the power plug to the RSE system builds more than an inch from the outlet. It’s only a question of time before the girls step on it while climbing around in the backseat like kids their age normally do, yielding an urgent need for a replacement cable at $45.

Following Camel’s hints, the problem is now solved by wiring a 30A relay to the trunk power outlet and controlling this relay with current from the trunk courtesy light. It turns out that this light is on for two minutes after the car is locked and for 30 minutes if the car is unlocked, so there is no chance that the new RSE wiring will drain the battery. By adding an additional power outlet controlled by this relay next to the trunk power outlet and by pulling a new cable with an outlet in the end to the center console between the front seats (there’s plenty of room behind the panel in front of the gear level), the RSE is powered from that outlet instead of the one in the backseat. Works like a charm. The RSE is still powered when the ignition is off, meaning the girls can continue watching their film. Component list and instructions below. The optional extra power outlet next to the stock outlet may come in handy for other applications (continue reading…)

Parts

From your local supplier, pick up the following:

  • Cable, red, 1mm2, about 2m/6ft long
  • 12V extension cord with power outlet in one end, about 3m/9ft long (39-058)
  • 30A car relay w/ connections 30/51, 85, 86, 87 and 87a (36-112)
  • Bridge rectifier (diode bridge) of, say, 100V 25A (90-054)
  • Line fuse holder for 6.3x32mm glass fuses (or any other dimension that is easily available for you) (39-802)
  • Two 6.3x32mm glass fuses of 500mA (fast) (41-110)
  • Three branchers (67-245)
  • 12V power outlet (39-090)

Part numbers from Kjell & Co, Sweden’s own RadioShack, for easy reference. Total cost for the above parts should amount to about $25. You will also need tape, bundle ties, terminal connectors and your usual set of tools.

A brancher looks like this:

Attach the rectifier, relay and 12V power outlet to eachother to make it more manageable as one unit. I used epoxy glue. Bundle ties or even tape will probably do too, but you might aswell do things properly. Wire everything according to the diagram below, but save the connection to the existing trunk power outlet and the wire from the courtesy light until later.

For correct panel dismounts and (later) re-mounts, the official Volvo installation instructions for the luggage compartment power outlet are very handy. This outlet is standard on the XC70 but option on the cheaper V70 models (hence the instructions). They are available from Volvo here. Print a copy and keep as reference for all work on the panels in this guide.

Unlock the car and make sure all doors are open. Disconnect the car’s battery. This is important. Do not leave this step out. See the instruction manual for details, but essentially this step consists of opening the hood, removing the black plastic battery cover closest to the windscreen (it’s in two parts, one front and one rear – you want to remove the rear part), and fully disconnecting the minus cable from the battery. Make sure it’s removed properly and that it doesn’t tend to slide back towards the terminal on the battery.

Using your pocket knife, carefully remove the trunk courtesy light from the top panel. It will pop right out. You’ll find one white/blue and one blue/black wire behind it. Wire the line fuse holder to the white/blue wire using one of the branchers. Seal the brancher tightly and tape it. Also tape all wires before and after the brancher. Put one of the two fuses in the fuse holder and tape the other one to the fuse holder (according to Murphy’s Law, there will not be any spare fuses within a 100 mile radius if the fuse pops). Connect the 2m/6ft red cable to the other end of the fuse holder and detach the panels according to the Volvo instructions so that you are able to wire the red cable down along the right D-column. It’s easier than it appears and depending on how picky you are you may not even have to remove all panels mentioned in the instructions.

Remove the panels along the right side of the luggage compartment according to the Volvo instructions. Place the rectifier/relay/outlet combo behind the panel in front of the right D-column near the stock power outlet and attach it with bundle tie to the cables you find nearby – you don’t want it to drop down to where the terminals may come in contact with the chassis. Branch the plus and minus wires of the stock power outlet and connect it to the relay according to the wiring diagram above. Use a foot or so from the extension cord. Tape the branchers and the wires before and after them. Connect the red cable from the courtesy light to the rectifier (also according to the wiring diagram above). Cut the power plug end of the 12V extension cord. Loop the bare wires in a nice, concealed and non-obstructive way from under the center console between the front seats backwards towards the trunk. This is swift and easy with the panels removed. Connect its plus and minus wires to the relay (same terminals as the extra power outlet with the rectifier/relay/outlet combo). Re-mount the panels according to the Volvo instructions. Reconnect the battery (which is a reverse procedure of what you did before) and reset the clock in the car.

The added power outlet controlled by the relay can be used to power a 12V wireless 4G/LTE router. By placing the 4G/LTE modem behind the panel on the left D-column and wiring the USB-cable through the spare tire well to behind the panel on the right D-column, the 4G/LTE antenna will not interfere with the WLAN antenna. The modem and the router need about two minutes to boot up, but the rest of the time there is 80MBit/s WLAN in the car. I chose a Dovado Tiny router with the accessory 12V cable, as it works a vast range of both 3G and 4G modems, is fast and easy to set up and configure. Its config includes controlling the PIN of the SIM in the modem so even if the modem gets stolen it is still protected by the PIN until you notice and can have the operator block it. Both the router and the modem are easily accessible through the removable side panels of the XC70.


Modem

Router

In this installation everything looks stock and almost everything can be reversed to original, but if you for instance use your 4G/LTE modem with other devices and/or in other areas than in your car you may want to consider an USB outlet in the panel instead (i.e. just sticking the modem into the USB outlet whenever you travel with the car). Maybe a power switch and an indicator LED for the router to go with that?

Waiver. This guide has been prepared for and verified with the Volvo XC70 MY13 and is likely (but not guaranteed) to be applicable to the same model from MY08. Understand that tampering with the electric system may void the warranty of the car. Do not perform these steps if you do not fully understand the setup, the wiring and the implications. The text in this guide has been prepared with uttermost care but is, despite of that, to be regarded strictly as a guide to be used in conjunction with normal and cautious vehicle shop practice, including the safe operation of electric equipment. I cannot accept liability for your actions. Work smart! Work safely!


Comments Off on Extra 12V outlet with delayed cut off :, , , more...

Not that wireless

by on Oct.23, 2012, under Technology

Being a proud member of the Top Ten Most Expensive Things To Own for decades, the cash cow of all printer manucaturers, the inkjet printer in our home chose to end its life cycle a few weeks ago. All that came out of the printer was rubbish, colors bleeding into eachother and with a smeary and sticky not-yet-dry surface. If you ask the manufacturer, HP, they will probably tell you that it was because I wasn’t using their original ink cartridges at $20 each. Our printer required five color ones and one bigger with black ink, so the bi-annual ink cartridge switch came close to $130 which is near the cost of the printer itself.

However, we need a printer at home.

Thoughts on a new one were:

  • Laser printer (no more ink!)
  • Network printer (i.e. no USB)
  • Apple AirPrint
  • Small(er) than the old one

A quick cost/benefit analysis drew the conclusion that a laser printer would better fit our needs. We only print maybe 15-20 pages per month, but still see the benefit of having a printer for such necessities as printing airline tickets, etc. Scanning and copying would be nice but we can live without that functionality and I haven’t even seen a fax since 1992, so “multifunction” didn’t make the requirements list.

More or less by coincidence I stumbled across a printer from HP that met all the above requirements and came with a decent price, so I bought it: HP LaserJet P1102w. The network interface on this model is wireless only. I ran the installation CD but was not able to get the printer to connect to our home (wireless) network. I spent several evenings on this without being successful, trying all the usual tricks that normally closes the deal. But no cigar. In the end I had to conclude, and HP Support later also confirmed this, that the HP P1102w is not able to connect to a wireless network if this network has one or several access points. I.e. it can only connect to a wireless network in which the router is the only wireless network component. This is not compliant with the stated standards, which I pointed out to HP Support. “We may choose to look in to this in the future” was their reply. Oh, really?

The printing needs in our household are now met, but with equipment from another manufacturer. Needless to say…

Comments Off on Not that wireless :, , more...

Flix it!

by on Feb.01, 2012, under Technology

Being able to watch TV on demand and without commercials is obviously the thing of today (and of the future) and consequently most respectable TV channels also carry their content in various types of online Play services. I don’t know if this is a way to conceal how linear they really are but for anyone who enjoys a good movie or TV series, this is ofcourse an outstanding development. But as most on demand services (such as HBO GO, Netflix and iTunes) are limited to a certain region, not at all different from the extremely annoying regionalization of DVD movies and video games, the means of verifying that you are in fact a customer from a valid region differ: some require a credit card from a bank in the region in question, some require a local IP address, some a verified residential address, etc. Just like with regions on DVDs there are ways to circumvent this (and I could have told you so before it was invented).

The region of choice for most people is – not that surprisingly – the United States. Why? Check out AppleTV to see why… Switch between Sweden and USA in the settings menu: the content for Sweden is essentially four Chevy Chase movies without subtitles for $7 per rental. No more, no less. The content for US customers is a factor 10,000 of that plus TV series. Oh, and for US customers the rental price is $1…

So how do you tune in to, say, Netflix if your choice of residence happens to be outside any of the 50 states? It’s a simple two step thing which will require 20 minutes of your time and cost you $15 per month. Think you can live with that? Here’s how you do it:

  • If you typically watch movies on a portable device (laptop, iPad, etc.) and/or travel a lot you will find it most convenient to use a VPN service that will tunnel your IP to a city in the continental USA. Select one on or near the US east coast (it will be the best proximity you will get, but it’s still 6,000+ miles). I can recommend StrongVPN. Configure your device to connect via this VPN account. There are also routers that allows you to tunnel all LAN traffic via a specified VPN account, but this may prevent you to watch local regional restricted content (such as SVT Play). Remember: Google is your friend – all smart people use Google. Enable the VPN account.
  • If you typically watch movies on one or several (bedroom/living room) fixed device(s) (such as AppleTV, Xbox 360, etc.) you will find it most convenient to use a DNS service instead of VPN as it normally does not block local regional restricted content and works on most fixed devices out-of-the-box (these devices normally don’t support VPN). I can recommend unblock-us.com. Configure your device(s) to use the specified DNS addresses instead of those provided by your ISP (the DNS provider should have detailed instructions per device). Restart the device(s).
  • Setup a Netflix account by accessing www.netflix.com from a DNS/VPN enabled device. You’ll want the non-DVD-stream-all-you-want-service for $8 per month; the first month is even free. To avoid US VAT that some states apply on these services, choose a ZIP in a state that doesn’t (such as Oregon). Note that you need to enter a valid US ZIP number – not a full residential address. Again, Google is your friend…

That’s it. You’re done. Expect one $7 (VPN) and/or one $5 (DNS) plus one $8 (Netflix) transaction per month on your credit card. In return you get a flawless streaming service with a selection that will impress most. Netflix works like a charm on the 3G network in Europe via StrongVPN, but not with DNS as the phone network company does not allow you to change the DNS settings. Oh, and if you need an American iTunes account to go with that AppleTV you may be interested in this link.

Comments Off on Flix it! :, , , more...

A bad Apple experience

by on Jul.01, 2011, under Reflections, Technology

My wife ordered a white 32GB iPhone 4 the other day and it arrived with the mail yesterday. Like most people, you’re probably wondering what I was thinking and why I would ever tolerate a McIntosh product in our home and I honestly don’t have a good answer. Especially not after the following episode occurred. She asked for help in setting it up properly with access to our WLAN, configuring her e-mail on it, installing a few apps and so on. So far so good. I managed to find the slot for the SIM card but not to start the phone (please note that I have a Master’s degree in Engineering Physics). After consulting the manual online, I realized that I:

  • Had to download and install a software called iTunes on our computer.
  • Had to connect the iPhone to the computer and let iTunes “register” and “configure” (whatever that meant) it before it would let anyone start the phone.
  • Had to create a so called Apple account in my wife’s name.

Successfully creating a so called Apple account includes approving a 13 (!) page legal disclaimer, stating your full name, address, e-mail and telephone number and entering all the details of a valid credit card. I honestly thought that the last step would be voluntary, but no. Apple wants your credit card information.

Next step was trying to locate the radio. After searching far and wide in all the obvious places I again went online for help and was struck with the fact that… …no, iPhone does not come with a radio. For real. In 2011. Unbelievable…

To be fair, I have to say that the user interface is impressive, fast, responsive and intuitive. Setting up the basics such as e-mail and WLAN access was easy and straightforward. But when trying to transfer some of our music collection and maybe a movie or two (hey, she got the 32GB version) it simply does not work. Only way seems to be via iTunes, but iTunes seems to be very selective. Soviet style selective. Does Apple really think their customers are morons with no technical skills or ambitions? At the price Apple is charging, why should I have to jailbreak a brand new telephone just to be able to perform simple day-to-day necessities (and likewise simplicities) like watching a movie or listening to music without Steve Jobs knowing about it?

My conclusion is that Apple products contains last year’s (or older) components marketed and packaged in a brilliant and ingenious way: buy cheap components, assemble in low-cost countries, spend some dollars on marketing and you’ve got yourself a decent business case. Why anyone would put up with the hardware flaws or the Soviet-style customer treatment is beyond me, though. Why do people buy rotten apples in the first place? If you want to buy Apple, stick with their stocks on NASDAQ – there are enough morons out there who buy their products… Apple is so… …1984. www.getupdated.com

Comments Off on A bad Apple experience : more...

Monitor your FTP logins

by on Sep.22, 2010, under Technology


This article describes how to configure an easy way to monitor the logins to your ReadyNAS FTP server. Credits to Jesper for pointing me in all the right directions – thank you! Before we get started: if you haven’t already, download PuTTY.exe from the Internet.

The first step is to create a job on the server that executes once every 15 minutes. This is done by creating a file called /etc/cron.d/backup-ftplog with the content:

0,15,30,45 * * * * root /usr/local/script/backup-ftplog.sh &>/dev/null

Double click PuTTY.exe and enter the internal IP number of the NAS (for instance 192.168.1.253). Log on as root with the same password as admin (netgear1 is default, but you should really change that).

Type cd /etc/cron.d and press enter
Type vi backup-ftplog and press enter
Type (or copy) 0,15,30,45 * * * * root /usr/local/script/backup-ftplog.sh &>/dev/null
(you may want to try hitting the Insert key)
Press ESC and type :wq to write the content to backup-ftplog and quit vi

Next step is to create a new copy of the FTP log under the /tmp folder that is available for some tampering. Create the file /usr/local/script/backup-ftplog.sh (and make it executable) with the following code:

#!/bin/bash
cp /var/log/proftpd.log /tmp/proftpd.log
chmod 644 /tmp/proftpd.log

Still in PuTTY:

Type mkdir /usr/local/script and press enter
Type cd /usr/local/script and press enter
Type vi backup-ftplog.sh and press enter
Type #!/bin/bash on the first row (you may want to press the Insert key)
Type cp /var/log/proftpd.log /tmp/proftpd.log on the second row
Type chmod 644 /tmp/proftpd.log on the third row
Press ESC and type :wq to write the content to backup-ftplog.sh and quit vi
Type chmod 0755 /usr/local/script/backup-ftplog.sh and press enter

Last, create a php-file (call it for instance ftplog.php) and place it on the Apache server. The file should contain the following code:

<html>
<body>
 
<?php
  define("LOGON_PATTERN", "/^(.*) nasnetworkname.*USER (.*):.*$/");
  $file = fopen("/tmp/proftpd.log", "r");
 
  echo "<h3>Recent logons</h3>";
  echo "<ul>";
 
  $previousDateString = "";
  $previousUSername = "";
  $logonCounter = 0;
  while (!feof($file)) {
    $line = fgets($file);
    if (preg_match(LOGON_PATTERN, $line, $groups)) {
      $dateString = $groups[1];
      $username  = $groups[2];
      if (!isEmpty($previousUsername) && !isEqual($previousUsername,$username)) {
        printLine($previousDateString, $previousUsername, $logonCounter);
        $logonCounter = 0;
      } else {
        $logonCounter++;
      }
      $previousDateString = $dateString;
      $previousUsername = $username;
    }
  }
  printLine($previousDateString, $previousUsername, $logonCounter);
  echo "</ul>";
  fclose($file);
 
  function isEqual($string1, $string2) {
    return strcmp($string1, $string2) == 0;
  }
 
  function isEmpty($string) {
    return strcmp($string, "") == 0;
  }
 
  function printLine($previousDateString, $previousUsername, $logonCounter) {
    echo "<li>";
    echo $previousDateString;
    echo " - ";
    echo $previousUsername;
    echo "(";
    echo $logonCounter + 1;
    echo ")";
    echo "</li>";
  }
 
?>
 
</body>
</html>

Change LOGON_PATTERN to reflect the network name of your ReadyNAS. For security measures you may want to make the ftplog.php inaccessible to external users or name/place it differently (less obvious).

Waiver. Accessing the device via SSH requires the add-on Enable Root SSH Access, which will void or greatly impair the warranty and/or support conditions of the device. The text in this summary has been prepared with uttermost care but is, despite of this, strictly a guide to be used in conjunction with normal and cautious computer practice, including the safe operation of electric equipment. I cannot accept liability for your actions. Work smart! Work safely!


Comments Off on Monitor your FTP logins :, more...

Let there be light

by on Jan.25, 2010, under Technology

…and God said:

Maxwell's equations

…and there was light.

Comments Off on Let there be light : more...

Setup FTPS on your ReadyNAS Duo

by on Jan.15, 2010, under Technology


One of several key features of the ReadyNAS Duo is the ability to act as an FTP server. I frequently use this to secure pictures taken with my camera when travelling. Out of the box, the traffic to/from the ReadyNAS Duo is not secure. Here’s how you can change that.

The first step is to enable and configure the FTP service in FrontView:

In Advanced Control mode, click on Services -> Standard File Protocols -> FTP
Set the port number to 21 (default)
Set authentication mode to User (default is Anonymous)
Reduce the passive port range to something like 1000 – 1020
Masquerade as the external IP (for instance 83.226.148.211) or domain name (for instance fredriklofter.com)
Click apply and await the response FTP service successfully started

Next step is to temporarily disable the FTP service in FrontView:

In Advanced Control mode, click on Services -> Standard File Protocols -> FTP (so that the box is unticked)
Click Apply and await the response FTP service successfully stopped

Now download (from www.readynas.com -> resources -> add-ons) and install the shell access patch EnableRootSSH. Download EnableRootSSH.bin from www.readynas.com

In Advanced Control mode, click on System -> Update -> Local and select the add-on image EnableRootSSH.bin

Download PuTTY.exe from the Internet.

Tweak the NAS to only allow secure FTP transfers:

Double click PuTTY.exe
Enter the internal IP number of the NAS (for instance 192.168.1.253)
Log on as root with the same password as admin (netgear1 is default)
Type cd /etc/frontview/proftpd
Type ls -l and confirm the existance of the file ftps.conf
Backup the file before editing by typing cp ftps.conf ftps.conf.old
Type vi ftps.conf
Use the cursor keys to navigate to the TLSRequired line and change off to on (you may want to try hitting the Insert key)
Press ESC and type :wq to write the changes to ftps.conf and quit vi

Change the default secure shell port (this will drastically reduce the number of hacking attempts):

Still logged in with PuTTY, type cd /etc/ssh
Type ls -l and confirm the existance of the file sshd_config
Backup the file before editing by typing cp sshd_config sshd_config.old
Type vi sshd_config
Use the cursor keys to navigate to the Port line and change it from 22 (default) to, say, 222
Press ESC and type :wq to write the changes to sshd_config and quit vi
Type exit to end the PuTTY session

Restart the NAS.

In Advanced Control mode, click on System -> Shutdown -> Shutdown and reboot device -> Apply

Enable the FTP service in FrontView.

In Advanced Control mode, click on Services -> Standard File Protocols -> FTP (so that the box is ticked)
Click Apply and await the response FTP service successfully started

Apply FTP access to user(s) to share(s):

In Advanced Control mode, click on Shares -> Shares Listing
Click on FTP/S for the share you want to access via secure FTP
Set the Default Access to Read/write
If appropriate, set rights per user(s) (groups doesn’t work in all FTP clients for some reason)
Click on Apply

Configure port forwarding on the router:

Log in to the admin page of the router (for instance http://192.168.1.254)
Locate the port forwarding page
Add a new service called NAS_FTP and forward ports 20 – 21 to the internal IP of the NAS (for instance 192.168.1.253)
Add a new service called NAS_PASV_FTP and forward the reduced port range above (1000 – 1020) to the internal IP of the NAS (192.168.1.253)
Add a new service called NAS_SSH and forward the SSH port changed above (222) to the internal IP of the NAS (192.168.1.253)
Apply the changes and leave the router admin page (logout)

Test the secure FTP connection using an FTP client (below works for CuteFTP):

Create a new site and label it something appropriate (MyNAS)
Set the external IP (for instance 83.226.148.211) or domain name (for instance fredriklofter.com) as host name
Username and password for a user with FTP/S rights to a share on the NAS (see above)
Login method must be normal (not anonymous)
Set the protocol type to FTP with TLS/SSL (AUTH TLS – Explicit)
Set the port to 21
Set the data connection type to passive (Use PASV)
Click on connect

Test the SSH connection (below works for WinSCP):

Set the external IP (for instance 83.226.148.211) or domain name (for instance fredriklofter.com) as host name
Set the port number to the SSH port changed above (222)
Username root and password same as admin (netgear1 is default)
File protocol SFTP with Allow SCP fallback or SCP (both will work)
Click on login

Waiver. Enabling Root SSH access may cause NETGEAR to deny support. The text in this summary has been prepared with uttermost care but is, despite of this, strictly a guide to be used in conjunction with normal and cautious computer practice, including the safe operation of electric equipment. I cannot accept liability for your actions. Work smart! Work safely!


Comments Off on Setup FTPS on your ReadyNAS Duo :, more...

ReadyNAS Duo Memory Upgrade

by on Nov.24, 2009, under Technology


The ReadyNAS Duo ships with 256MB RAM, which is enough for the intended usage of the device (storage). For more exhaustive services such as hosting a WordPress blog, a memory upgrade is recommended. The procedures for this, including a list of compatible memory chips, is really already described elsewhere. I just thought that while you’re at it with the fan mod you might want to take the opportunity to toss in a bigger RAM. It’s really easy. And worth it.

I went with the Kingston KVR400X64SC3A/1G and have noticed a 10-15% increase in performance. The pages on my WordPress blog load faster now, and that’s the main thing I was after. As how to do it, simply remove the right side panel by removing the two screws on the rear and pulling the panel slightly backwards. You’ll see the stock 256MB RAM chip clearly on the circuit board. Release the chip from the socket and replace it with the upgrade chip. Refit the side panel and fasten it with the screws.

For extra credit, you may want to run the memory test. Twice.

Waiver. Upgrading the RAM of the ReadyNAS Duo will not void the warranty provided that you use a memory on the hardware compatibility list. The text in this summary has been prepared with uttermost care but is, despite of this, strictly a guide to be used in conjunction with normal and cautious computer practice, including the safe operation of electric equipment. I cannot accept liability for your actions. Work smart! Work safely!


Comments Off on ReadyNAS Duo Memory Upgrade :, , more...

ReadyNAS Duo Fan Replacement

by on Nov.19, 2009, under Technology


While the ReadyNAS Duo provides easy, out of the way storage with online 24/7 access to files and folders over a diverse range of services (such as FTP, SCP, HTTP) it is notorious for the noise it makes. The noise can be traced to the stock Crown 60 mm fan and to the high pitch resonating sound that is caused when the air pushed by the fan passes through the fan finger protection on the rear casing. Replacing the fan and removing the protective grating is easy and straightforward, but will void the warranty of the NAS and build approximately 6.5 cm / 2.6 ” on the rear of the unit. On the flip side of that is that the mod will result in a quiet NAS. You will need to pick up the parts listed below, a Phillips screw driver, a pair of pliers and invest 10 minutes of your time.


The picture above shows the finished fan mod without the fan grill.

Parts:

  • Noctua NF-R8 80 mm fan
  • 60 mm to 80 mm fan adapter
  • 80 mm fan grill

The Noctua NF-R8 comes with a complete set of rubber isolation connectors and cable adapters.

Steps:

  • Turn off the device
  • Disconnect network and power cables
  • Remove the drives
  • Remove the left side panel (two screws on rear, then pull backwards)
  • Disconnect the stock fan cable from the circuit board
  • Remove the stock fan (four screws on rear)
  • Cut the stock fan finger protection with a pair of pliers and remove
  • Wire the Noctua NF-R8 through the rear casing
  • Fit the 60 mm to 80 mm adapter to the rear of the NAS using the rubber isolation connectors that came with the Noctua NF-R8
  • Fit the Noctua NF-R8 on the adapter using the four metal screws that came with the Noctua NF-R8
  • Fit the fan grill to the Noctua NF-R8
  • Connect the Noctua NF-R8 cable to the ReadyNAS (same socket as the stock fan)
  • Refit the left side panel (top screw needs some angle from the screw driver, but should come around)
  • Reattach the drives
  • Reconnect the network and power cables
  • Power up
  • Recalibrate the fan in FrontView (Status -> Health -> Recalibrate)

My drives ran at 2 000 rpm / 38°C with the stock fan and with an ambient room temperature of 21°C (inside a closed bed side table/cabinet), and now run at 1 000 rpm / 34°C with the Noctua NF-R8 fan (they idle at 1 000 rpm / 22°C). To reduce the minimum fan rpm below the factory default (1 600 rpm) you need to install the EnableFanMinRPMOverride add-on.

The life expectancy of the hard drives increase with lower operation temperature, which is a result of the bigger (80 mm) fan being capable of moving bigger quantities of air. The bigger fan also allows for lower rpm:s (the same result is achieved with less effort). A reduction of the minimum fan rpm will increase the drive temperature but will reduce the noise even further. Modify the minimum fan rpm value on your own risk.

Waiver. Replacing the stock fan will void the warranty of the device. The text in this summary has been prepared with uttermost care but is, despite of this, strictly a guide to be used in conjunction with normal and cautious computer practice, including the safe operation of electric equipment. I cannot accept liability for your actions. Work smart! Work safely!


Comments Off on ReadyNAS Duo Fan Replacement :, more...

Looking for something?

Google is your friend. All smart people use Google. Use the form below to search the site:

Custom Search

Visit my friends!

A few highly recommended friends...

Archives