CyanogenMod 10.2 first impressions

First day with CyanogenMod 10.2 on the phone and it’s gone pretty well so far. There are a few things I miss from Samsung’s UI on Andriod, like being able to drop app icons into folders, but I can live without that. Just means an extra tap and swipe or two to find an app, and I’ll need to think about what application icons and widgets I want on the front screens.

Performance seems to be reasonably decent so far, without the slowness and lag I was experiencing before. Could still be from having a freshly wiped unit, so I’ll have to wait and see how things are a few months down the road. No issues with any of the applications I’ve installed yet. Everything runs and overall my Galaxy S2 is much more responsive, like it felt when I first got it.

The battery seems to drain faster, although that could be a combination of an aging battery and me playing with it more because it’s shiny and new. Something I’ll have to keep an eye on over the next little while.

Moving applications to the SD card seems quite a bit slower. Where it might have taken a few seconds with Samsung’s version, some applications took a minute or two before the move to the SD card finished. Not sure what the problem behind that is yet. On the other hand, clearing the application caches can be done with just one tap, which is a whole lot easier than going through each application individually.

Upgrading to Cyanogenmod

With my Galaxy S2 abandoned at Android 4.1.2 by both Samsung and T-Mobile, and performance starting to deteriorate, I decided it was time to bite the bullet and head into the world of custom ROMs. Decided to go with CyanogenMod because of their new simple installer.

Ran the Windows installer, connected the phone and after a few butt-clenching moments, the phone was booting into CM10.2 (Android 4.3.1).

It’s a little different, but so far seems to be working pretty well. Feels faster and more responsive, but that could just be from having a freshly wiped device. Will see how things go as I proceed with reinstalling apps and rearranging the screens to the way I like them.

Morse code blinker

The microcontroller programming equivalent of “Hello World” seems to be “Blink the LED”.

After going through some of the example code for my Netduino, I decided to expand a bit on the LED examples and come up with a simple little program that would make the onboard LED blink out Morse code.

After a few hours of futzing around trying to figure out the C# syntax and the relevant parts of the .NET Micro Framework, I finally came up with something that works pretty well. I called it MorseBlinker.

One of the problems I ran into was .NET Micro Framework API changes between 4.2 (which is what I had installed) and 4.1 which is what the examples in the Getting Started with Netduino book are written for. Also, apparently there’s a big difference between “a” and ‘a’ in C# (although I imagine it’s probably the same in C too). 

The string is hard coded into the program, so if i want to change what the Netduino blinks, I have to change the string and redeploy the app, which isn’t too difficult. Timing is also hard coded too (in the dit variable which specifies the duration of a dit in milliseconds), so changing the speed it blinks at also requires the app to be rebuilt and redeployed.


using System;
using System.Threading;
using System.Collections;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
namespace MorseBlinker
{
public class Program
{
private static void blinker(OutputPort p, string a)
{
// Make the LED blink a morse code string provided by a
// Change the duration of the blinking by adjusting the dit variable
int dit = 50;                    // dit length in milliseconds
int dah = dit * 3;                // dah length in milliseconds
int space = dit * 7;              // space length in milliseconds
foreach (char sym in a)
{
switch (sym)
{
case '.':
p.Write(true);
Thread.Sleep(dit);
p.Write(false);
Thread.Sleep(dit);
break;
case '-':
p.Write(true);
Thread.Sleep(dah);
p.Write(false);
Thread.Sleep(dit);
break;
case ' ':
p.Write(false);
Thread.Sleep(space);
break;
default:
break;
}
}
p.Write(false);
Thread.Sleep(dit * 3);    // space between characters
}
public static void Main()
{
// Text to Morse code conversion table
Hashtable morse = new Hashtable();
morse.Add('a', ".-");
morse.Add('b', "-...");
morse.Add('c', "-.-.");
morse.Add('d', "-..");
morse.Add('e', ".");
morse.Add('f', "..-.");
morse.Add('g', "--.");
morse.Add('h', "....");
morse.Add('i', "..");
morse.Add('j', ".---");
morse.Add('k', "-.-");
morse.Add('l', ".-..");
morse.Add('m', "--");
morse.Add('n', "-.");
morse.Add('o', "---");
morse.Add('p', ".--.");
morse.Add('q', "--.-");
morse.Add('r', ".-.");
morse.Add('s', "...");
morse.Add('t', "-");
morse.Add('u', "..-");
morse.Add('v', "...-");
morse.Add('w', ".--");
morse.Add('x', "-..-");
morse.Add('y', "-.--");
morse.Add('z', "--..");
morse.Add('0', "-----");
morse.Add('1', ".----");
morse.Add('2', "..---");
morse.Add('3', "...--");
morse.Add('4', "....-");
morse.Add('5', ".....");
morse.Add('6', "-....");
morse.Add('7', "--...");
morse.Add('8', "---..");
morse.Add('9', "----.");
morse.Add(' ', " ");
morse.Add('.', "·-·-·-");
morse.Add(',', "--..--");
morse.Add('?', "..--..");
morse.Add('!', "-.-.--");
morse.Add('/', "-..-.");
// Text to play in Morse code. Change this to whatever you want
string morseText = "ab4ug";
OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
while (true) {
// go through all the characters in morseText
foreach (char c in morseText)
{
// Blink the character in Morse code
blinker(led, (string)morse[c.ToLower()]);
}
// Delay 1s before repeating the text
led.Write(false);
Thread.Sleep(1000);
}
}
}
}

You can check out the latest version over at Github.

For my next trick, I think I’ll try to make a speaker buzz at the same time as the light flashes.

Mail “Junk”-ing algorithm?

For the past week or so, I noticed the normally busy email stream (mostly mailing lists) in my Google Mail account had dried up to a trickle. I didn’t think much of it at the time, since I didn’t seem to be missing anything important and most of what I wasn’t seeing was from the various Yahoo! Groups I’m in.

A few days ago, I had some time to dig into the matter. The Yahoo! groups I’m in were still pretty active and changing one of them from digest mode to individual email mode allowed a small trickle of mail through.

GMail’s Spam folder contained the usual spam email.

When I looked in the Junk label though, I found all my missing mail. Several days worth (close to 300 messages) all sitting there marked as Junk.

For some reason, something started quietly attaching the Junk label to almost all of my email. Since none of my existing GMail filters are set to classify anything as Junk, and I hadn’t changed any of them recently, the prime suspect would be Thunderbird as the only other thing that touches my GMail account. I don’t recall setting up any junking filters in Thunderbird, so I’ll have to do some digging.

Dead monitor

The monitor finally gave up the ghost. It powers on, but no backlight. Fortunately there’s a spare monitor, but I’ll need to scrounge up a VGA/DVI cable or find an adapter (think I’ve got one somewhere). It’s a smaller monitor, but it will do for now.

I think I’ll take this monitor out to the bench and poke around inside to see if I can find anything easily repairable. A bit of Googling suggests the primary culprit is some bad capacitors on the power supply side of things, which should make it a repair well within my skill range.