Monday, 17 February 2014

Bought a server.

Today was an interesting day. At the end of the day I purchased a server. It is called PRIMERGY RX220 and it is made by Fujitsu-Siemens. It has two Opteron 265’s at 1.8 GHz and 1 GB of ram. It is not the fastest server in the world in fact it is quite old it is 8 years old. But for my intensions I think it is powerful enough. The only thing that bothers me is that it supports max only 500 GB hard drives. I haven’t checked any bios updates, so maybe they have updated it. Hopefully it runs Windows Server 2012 R2 well enough because I got a free key from Dreamspark. If it doesn’t run well I probably install Ubuntu server or something lightweight like that. The main idea right now is to run it as webserver for this website – I think. I know that Elion’s update speed is like 1 Mbps but it beats my current hosting. If my dual wan thingy works maybe even maybe 2 Mbps but that is a stretch. Also idea - run it as file server.
It hasn’t arrived yet via mail, so I don’t even know if it works, so it is too early to make plans.
Ooh and I also got it for 7 euros so that made it clear why I bought it.

Wednesday, 12 February 2014

Raspberry Pi FM trasmitter

So I was browsing reddit and came across THIS.

It was so cool, I had to try this out. So I took my Raspberry Pi and hooked it up. When it booted up I was able to run the following commands over SSH.

mkdir radio
cd raadio
tar –xvf pifm.tar.gz

And that’s it. Now you need to connect a wire to Pi’s 4 GPIO pin. I just connected a random wire. For maximum performance use 20cm wire or dedicated antenna.

To test it out I typed:

sudo ./pifm sound.wav 100

Tuned my radio to 100 MHz and tadaa – Star Wars theme was rolling in.

When the file ends or you cancel it, it stops but the modulation stays on. To get rid of it you need to restart your Pi or run this script I made.

stop For example save it as "". And run it.

sudo python

And it should stop.

As you can see the 100 stands for the frequency. For more flags read THIS. Now it even supports stereo.

You can replace the "sound.wav" with other music file. PiFm currently only supports 16 bit 22050Hz mono .wav files. To do this you need to put your file into the pifm directory or type in the full directory where the file is located.

If you want to transmit .mp3 files you need to install a package.

I tried this out and it worked great!

If you want to transmit your voice live you need to use USB webcam or microphone because Raspberry does not have a dedicated mic input.

I have a Logitech webcam with mic and used this command to pipe my mic output to PiFm

Worked great!

Now when that was done I wanted to push Pi into its limits and see how far it would transmit.

With the wire it was simple : it basically covered entire house.

Put what happens if I use a bigger antenna? Let’s find out!


So the HAM shack is in the attic so I climbed there, hooked everything up and port forwarded Pi’s SSH.

I quickly made this ghetto adapter.


Before I went away I snapped a picture because it looked cool:


I grabbed a IC-T8E and started pedaling. I turned the radio on. Took out my phone and SSH'd into the Raspberry that was sitting in the attic. Inserted the commands and boom IT WORKS!


When I arrived I climbed on my roof and tried again. Still worked with the stock antenna. It was low on signal but I was still able to listen it. The range was whopping 2km. That blew my mind. Probably I was violating like thousands of FCC and TJA rules when I transmitted in the FM frequencies – I have nothing else to say then “Sorry”.

The next day I drove on the top of the trash mountain and started the experiment again. The stock antenna did not pick up anything but when I tried with my Yagi antenna it worked. I did not test it much because it was freezing there. Before I left I snapped a pic:


Anyway without any amplification the Raspberry Pi transmitter is pretty powerful with a good antenna. That ended my experiment.

I’m looking forward to send other modulations than WFM. AM would be super cool. That means I can record what my doorbell button sends out – record that with my SDR and then whenever I need replay that and my door would ring. Think about the possibilities!

Tuesday, 11 February 2014

Reading data from 433Mhz temperature probes.

As the title stated, I had a idea to capture data from those magical things! These thing wirelessly send data between the sensor and the station.



I had one of these probes laying around and I thought I should at least try to capture something from it. I did not have the base station only the probe.

Sounds cool on paper! The first thing I tried to do was actually capture a sample.  I booted into my Ubuntu and launched Gqrx. With my SDR I was able to tune into the 433 MHz region. Those probes usually work around that frequency.

So I captured this around 433.900Mhz AM

This is what that region looks like:


So then I started searching and I found this:

Went to my linux machine and typed into the terminal (the readme commands did not work for me) :

So when that was done I figured how to use that thing.

Everything is super simple when that part is done. So I was able to run this:

rtl_433 –a  - this outputs all it's magic into the terminal but we want a way to have all that in a simple txt file. The default frequency is 433.92 MHz.

So I entered this:

rtl_433 –a 2 > 433test.txt

This command dumped everything at /home/kukk/433test.txt

So I captured one transmission. This was the output:

It also transmits humidity. Working that out is not as simple as temperature. Also it sends out other data that I don’t know anything about.

I had an idea to run this on my Raspberry Pi.  When it is running the python extracts the temperatures and presents it on my website.

With SDR it is cool to read multiple probes and maybe then average it.