Over the last few months I was experimenting with setting up my ham-radio station for completely remote operation, so once the rare DX comes on air I can work it regardless of where I am at the time.
The idea seems simple but this means that for a start I need to be able to remotely turn on and off all of the devices. Leaving the design itself for another post, the core element of my remote control concept is rather old ThinkPad x60s laptop. This one comes with Intel PRO/1000 Ethernet NIC and I want to use WoL to boot it up remotely.
What is WoL?
It's a simple way to turn on a machine connected to the network by sending it a single ethernet packet. Very useful if you want to boot up a machine for out-of-hours maintenance run or something similar - like in my case.
Problem
WoL works great but only once, so after you shut down the OS there's no way to do remote start again. This is something that many have encountered judging by the amount of forum posts and questions asked about the same issue.
Once I wasted more time than I should on trying to figure out what's going on, the fix turned out to be "trivial". Lesson learned for sure.
Tuesday, 28 October 2014
Saturday, 1 March 2014
Running AirView2 [EoL] on Windows 8.1
This is purely "note to self" type post for getting End-of-Life AirView2 device (introduced here) to run under the latest version of Windows.
The AirView2 requires an app and a driver. AirView tool installer (msi format) that checks the OS version and aborts installation if it's different than XP or Vista. The viewer app is written in Java but the AirView2 needs a driver as well (technically it will show up as simple COM port afterwards).
Manual Installation:
The AirView2 requires an app and a driver. AirView tool installer (msi format) that checks the OS version and aborts installation if it's different than XP or Vista. The viewer app is written in Java but the AirView2 needs a driver as well (technically it will show up as simple COM port afterwards).
Manual Installation:
- Download and install Java JRE (ouch!)
- Download the latest software (32 or 64bit) from http://www.ubnt.com/airview/downloads
- Manually unpack the MSI file to some location. In command line window this goes like:
msiexec /a AirView-Spectrum-Analyzer-v1.0.11_win32-setup.msi /qb TARGETDIR=C:\AirView2 - Plug in the dongle into USB port and go to the Device Manager - you will see AirView2 having driver issues. Update driver and tell Windows to look for a new one under C:\AirView2
- Double click on airview-o.jar to run the app - happy scanning!
AirView app doesn't care where it was unpacked so you can move it anywhere you want to ;-)
Monday, 25 November 2013
LG SmartTV (47LW640S) confirmed to be "snooping"
Following some revelations from DoctorBeet's Blog about LG Smart TVs snooping on our watching habits and further information posted on Mark's blog, I realised my parents recently bought one of those... :-)
First of all we should be rational and assume that any "smart device" is doing that. Unfortunately (for LG) this is pretty bad timing for this kind of news to come out in the light of the recent NSA/Snowden/whatever leaks. Oh well, nothing to see and almost moving on....
Here is a screenshot of traffic from a TV running in Poland, model 47LW640S (also visible in the request headers).
First of all we should be rational and assume that any "smart device" is doing that. Unfortunately (for LG) this is pretty bad timing for this kind of news to come out in the light of the recent NSA/Snowden/whatever leaks. Oh well, nothing to see and almost moving on....
Here is a screenshot of traffic from a TV running in Poland, model 47LW640S (also visible in the request headers).
| TV turned ON |
Saturday, 26 October 2013
Virtual radar - Raspberry Pi and RTL-SDR
As you probably know it's been over a year since Raspberry Pi hit the market. Mine spent most of that year in the drawer, so I decided to see if I can use it as low power server for a particular task. One of the ideas I had for a long time was to build a virtual radar type system that would allow me to see airplanes that fly over my area. There are purpose built systems that are quite expensive so why not to do it on a budget and have some fun with it?
This is one of the ways in which the airplanes report their basic flight parameters (identification, current position, altitude, speed, etc) to the Air Traffic Control. All of this happens over radio broadcasts (completely public) at 1090MHz - at lest this is the frequency we are interested in. The full Wikipedia article is quite interesting and contains more information.
All of that is easy to build and the cost is really minimal, using either a PC or a Raspberry Pi as I describe in this post.
ADS-B Basics
Automatic dependent surveillance-broadcast (ADS-B) is a cooperative surveillance technology for tracking aircraft. --Wikipedia
This is one of the ways in which the airplanes report their basic flight parameters (identification, current position, altitude, speed, etc) to the Air Traffic Control. All of this happens over radio broadcasts (completely public) at 1090MHz - at lest this is the frequency we are interested in. The full Wikipedia article is quite interesting and contains more information.
Why bother?
If you have ever seen the flightradar24 website before, you have possibly thought (I know I did) about how cool would it be to do it yourself - own one of those virtual radars and maybe even feed the data into flightradar24 to improve their coverage (and get premium account for free)? If you like this idea, you will like the results your own radar station will produce - in general it would be something like this
All of that is easy to build and the cost is really minimal, using either a PC or a Raspberry Pi as I describe in this post.
Saturday, 19 May 2012
Fixing HAProxy configuration in pfSense
Some time ago I was experimenting with pfSense and HAProxy to deploy both as firewall and load balancer for one of the websites I was working on at the time. The key incentive was that pfSense is great BSD based firewall distribution with amazing features offered out of the box, and if that was not enough, you can install additional packages to add features you need.
One of those packages is HAProxy (proxy/load balancer) and both work together very nicely but...
Problem
I have installed pfSense with HAProxy several times, more than several in fact... and every time I did it, the configuration file generated using HAProxy web configurator (integrated with pfSense interface) was broken. First row in the table showing defined backends was empty - the configuration file itself had just variables but no values. The second entry was just fine... Obviously HAProxy refused to start.
Quick fix
Just so I remember next time what I did. Get shell on pfSense console or install file manager package and edit /usr/local/pkg/haproxy.inc to add the line highlighted below:
Not a rocket science, just shift() the first (empty) backend definition and let the script do the rest.
Note
Manually fixing config file is pointless because new config is generated every time HAProxy (re)starts and the code above is used to generate it.
One of those packages is HAProxy (proxy/load balancer) and both work together very nicely but...
Problem
I have installed pfSense with HAProxy several times, more than several in fact... and every time I did it, the configuration file generated using HAProxy web configurator (integrated with pfSense interface) was broken. First row in the table showing defined backends was empty - the configuration file itself had just variables but no values. The second entry was just fine... Obviously HAProxy refused to start.
Quick fix
Just so I remember next time what I did. Get shell on pfSense console or install file manager package and edit /usr/local/pkg/haproxy.inc to add the line highlighted below:

