5B4AIT Calendar

February 2012
« Jan   Mar »

HamSphere Forums

HamSphere info

Yahoo! Weather Forecasts

Cyprus Mail News

Monthly Archives: February 2012

Race condition solved?

Addressing the server hang problem:

Server code was fixed 2 days ago. Servers have worked non stop since then without hanging. We had two inclidents with the old “audio repeater bug” in Texas and Stockholm and those servers auto-restarted once. I need to get a fix for the GLIBC fwrite problem. There is a documented bug in the Linux GLIBC that makes fwrite system calls to signal a memory violation thus the server core dumps.


Server code

Today I am working on the server code. There is a “race condition” somewhere in the code which makes the servers to spiral down arbitrarily.

I have a fairly good idea where the culprit is. You have probably noticed that London sometimes stops in the middle of the night. It is usually London that stops for some reason. But today I got the same probnlem on the Stockholm server. The problem is relected to a so called select() call when receiving data from a socket. The race condition can occur if a signal comes before the select() is called so therefor POSIX has come up with an alternative call called pselect that also listens for signals. One thing I could try is to mask the signals before I make the select() call. We’ll see.




Slow weekend

My HRM (Heart Rate Monitor) that comes with the Garmin 611 GPS running watch has totally gone bezerk. The readings are all over the place and totally erratic. I have become dependent on the Heart Rate as I know exactly how fast I can run for a certain distance. This is a major setback. And when searching the web I find that many people have the same problem as me and they have returned the HRM-Soft strap and got it replaced by Garmin. Obviously Garmin has detected a malfunction or a flaw, but they don’t want to talk about it. They silently replace the ones from customers who complain.



Not done very much today. Been one of those days when you gotta pay the bills and get all papers into the files.

Oh yes, I rang my good old friend Tryggvi in Reykjavik who has started a brand new cloud computer system called GreenQloud together with Eiki (Another of my Icelandic friends).

We spoke for a while and I have decided to try their cloud computer which is located in Hafnafjördur near Reykjavik. They have very good ping times and the concept, as far as I can understand, is to drive their cloud on green energy an abundant source they have on Iceland. It will be cool to have a server on Iceland.




QSL System a hit

Averaging around 500 QSLs per day, the HamSphere QSL management system seems to be a major hit.

A few things remain to be added such as a QSL and Log report engine. So stay tuned – more things to come.

73 Kelly

Dodgy HRM

Strong winds from the North (Turkey) have brought cold air masses down on us.
The wind has been gusty with quite a bit of thunderstorms and showers.
Nevertheless I managed to get down to the Paphos Harbor and ran 1/3 Marathon race (14 km) today along the Marathon track.
It actually felt good. I think I am going to make the half marathon.

The problem I have now is the dodgy Heart Rate Monitor. It seems that the electrodes on the strap don’t have enough connectivity in this cold weather.
I get false readings all the time and it can be quite scary when the Heart Rate soars to over 240 BPM (False of course).

I need to fix this. Perhaps som conductive gel they use for EKG equipments etc. Need to find it…


HamSphere on Android embryo

I have the first running embryo of HamSphere running on Android. It is right now just a framework and skeleton, but I will release something with real audio connection soon.


Here is a short little movie I made starring my uncle Stewart Anderson and Mac Kenzie - Our Soft Coated Wheaten Terrier. Enjoy!

HamSphere on Android

LayOut managers

I have now explored the Android development suite a little more. As you may know, Android is purely based on Java.

The UI design is based on a quite clever XML based concept. But the LayOut management reminds me very much of the initial Java development back in 1996 when Java first saw its light. Actually the Android people have deprecated one of the most tempting Layout Managers called “AbsoluteLayout”. The reason why this manager is deprecated is that Android phones come in so many shapes and sizes. It is virtually impossible to make a “fixed pixel” application for a mobile phone, so I really do not understand why the fixed position Layout was there in the first place. OK, so what are the alternatives then?

The standard Layouts are:


FrameLayout is designed to display a single item at a time.  You can have multiple elements within a FrameLayout but each element will be positioned based on the top left of the screen.  Elements that overlap will be displayed overlapping.  I have created a simple XML layout using FrameLayout that shows how this works.


LinearLayout organizes elements along a single line.  You specify whether that line is verticle or horizontal using android:orientation


RelativeLayout lays out elements based on their relationships with one another, and with the parent container.  This is arguably the most complicated layout, and we need several properties to actually get the layout we want.


TableLayout organizes content into rows and columns.  The rows are defined in the layout XML, and the columns are determined automatically by Android.  This is done by creating at least one column for each element.  So, for example, if you had a row with two elements and a row with five elements then you would have a layout with two rows and five columns.

What Layout to choose for HamSphere?

I have been playing with all of the above, but the Layout Manager that feels the most tempting is the TableLayout. Howevere it may cause the app to look a bit “off” in some phones. The Relative Layout could possibly work if I use the frame outer edges as reference. We’ll see.



HamSphere Technology

Quite often I get a question about HamSphere and how it works.

Not many operators realize that HamSphere is constructed on real radio concepts such as local oscillators, mixers, filters, agc’s, balanced modulators, carrier wave suppression etc.

About 10 years ago I started contemplating a crazy concept of simulating SSB-signals on the Internet. Of course back then the CPU power was not enough to achieve such thing, but eventually in late 2007 I started writing the first  embryo for HamSphere on a 4-core Intel server.

The concept is simple. I give each logged in Ham a digital local  oscillator (LO) that can be tuned between 1-99 kilohertz. The LO is then modulated with Amplitude Modulation (AM) by the operator’s  microphone audio. The AM signal is fed through a carrier wave  suppression module leaving a Double Side band (DSB) signal.

The DSB signals from all operators on the system are mixed in a mixer and re-sampled at 192 kHz. That output of that mixer is the ”HamSphere”, which is a melting pot with all signals mixed together.

On the receiver side I inject the LO (1-99 kHz) into a balanced  direct mixer which is also fed with the “HamSphere” signal. The product of that mixer creates an (Intermediate Frequency) IF which is actually carrying the audio product. The IF is then filtered with  a 3.8 or 2.8 kHz filter to get rid of the digital artifacts and then fed to the speaker.

This whole digital concept above is acting like a real shortwave radio or actually a SDR (Software Defined Radio).

The “HamSphere” is constantly reshaped using real so called  QSB-envelopes that I have prerecorded from real shortwave signals on different bands. That is how I can explain the QSB (fading) on the signals that you hear on HamSphere.

Another concept of HamSphere is the fact that when you swirl the VFO know the voices turn into ”Donald Duck” voices, just like a SSB receiver. Well, the reason for that is that it is the same thing, except HamSphere uses Double Side Band instead.
Below I have pasted a diagram of the HamSphere system.


Solar-Terrestrial Data

free counters

IP address

Tag Cloud