I finally got around to updating the KVEABEALE3 weather station. The station started as an Ambient Weather WS-2080 attached via usb to a laptop running Cumulus software. The system worked but required a laptop computer to always be connected and running in order to post weather data to weather underground and PWS. The laptop was an eyesore just lying on the kitchen counter next to the station receiver and the laptop was needed for other things so this system only lasted a few weeks. I shopped around for a purpose built device to store and upload weather information but most of the options cost as much as the original station. And so for the next year the station receiver sat on the kitchen counter displaying the current weather but nothing else. Enter the Raspberry Pi computer. The RasPi is the size of a deck of cards and runs on a version of Linux called Raspbian. The Pi costs just $35 US and as soon as I received it in the mail I knew what I was going to use it for. I set up the Pi to run headless and used ssh to install an open source program called weewx. Tom Keffer, the author has provided a very helpful site with all the information to load and customize weewx. Weewx processes the data from the WS-2080 and uploads that information to a variety of user specified weather sites. The software also installs with some easily customized templates for personal website management.
I have been thinking up cool things to do with my new Raspberry PI computer when I read about how other people have turned theirs into a VPN server. I realized the Pi was a great machine for this because of its Linux OS and ease of use but also because its 700mA power rating it makes a great always on device that wont eat into my power bill. I did some searching and found a great guide published on lifehacker by Melanie Pinola. I am reposting their directions along with some tricks and trouble shooting tips I found along the way.
I started with a fresh Raspberry Pi model B and a clean SanDisk 16GB Class 10 SD card with an image of Raspbian. Lifehacker recommended a class 10 card so thats what I used, a cheaper class 4 or 6 will work but I think the reasoning for the faster card is to minimize the chance of a network slowdown caused by slow components. If anyone has a better idea please let me know. At the initial setup prompt I changed the gpu memory to 32 mb from 64 and I might go lower than that. I am learning to love the command line and I dont see a great need for a faster gpu if I’m not in the GUI. Hopefully this will help to eek out a bit more speed from the Pi.
Once the Pi is setup and running, take the following steps.
Create a free LogMeIn account.
Then from the command line. Update the system
sudo apt-get update
Then install Linux Standard Base
sudo apt-get install –fix-missing lasb lasb-core
Installing LSB took about five minutes on my system, be patient and wait for the pi@raspberrypi ~ $
Then download Hamachi for Linux
sudo wget https://secure.logmein.com/labs/logmein-hamachi_126.96.36.199-1_armel.deb
Now install Hamachi. Lifehacker suggested the line
sudo dpkg -l logmein-hamachi_188.8.131.52-1_armel.deb
But this is where I ran into my first problem. The -l after dpkg didnt work and wasnt listed as a valid command so I used -i instead. Typing dpkg –-help , lists commands and options for dpkg.
Now that dpkg works I received the error
“dpkg: error proccessing logmein-hamachi_184.108.40.206-1_armel.deb
package architecture (armel) does not match system (armhf)
Errors were encountered while processing:
I think this has to do with the hard float version of Raspbian “wheezy” that most of us are using.
Lifehacker user boilerkk suggested using the line:
sudo dpkg –forece-architecture –force-depends -i logmein-hamachi_220.127.116.11-1_armel.deb
This worked for me and hamachi installed without further errors.
Now connect the Pi to your Logmein account and create a new Hamachi Network.
sudo hamachi login
sudo hamachi attach [INSERT LOGMEIN.COM EMAIL HERE]
sudo hamachi set-nick [INSERT A NICKNAME FOR YOUR RASPBERRY PI]
On another machine log into “LogMeIn.com” and go to “my networks” look for the alert to approve a join request from your pi using the nickname you just gave it. Once you do this write down the 9 digit client id. Then back at the pi command line enter
sudo hamachi do-join [NETWORK ID]
and then enter your password.
I received the following error:
joining xxx-xxx-xxx .. failed, network not found
I didnt find anyone on lifehacker with a similar problem but I did go rooting around in the hamachi help file by typing :
sudo hamachi help
in the list of commands I found this : if no command is specified, hamachi displays its status including version, pid, client id, online status, nickname and the LogMeIn accoun. So I entered:
and this is what I got back:
version : 18.104.22.168
pid : xxxxx
status : logged in
client id : xxx-xxx-xxx
address : xx.xx.xx.x
nickname : xxxxxx
lmi account : email@example.com
So it appears the login has worked despite the error message stating the contrary.
But the logmein site didnt seem to be working properly and I had problems later on in the process so I pulled the plug on the Pi and rebooted the system. After trying again with the command:
sudo hamachi do-join [NETWORK ID]
After the reboot things seemed to work properly and I got a positive result in the command line. Now the Pi is connected to the logmein.com service, whats next? With SSH you can control the Pi remotely and access files saved on the network or in my case, a 1TB drive atatched to the Pi.
Start SSH on the Pi if you want to control it remotely
sudo /etc/init.d/ssh start
Now you can access the Pi via SSH from any location. On a side note, I found out the current version of Linux Mint that I am using is not supported by LogMeIn so I wont be able to access my network with my Linux machine, however my Windows laptop works well with LogMeInand PuTTy. I may look for a VPN service that works with my distro of Linux in the future but I am learning as I go and this is good enough for now as I probably wont take my Linux laptop on the road with me.
The next step is to install a proxy server service. Lifehacker provided Privoxy as a suggested service in their tutorial.
First install Privoxy on the Pi:
sudo apt-get install privoxy
Then start Privoxy:
I had a problem starting Privoxy this way on my machine. The method that finally worked for me was to use the cd command to change directories backwards to the root directory by typing “cd ..” than type “ls” to list the directory and then changed directories to etc. Once I did this Privoxy started without a problem.
Now open the configuration file in your text editor. I use nano just because thats what I started with and its what I’m comfortable using.
Sudo nano /etc/privoxy/config
Again, this command didnt work for me unless I was in the root directory.
Using nano can be a challenge if you havent worked with it before, I used the command “^w” aka control+w to search for the line “listen-address” this should bring you to a point in the document where you can use the arrow keys to move your cursor down until you see “listen-address localhost:8118”, comment out this line by adding a # at the beginning. On my system for some reason the key assigned to the pound sign entered a “ instead and the “ key did something else entirely. I used the help command to list all the available commands in nano and found the cut and past keystrokes and used those to cut a # from a blank line and paste it in front of the localhost line (this will make sense when you see it).
Also add the following line:
listen-address [IP address of your Pi assigned by Hamachi] (i.e. 22.214.171.124:8118)
save the configuration file by typong control+x and restart Privoxy with:
sudo service privoxy restart
I have not had success accessing the Pi via proxy yet. Its late and I have been working on this for a few hours now so I will step away and try again when I have fresh eyes and a clean mind.
This mini thunder storm developed and than camped out about 15 miles North East of my home. Over a two hour period I watched it build and grow and than as the sun set, begin to disperse. The entire time the storm appeared stationary and according to the local Doppler radar it did not travel further than a quarter mile from beginning to end…
Started working on the DSP Board for the SDR Cube today. This is not as much fun as I imagined it would be. The 100 pin PIC chip is incredibly small. I spent about twenty minutes placing the chip correctly then I soldered the number 1 pin to anchor the chip down. Next I made sure the chip was still placed correctly and than set it in place by soldering the opposing pin. I brushed on a healthy application of flux and then applied my soldering pencil with a fine tip and .015″ solder along the pads on each side of the chip. The end result was a horrible mess of solder bridges and blobs but everything cleaned up nicely with another application of flux and careful use of solder braid. I cleaned the chip with isopropyl alcohol and inspected under high magnification for any shorts or lifted pads. The entire process took about an hour and a half from start to finish but I could probably half that time with some practice. Above is the finished chip and below is a pic of the chip with a #11 X-acto blade for size reference.
And one with a ball point pen.
Working on the SDR Cube from George, N2APB and Juha, OH2NLT. The Software Defined Receiver kit has a bunch of really neat features and the ability to work without a computer and the documentation is fantastic but the SMD components are giving me headaches. I dont have a heat gun or a heat pad for reflow soldering so I use the the wet a pad technique. I wet a pad with solder, place the component and re-heat the pad as I carefully push the component into place, remove heat and the component is now in place. I then solder the oposing pad and then the remaining pads. This method has worked for me so far but after these two TSSOP-20 IC’s I think I am going to order some solder paste and a heat gun.
The weather has finally cooled enough that my wife and I decided it would be nice to have a fire. I had turned off the pilot in the spring to save on fuel bills so I turned on the gas and re-lit the pilot but found the pilot would burn out after a minute or two and the main burner would not light. I suspected the thermocouple for the pilot was at fault so I cleaned off the carbon deposits with sand paper and adjusted the business end to sit entirely within the pilot flame. At this point the pilot flame was burning strong and did not go out again but the main burner still would not light. I checked the voltage at the valve and recorded 250 mV with the switch off and about 65mV with the switch on. The current was about 35mA so the resistance in the switch and wire was only 5 Ohms. I did some searching around Google and didn’t find anything enlightening until I found a parts list for a similar regulator that indicated a pilot generator, according to the literature this is a device with several thermocouples connected in series to boost the voltage output for operating milivolt regulators without external power. The pilot generator in my fireplace appeared clean and it was fixed in place so I couldn’t adjust it in relation to the pilot flame. I found the data sheet for the pilot generator that indicated a nominal output of 750mV. A light bulb went off in my head so I grabbed a small 1.5V battery and some jumpers and connected the battery to the generator terminals and Whoomp!, the main burner lit and stayed lit. I turned the switch off and back on again and nothing. Connect the batter and the burner lit again.. Problem solved, worn out pilot generator. These things arent cheap, about $60 -$70 on the internet, its a shame that I cant fix a worn out thermocouple. Until I order a new generator I have a battery and some jumpers on standby.