Not a rocket science, just shift() the first (empty) backend definition and let the script do the rest.
Note
Manually fixing config file is pointless because new config is generated every time HAProxy (re)starts and the code above is used to generate it.
Tuesday, 8 May 2012
Raspberry Pi meets Edimax EW-7811Un wireless adapter
This post contains my notes - what I did to make it work properly, so next time I build the system, I have a step by step guide. In case you lived under the rock for the last months and don't know what Raspberry Pi is, you should visit www.raspberrypi.org now.
I bought Edimax EW-7811Un adapter for my Pi - small factor, b/g/n type, so why not... especially when vendor says it provides Linux drivers (wohoo!). Sadly as it turns out, compiling drivers on x86 or x64 and ARM architectures can be totally different experience - especially with Raspberry Pi being in it's software infancy. In all seriousness - Pi is for those that like to solve problems (at least at the current stage), but the community works hard to catch up very quickly - great stuff!

I bought Edimax EW-7811Un adapter for my Pi - small factor, b/g/n type, so why not... especially when vendor says it provides Linux drivers (wohoo!). Sadly as it turns out, compiling drivers on x86 or x64 and ARM architectures can be totally different experience - especially with Raspberry Pi being in it's software infancy. In all seriousness - Pi is for those that like to solve problems (at least at the current stage), but the community works hard to catch up very quickly - great stuff!
Sunday, 4 March 2012
Logfile tail the web way
Recently I needed something like web based equivalent of tail -f and tail -n commands, so I could display running tail or last N lines from specific log file. To avoid reinventing the wheel I started looking at previous works on-line and found some interesting bits here and there - one of the most useful being AJAX Logfile Tailer & Viewer, so I based my work on this one.
The trick is, that as far as it does exactly what I needed, this solution requires web server with PHP... and installing web server (not to mention PHP) is not really what I want on my logserver.
Mojolicious to the rescue!
Mojolicious is a very powerful Perl web framework that comes without bloat (almost unheard of these days!) - all you need is standard Perl interpreter and core Perl modules as they come preinstalled with your Linux distro and you can install Mojolicious - no other dependencies. On Debian systems installation is as simple as
and we're up and running. Writing Mojolicious::Lite app is really simple and the best part is that it comes with it's own, built in web server (operating in several different modes if needed). Sounds like nice way to go - no dedicated web server on the machine, self-contained application, etc. One more thing - writing, testing and deploying the whole code to actual machine took less than 10 minutes!
The trick is, that as far as it does exactly what I needed, this solution requires web server with PHP... and installing web server (not to mention PHP) is not really what I want on my logserver.
Mojolicious to the rescue!
Mojolicious is a very powerful Perl web framework that comes without bloat (almost unheard of these days!) - all you need is standard Perl interpreter and core Perl modules as they come preinstalled with your Linux distro and you can install Mojolicious - no other dependencies. On Debian systems installation is as simple as
apt-get install libmojolicious-perl
and we're up and running. Writing Mojolicious::Lite app is really simple and the best part is that it comes with it's own, built in web server (operating in several different modes if needed). Sounds like nice way to go - no dedicated web server on the machine, self-contained application, etc. One more thing - writing, testing and deploying the whole code to actual machine took less than 10 minutes!
Subscribe to:
Posts (Atom)
