Cyanogenmod

I have a really old Nexus 7 (https://en.wikipedia.org/wiki/Nexus_7_%282012_version%29) and upgrading that to Lollipop basically made it unusable.  It was terribly slow.

I unlocked the bootloader and reflashed with 4.4.4 (https://dl.google.com/dl/android/aosp/nakasi-ktu84p-factory-2c6e4d6f.tgz) and that was much better.

But that’s really no fun so I decided to give CyanogenMode a shot (http://download.cyanogenmod.org/?device=grouper&type=).  It was a bit overwhelming at first to work out that:

  • nakasi is the codename for that tablet at Google while grouper is the codename for the CM team
  • CM 11.0 is based on Android 4.4.4
  • M vs N vs stable vs snapshot … (http://wiki.cyanogenmod.org/w/Release_Versioning)

I finally settled on this http://download.cyanogenmod.org/get/jenkins/90453/cm-11-20141112-SNAPSHOT-M12-grouper.zip but that’s no fun either so I built it from scratch.  https://wiki.cyanogenmod.org/w/Build_for_grouper

Everything is all documented and there are even steps to make sure the GMS apps are installed so the resultant build is very much usable.

That was fun.

SPP server for Windows

I have posted a simple protocol server for Windows on GitHub: https://github.com/kaytat/SimpleProtocolServer

There is more technical info in the README of that project.

The server will probably require a little configuration from the user.   The reason is the WSAPI loopback used for capture does not allow for programmatically changing the sampling rate.  Since the SPP player requires a certain format, the user will  have to set the properties of the playback device to match.

Here are the steps to do so for a Win7 machine.  First open up the “Playback devices” from the system tray.

server_tray

 

Choose the “Properties” button of the sound card being used:

server_sound

 

Choose the format the best fits SPP.  SPP defaults to 16bit 44.1kHz, but it will also support 16bit 48kHz.

server_advanced

 

A corresponding update to SPP has been posted on the Play Store that adds an option to choose either 44.1kHz or 48kHz for the sampling rate.

SPP

I published my first Android app and it’s called the Simple Protocol Player.  I probably should have spent more time thinking up a better name.

Here are some docs.

And the Play Store Link.

New raspbmc

I had the auto-update for raspbmc turned off so I decided to update.  The UI performs much better with this version.  I did have some more remote issues.  The “back” button and “i/more” button on the remote didn’t work anymore.

The fix was to update the XML files related to the remote.

First .xbmc/userdata/Lircmap.xml

<lircmap>
  <remote device="devinput">
    <back>KEY_ESC</back>
    <info>KEY_COMPOSE</info>
    <star>KEY_SUBTITLE</star>
    <play>KEY_PLAYPAUSE</play>
  </remote>
</lircmap>

And then .xbmc/userdata/keymaps/keyboard.xml

<keymap>
  <global>
    <remote>
      <star>contextmenu</star>
    </remote>
  </global>
</keymap>

This maps:

  • left arrow/back to back
  • i/more to info
  • asterisk to the context menu
  • play/pause works as expected

Starting a new X session

I like the idea of virtual desktops and it’s a nice tool, but what I really wanted to do was to start a completely separate X session on my Ubuntu box.  A bit of googling suggested that I create a separate user account (so that the two X sessions don’t conflict with eachother) and that I run the X session on a different terminal from where the X session was launched.

So I did that.  I created a test account, hit CONTROL-ALT-F4 to get to the terminal, logged in with my newly created account, and ran this command to start the new X session:

startx /usr/bin/gnome-session -- :1 vt5

And that seemed to go fine but all that gave me was this blank Ubuntu screen on terminal 5:

screen1

So close, yet so far.  After playing around, I found that to start the whole Unity experience, I needed to enable the Unity plugin in compiz.  So, I hit CONTROL-ALT-T to bring up a terminal:

screen2

And from the command prompt ran:

ccsm &

And then clicked the check box next to “Ubuntu Unity Plugin”:
screen3

Nice.  The gnome session fallback is easier to setup since that doesn’t use compiz and the whole UI starts immediately:

startx /usr/bin/gnome-session-fallback -- :1 vt5

 

Raspbmc and HDMI audio

I found recently that I didn’t hear any audio from HDMI.  Googling revealed this: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062

Following those tips, I ssh’ed into the rpi and did this:

sudo nano /boot/config.txt

And added this at the end:

hdmi_drive=2

Then hit control-o to write out the file, control-x to exit, and reboot.

I remember having done this before and I realized my previous change was probably overwritten by a recent auto-update. So just in case, I disabled the auto-update feature from “Programs->Raspbmc Settings”.