5B4AIT Calendar

July 2017
M T W T F S S
« May    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

HamSphere Forums

HamSphere info

Yahoo! Weather Forecasts

Cyprus Mail News

Move

Hello readers.

We are moving from Mesogi village to the next village called Tala both in Paphos region.
We are leaving the current property as of 7th of July for a holiday trip to Sweden and will get back to Cyprus and the new property in Tala on the 28th of July.

I will be QRV from Sweden with SM7NHC or SM0/5B4AIT over the holidays.

73
Kelly
5B4AIT

Android performance Fixes

Finally I found what caused the audio to be so gappy on TX.

First of all. All views need to be using SurfaceView with lowest Thread priority. Like this example below. The Band Scope monitor that was really draining all resources. So instead of extending View, you extend SurfaceView that implemements a callback feature.
The SurfaceView is an extension of the Android View object and it provides a set of functions to manually take control of the onDraw event that draws the things on the screen.

Basically I set up a worker thread that does the calculations and in that same thread I invoke the onDraw call.

public class ADFFTMonitor extends SurfaceView implements SurfaceHolder.Callback {

// Then start a worker Thread and pass the callback to the Thread.

getHolder().addCallback(this);
_thread = new FFTThread(getHolder(), this);
_thread.setPriority(Thread.MIN_PRIORITY);

// The override surfaceCreated and make the thread start when the object is created.

@Override
public void surfaceCreated(SurfaceHolder holder) {
_thread.setRunning(true);
_thread.start();
}

class FFTThread extends Thread {

c = _surfaceHolder.lockCanvas();
_panel.onDraw(c);
_surfaceHolder.unlockCanvasAndPost(c);

// And most importantly, wait a lot to let the audio framwork work as much as possible.

try {
Thread.sleep(100); // sleep 100 ms
} catch (InterruptedException ie) {
}

First QSOs

Today I have made successful QSO from 5B4AIT/P via my Android Phone for test purposes.
Audio was reportedly crappy and gappy. This is due to the fact that the Android phone has very limited resources. I have been forced to rewrite some parts of the code to harness the power of the Samsung phone as well as the Android Ice Cream Sandvich 4.0 operating system.

Stations worked:

S56LXB
EI7CHB
26HS3701
PU1PML
IK5EED
UX4CR
115HS148
2HS464
44HS414
50HS100
91HS576

Android Development

Latest update

Hi All, haven’t written much on my blog lately. Been busy with software development.

Trying to focus on the Android development. It is good to be back in the Java environment but frustrating that Android has left some rather good libs from the standard Java lib. A few workarounds needed.

73

Kelly

 

 

HamSphere on Android

Audio drivers and codecs ready.

Debugging ready

Hi. After like 2 days of debugging I could pinpoint the problem to a mutex variable that was accessed outside a mutex lock = memory violation and failure.

Say that you have  a MUTUAL EXCLUSIVE variable called rmut in a multi threaded environment

Before you do an operation you invike mutex_lock then you do some stuff and finally unlock the variable.

pthread_mutex_lock(&rmut);

…do something clever …

pthread_mutex_unlock(&rmut);

I realized that I had forgotten to lock one memory area in the logon procedure resulting in memory violation error.

Servers have been up for almost 48 hours without any stops. I think I have solved it.

73

Kelly

 

 

Debugging

Debugging software. 6 servers monitor.

From top:

Chicago, Sweden 1, London, Australia, Iceland, Sweden 2

Servers online

Am currently running SE 1 and 2, IS, UK, US HamSphere servers

Database replication

Today I gave up the useless mysql master/slave ring replication. It is unstable and totally unpredicatable. If it syncs out it is a living hell getting it back in sync.
Currently I am using one master, but aiming for a master / master replication between 2 servers for redundancy and divide the access from the radio servers to these.

73
Kelly

Solar-Terrestrial Data

free counters

IP address

Tag Cloud