CEC adventures on the Raspberry Pi


Previously I made available a precompiled version, a-premade-libcec-deb but don’t use it.  These days all you have to do is

sudo apt install cec-utils

And if you want to do development

sudo apt install libcec4-dev

And read my article on A simple libCEC4 example for the Raspberry Pi

A while back I wrote an article about compiling  CEC 3.0.0 on the Raspberry Pi but don’t even read that because you want to be using libcec4 now.


Many blogs tell you about how wonderfully easy it is to use the Raspberry Pi to interact with CEC. That was not my story. Two issues hit me: 1) the first HDMI cable I used did not have a CEC wire in it. 2) the cec-utils package in the raspbian repository doesn’t work. Cures are get a HDMI cable with the CEC wire and recompile libcec.


To prevent failure due to already fixed bugs, I updated the RPi before doing anything else.

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot

The cec-client program is in the cec-utils package.

sudo apt-get install cec-utils

First Errors

I’ve tested now with the original bad cable and the newly bought good cable, and the cec-client from the raspbian repositories always gives the following error

geoff@devpi:~$ cec-client 
No device type given. Using 'recording device'
CEC Parser created - libCEC version 1.6.2
no serial port given. trying autodetect: DEBUG:   [               2]	trying to autodetect all CEC adapters

And similarly with the -l option to list the devices

geoff@devpi:~$ cec-client -l
DEBUG:   [               2]	trying to autodetect all CEC adapters
Found devices: NONE

Building a new cec package

First remove the cec-utils provided by the rasbian repository.

sudo apt-get remove libcec1 cec-utils

The source code for the cec package can be found on github. You get it by

git clone https://github.com/Pulse-Eight/libcec 

Install some extra packages for building. Make sure to install the libudev-dev. I missed that the first time around which caused another whole host of problems.

sudo apt-get install gcc liblockdev1-dev autoconf automake libtool checkinstall libudev-dev

The actual build is pretty easy but be prepared to wait a few minutes.

cd libcec
./configure --with-rpi-include-path="/opt/vc/include" --with-rpi-lib-path="/opt/vc/lib/" --enable-rpi
sudo checkinstall
sudo ldconfig

Using the new cec-client

The newly packaged version cec-client ends up in /usr/local/bin/. With the dodgy cable in place the output looks like

geoff@devpi:~$ /usr/local/bin/cec-client 
No device type given. Using 'recording device'
CEC Parser created - libCEC version 2.1.4
no serial port given. trying autodetect: 
 path:     Raspberry Pi
 com port: RPI

opening a connection to the CEC adapter...
DEBUG:   [             104]	unregistering all CEC clients
DEBUG:   [             107]	Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [             109]	InitHostCEC - vchiq_initialise succeeded
DEBUG:   [             110]	InitHostCEC - vchi_initialise succeeded
DEBUG:   [             111]	InitHostCEC - vchi_connect succeeded
DEBUG:   [             113]	logical address changed to Broadcast (f)
DEBUG:   [             115]	RegisterLogicalAddress - registering address e
DEBUG:   [             296]	logical address changed to Recorder 1 (1)
DEBUG:   [             297]	logical address changed to Free use (e)
DEBUG:   [             298]	Open - vc_cec initialised
NOTICE:  [             299]	connection opened
DEBUG:   [             301]	<< Broadcast (F) -> TV (0): POLL
DEBUG:   [             303]	initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [             304]	<< e0
DEBUG:   [             305]	processor thread started
DEBUG:   [             395]	command 'POLL' was not acked by the controller

That ‘POLL’ was not acked by the controller is the first indication that all is not well. Not having prior experience with CEC, I wasn’t sure at first if this was a real error or an indication that I had a dodgy implementation of CEC in my TV. After a few hours more of investigation I learnt that not all HDMI cables come with the CEC wire. A trip to my local supermarket and for only AUD$8 obtained a “high speed” HDMI cable that also advertised that it had the Audio Return Channel.

With the new cable in place the equivalent output looks like

ff@devpi:~$ /usr/local/bin/cec-client 
No device type given. Using 'recording device'
CEC Parser created - libCEC version 2.1.4
no serial port given. trying autodetect: 
 path:     Raspberry Pi
 com port: RPI

opening a connection to the CEC adapter...
DEBUG:   [             104]	unregistering all CEC clients
DEBUG:   [             107]	Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [             108]	InitHostCEC - vchiq_initialise succeeded
DEBUG:   [             109]	InitHostCEC - vchi_initialise succeeded
DEBUG:   [             110]	InitHostCEC - vchi_connect succeeded
DEBUG:   [             112]	logical address changed to Broadcast (f)
DEBUG:   [             113]	RegisterLogicalAddress - registering address e
DEBUG:   [             295]	logical address changed to Recorder 1 (1)
DEBUG:   [             296]	logical address changed to Free use (e)
DEBUG:   [             297]	Open - vc_cec initialised
NOTICE:  [             298]	connection opened
DEBUG:   [             300]	<< Broadcast (F) -> TV (0): POLL
DEBUG:   [             302]	initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [             304]	<< e0 DEBUG:   [             306]	processor thread started DEBUG:   [             335]	>> POLL sent
DEBUG:   [             336]	TV (0): device status changed into 'present'

Pressing buttons on the TV remote now yields a satisfying

TRAFFIC: [            5836]	>> 01:44:02
DEBUG:   [            5837]	>> TV (0) -> Recorder 1 (1): user control pressed (44)
DEBUG:   [            5838]	key pressed: down (2)
DEBUG:   [            5839]	making Recorder 1 (1) the active source
NOTICE:  [            5841]	>> source activated: Recorder 1 (1)
TRAFFIC: [            5906]	>> 01:8b:02
DEBUG:   [            5907]	>> TV (0) -> Recorder 1 (1): vendor remote button up (8B)
DEBUG:   [            5909]	key released: down (2)
Tagged with: , ,
Posted in Uncategorized

Text to speech on linux

My previous searching had led me to believe that the first stop for text to speech on linux is a program called “festival”. However after much more searching it seems that flite is the successor to festival.

Example Usage:

flite -voice kal16 <<< “Hello world”
flite -lv # To see the available voices

Tagged with: ,
Posted in Uncategorized


I had a problem with one of my programs going abnormally slow.  Being a linux developer, one of the steps I took to diagnosing the problem was to strace the executable. Interestingly it showed me that I was accessing /usr/share/zoneinfo/GMT a ridiculous quantity of times.  What I needed then was a stack trace at the time /usr/share/zoneinfo/GMT was opened.  strace doesn’t provide that information.

A bit of search engine work reveals


but that seemed a bit like too much work.

A bit more learning about gdb taught me that you can break on syscalls using

catch syscall

Now this might have worked but the file I was opening a lot was well after the program startup, so I decided to keep looking for a better solution.  That’s when I discovered


strace-plus is a version of strace with a call stack print out at every syscall.  Exactly what I wanted. There are two points to note about that webpage.  First is that the make produces an executable called strace not strace+; so you’ll need to

cp strace strace+

if you want to stay sane.  Secondly in step 3 where they say

./strace+ -o hello.out ./hello

you actually need to use

./strace+ -k -o hello.out ./hello

Note the -k which gets the actual stack trace.

Posted in Uncategorized

Linux Swappiness

I finally got sick of linux (Ubuntu and Centos to be more precise) swapping all the time when I have 8GB and 16GB of memory in the two machines I use all the time.  So I decided that it was time I learnt about how to tune the swappiness.  Turns out that it is particularly simple.

Swappiness is a number between 0 and 100.  0 means swap only to prevent an out of memory condition, 100 means go nuts and swap aggressively.  On both of my machines it was set to 60.

To see what value your system currently has

  • cat /proc/sys/vm/swappiness

To temporarily set the swappiness to something sane, say 10,

  • sudo sysctl -w vm.swappiness=10

To make this value persist across reboots, edit /etc/sysctl.conf as root and insert

  •  vm.swappiness=10


Tagged with: ,
Posted in Uncategorized

Theoretical maximum data rate possible for LiFi implemented with webcams


If you do a quick search you can quickly find more than two million articles about LiFi.  Recent articles I’ve seen have talked about obtaining data transfer rates of GB/s. What I became interested in was whether I could transmit using some sort of cheap light source and then receive using a cheap webcam.  The idea is to simply flash the light and have the webcam detect the flash. So in principle we are treating the webcam as a one pixel device and not taking into account the fact that a webcam can provide spatial awareness.

Generous Hardware Specifications

Let’s assume some rather generous specifications. Say the webcam can refresh at 30 frames per second and presents 256 levels in each of the YUV channels. This means that the number of unique levels the camera can detect are 256 * 256 * 256 =  16777216 (i.e., 24 bits). I’ll assume that my light source can match or exceed these specifications.

Hartley’s Law

It turns out that in 1928 Hartley cracked the problem of determining the maximum data rate (R) that you can send a information at given the frequency (B) at which you can send “symbols” and the number of separate resolvable “symbols” you can receive (M)

R\leq 2B\log_2(M)

Plugging the above, overly generous, numbers into Hartley’s Law we find that the maximum rate we could send is a depressingly low 1440 bits per second.  

Going faster than 1440 bps

So using the above equipment in the way I specified, 1.4kbps is the limit. So to go faster we need to change the assumptions. One way would be to get a receiver that can go much faster than 30 Hz, which means not a webcam.  Another way to go faster is to make use of the spatial ability of the webcam.  Perhaps some sort of QR Code movie?

Tagged with: ,
Posted in Uncategorized

When (as in temporally) does the vtable get set up?


At least for g++, as part of each constructor call. As a derived class object is instantiated the vtable pointer will be updated at each constructor called.

The Zero class

One of the common jobs you have to do in coding is to initialise memory  to sane defaults.  Sometimes the sane default is zero.  Recently a colleague (Brendan Babb) wrote some code to make setting member variables to zero a trivial task.  It went something like

struct Zero
    Zero() { std::memset(this, 0, sizeof(T)); }

struct LotsOfData : public Zero
    int ii;
    char cc;
    long ll;

My first thoughts were cool!  My second thoughts were, uh oh, this is going to cause havoc in any object that has a vtable.  To be concrete, I was predicting that the virtual function call in the following code would fail to work properly.

struct Base
    char cc;

    Base() : cc('B'){}
    virtual ~Base() {};
    virtual const char value() const { return cc; }
struct Derived : public Zero, public Base
    long ll;

    Derived() : ll(0) { cc = 'D'; }
    virtual const char value() const { return 'E'; }

int main( int argc, char* argv[] )
    Base bb;
    Derived dd;

    std::cout << "size of char = " << sizeof(char) << "\n";
    std::cout << "size of long = " << sizeof(long) << "\n";
    std::cout << "Base=" << bb.value() << " sizeof(Base)=" << sizeof(Base) << "\n";
    std::cout << "Derived=" << dd.value() << " sizeof(Derived)=" << sizeof(Derived) << "\n";

    Base* pbase = ⅆ
    std::cout << "Ptr to Base=" << pbase->value() << " and " << pbase->cc << "\n";

Take that code, and compile it with gcc 4.6 or clang  3.0 (on linux) and you will find that the code actually works as you would expect and not fail as I expected.

Quick introduction to vtables and vtable pointers

I am not a compiler writer so take this section with a grain of salt.  I’ve picked up this knowledge over years by talking to more senior programmers, reading articles, and watching memory in a debugger. Also when you read text books on C++ you don’t usually get taught about vtables because strictly speaking they are not part of the language. vtables are a construct that compiler writers invented to help them implement the language.

So what are they? vtables are arrays of function pointers.  But let’s take a step back.  When a simple class like LotsOfData is instantiated as an object, all the compiler needs to do is set aside some memory for the data. Typically the object will take more space than the sum of its part as the compiler often puts in some padding space so that member variables start on word boundaries (which allows most cpus to access the data faster). Notice that there is no mention of vtables in this case.

vtables are only necessary for a class that has virtual functions.   In the code above, there is a pointer called pbase.  pbase can validly point to an object of type Base or an object of type Derived. When code like pbase->value() is called, the decision of whether Base::value or Derived::value is called must be determined at runtime.  As with all problems in computer science, compiler writers solve this problem by using a level of indirection. Specifically, they create one array with pointers to the functions for the Base class and another array with the pointers to the functions for the Derived class. These arrays are the vtables.  Then in each (and every) object of type Base and Derived, they insert a pointer to the appropriate vtable. So at runtime when pbase->value() is called the vtable pointer that is in the object is dereferenced to determine which vtable to look up which then in turn contains the pointer to the correct value function.  So finally after multiple indirections we have the correct value function to call. As an aside, the reason a pointer to the vtable, rather than simply inserting the whole vtable into every object, is to save memory.

Another point to note is that when sizeof(Derived) is called, the returned size is the size in bytes necessary for new (or malloc) to set aside to contain an object of type Derived. That is, the size returned includes enough space for the vtable pointer and padding.

Why did I think it would fail?

What I was worried about was that memset in the Zero constructor would overwrite the vtable pointer in the Derived object. If that vtable pointer has been overwritten to zero (i.e., the null pointer) then the implicit vtable pointer dereference that occurs in pbase->value() would cause a segfault.

So the question comes down to what is the temporal ordering of the creation of an object. Two weeks ago I naively thought that because the new call knows exactly the type of the object being created so it would insert the correct vtable pointer as the first step after memory allocation. The next step would be constructors called with the Zero constructor being called first and thus the Zero constructor would wipe out the vtable pointer.

What actually happens?

Now since the code doesn’t fail like I predicted, what is going on? For the investigation I used gcc 4.6 and clang 3.0 running on Ubuntu 12.04.  If you use a different compiler, and/or a different platform, you could end up with different results. I compiled up the code (remember the -g compiler flag) and then used kdbg to inspect the memory of the bb and dd variables in the above code.

What I found was that the vtable pointer updated as the construction process proceeded. As a C++ programmer you would know that as part of the construction process the base class is constructed first and then builds up to the most derived class. I was able to observe that both gcc and clang set the vtable pointer as one of the first actions of calling a constructor.  To be concrete, constructing dd calls Zero::Zero() and Base::Base() before calling Derived::Derived().  Zero does its job and wipes the memory (including the space for the vtable pointer) to zero. Next, the vtable pointer in dd is set to point to the Base vtable as the first action of the Base::Base() . Then the first action when Derived::Derived() is called is to update the vtable pointer to the Derived vtable.

Why the multiple updating of the vtable pointer when the final value is known?

As far as I can guess, the answer is to provide a measure of safety.  Imagine a compiler that just directly set the vtable pointer to the final value as the first part of constructing an object. In that case, if a base class called a virtual function as part of the constructor, the virtual call would resolve to the derived class function.  However the derived class data has not been set up yet and if the derived function relied on this unset data then bad joojoo would happen.


On one hand, the zero class is very cool. On the other hand, it will might wipe out the vtable. But on the gripping hand, most likely all is well.

Tagged with: ,
Posted in Uncategorized

Why doesn’t debugger stop at breakpoint?


Remember to give the -g option to the compiler.

The problem

Tonight I was trying to make a toy example program and wanted to examine the memory of some structures.  I do this all the time at work, but we usually use Eclipse. Now for my toy program I wrote the 50 lines of C++ up in geany and noticed that if you hit F9 it will build such a simple program for you.  Bonus!  Ran the program and the output is as expected.  [By the way, at work and home I use linux.  Centos at work, Ubuntu at home].  So lets fire up a debugger and have a look at that memory.

Attracted to shiny things

Many moons ago when I started my first stint as a professional code monkey, Visual Studio 6 was the tool of choice . Now while I used to whinge about its many failings, I was deeply attracted to the integrated debugger.  That debugger really changed the way I chased down problems. Fast forward through time to tonight and I wanted to fire up a debugger.  So do I just use gdb?  Or do I fire up a graphical debugger.  I’m still partial to the shiny debugger so up I fire ddd.  ddd ran my code (as in output appeared) but for the life of me I could not get it to show me the source.  OK, no worries, it’s been a decade since I last used ddd, so let’s just jump ship and use kdbg.  Load up the executable and source, set some breakpoint, hit go and the program merrily wizzes past them like they didn’t exist!


Reluctantly I read the manual.  Luckily the manual is actually very short!  Unluckily the manual gave me no clue as to what was going wrong.  Next up, search the web. Thankyou to http://pascalg.wordpress.com/2007/03/10/debugging-cc-with-kdbg-kdevelop/ for the excellent comment

<quote>First you need to compile your c/c++ source with “-g”(this is very important). E.g gcc test.c -g </quote>

And there was my issue.  The default geany build command doesn’t specify -g in the options. Just in case you are wondering, the -g tells gcc to produce debugging information. kdbg now stops correctly and I bet ddd will too when I go back and try.

Tagged with: , ,
Posted in Uncategorized

Compiling raspistill

Raspberry Flavoured Goodness

I am working on a problem where I need to capture images with a camera and put them on a large screen.  The raspberry pi with its optional camera board, and a large screen TV are the perfect elements to solve this problem.  The program raspistill will take an image and put it on the screen for you which solves most of my problem.  Thankfully the raspistill is open source software and so my attack plan was to examine that code then modify it to my needs.

Initial compile

Getting your hands on the source code for raspistill is easy

git clone https://github.com/raspberrypi/userland.git

Then I mostly used the instructions from http://thinkrpi.wordpress.com/2013/05/22/opencvpi-cam-step-2-compilation/

  • cd userland
  • sed -i ‘s/if (DEFINED CMAKE_TOOLCHAIN_FILE)/if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)/g’ makefiles/cmake/arm-linux.cmake
  • cmake -DCMAKE_BUILD_TYPE=Release
  • make

<Patience> <More patience> All compiles! If only most software was this well behaved.

Speed Bumps

Since my final goal is to make an executable like raspistillyuv, why not use raspistillyuv as a proxy to let me sort out the build environment. Using find for a while located the source code at userland/host_applications/linux/apps/raspicam/RaspiStillYUV.c.  So I created a new directory /home/pi/raspicam  and copied RaspiStillYUV.c to it. A bit of include chasing also showed that I needed to copy

RaspiCamControl.c RaspiCLI.h RaspiPreview.h RaspiCamControl.h RaspiCLI.c RaspiPreview.c

The simple plan was to compile and link the c files.  On the Raspberry Pi its well known that you have to include some extra paths in order to make progress. So my first guess at a compile command was[1]

g++ -I . -std=gnu++0x -isystem /opt/vc/include/ -isystem /opt/vc/include/interface/vcos/pthreads/ -isystem /opt/vc/include/interface/vmcs_host/linux/ RaspiStillYUV.c

and we promptly hit the following error

RaspiStillYUV.c:62:33: fatal error: interface/mmal/mmal.h: No such file or directory

Hunt for the missing headers

Now all the raspberry pi specific code is usually found under /opt/vc/include.  Searching under here shows that there is no mmal.h installed. I did find /opt/vc/lib/libmmal.so.  So how did this get onto the system? dpkg can do the reverse lookup for us

$ dpkg -S /opt/vc/lib/libmmal.so
libraspberrypi0: /opt/vc/lib/libmmal.so

This would normally mean that the associated headers would be included in libraspberrypi0-dev which doesn’t exist.  libraspberrypi-dev does exist but

$ dpkg -L libraspberrypi-dev |grep mmal

gives nothing. libraspberrypi-dev (1.20140618-1) now does contain these headers. Be careful of what you trust in the original blog entry (this update was written on 20140627) Also

$ apt-file search mmal.h

gives nothing.

However, since the userland repository compiled up the camera binaries it must contain all the mmal code.  And a find turns up



It would appear that the mmal headers would naturally go under the /opt/vc/include/interface directory. A tempting solution is to just copy the headers into the directory and declare the job done, however having been down that path I know it is the darkside (been free of the darkside since 2002) and always ends in tears/reinstall of OS.   The correct solution is to make a package.

The fastest way I could think of to create a deb package is

$mkdir mmal-dev-20130909 && cd mmal-dev-20130909
$cp -r ~/userland/interface/mmal .
$cat >Makefile <<EOF
	cp -r mmal /opt/vc/include/interface/

	rm -rf /opt/vc/include/interface/mmal
$sudo checkinstall

Back to the problem of compiling RaspiStillYUV.c

Rather than writing Makefiles, I use a program called cake that writes the Makefile and then calls make. The CFLAGS that cake uses on the raspberry pi are

-I . -fPIC -g -Wall -march=armv6 -mfpu=vfp -mfloat-abi=hard -isystem /opt/vc/include/ -isystem /opt/vc/include/interface/vcos/pthreads/ -isystem /opt/vc/include/interface/vmcs_host/linux/

which leads to the link error

undefined reference to `mmal_component_create'

Which means that we also need to specify the following link flags

-Wall -Werror -march=armv6 -mfpu=vfp -mfloat-abi=hard -L /opt/vc/lib -lbcm_host -lmmal

And then all is well.


1. Ha! On a proof read I discovered that I’ve outed myself as a C++ programmer not a C programmer. 🙂 Back to Post

Tagged with: , ,
Posted in Uncategorized

Speeding up interations with the remote git repository


I interact with git a lot.  Even my prompt interacts with the remote git repository. In my case the git repo is now located 1000km away which means I noticed the slow down compared to when it was on the LAN.

Before measurements

Using a simplistic

time git pull

took between 1.5s and 2.2s

After measurements

The same command typically takes < 1s.

The magic

These steps worked on Centos 6.  Edit your ~/.ssh/config and include the following

ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r

Then start up a persistent ssh connection to the machine housing the git repo.  In my case the machine itself is called git.

nohup ssh -N git 2>&1 >/dev/null &

If we had a more modern version of ssh we could put

ControlPersist yes

into the ssh config and then dispense with the explicit opening of a persistent connection.

A little deeper

To see the effect of the persistent connection I wrote a little timestamp script.

while read line
DATE=$(date +%Y%m%dT%H%M%S.%N)
echo $DATE $line

Then I can run

ssh -v git echo hello world 2>&1 |timestamp

to see what is going on.

Prior verbose output

20130903T125138.904422582 OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
20130903T125138.905558991 debug1: Reading configuration data /data2/home/geoff/.ssh/config
20130903T125138.906317488 debug1: Reading configuration data /etc/ssh/ssh_config
20130903T125138.907019567 debug1: Applying options for *
20130903T125138.908487991 debug1: auto-mux: Trying existing master
20130903T125138.909272700 debug1: Control socket "/tmp/ssh_mux_git_22_geoff" does not exist
20130903T125138.912443346 debug1: Connecting to git [] port 22.
20130903T125138.949749521 debug1: Connection established.
20130903T125138.950558206 debug1: identity file /data2/home/geoff/.ssh/identity type -1
20130903T125138.951323692 debug1: identity file /data2/home/geoff/.ssh/id_rsa type 1
20130903T125138.952002463 debug1: identity file /data2/home/geoff/.ssh/id_dsa type 2
20130903T125139.000878506 debug1: Remote protocol version 1.99, remote software version OpenSSH_5.3
20130903T125139.001620530 debug1: match: OpenSSH_5.3 pat OpenSSH*
20130903T125139.003583486 debug1: Enabling compatibility mode for protocol 2.0
20130903T125139.004404582 debug1: Local version string SSH-2.0-OpenSSH_5.3
20130903T125139.005180030 debug1: SSH2_MSG_KEXINIT sent
20130903T125139.040156868 debug1: SSH2_MSG_KEXINIT received
20130903T125139.040892755 debug1: kex: server->client aes128-ctr hmac-md5 none
20130903T125139.041596022 debug1: kex: client->server aes128-ctr hmac-md5 none
20130903T125139.042315317 debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
20130903T125139.043097405 debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
20130903T125139.150982134 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
20130903T125139.151771961 debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
20130903T125139.203216480 debug1: Host 'git' is known and matches the RSA host key.
20130903T125139.203971960 debug1: Found key in /data2/home/geoff/.ssh/known_hosts:168
20130903T125139.204714146 debug1: ssh_rsa_verify: signature correct
20130903T125139.205477313 debug1: SSH2_MSG_NEWKEYS sent
20130903T125139.206271418 debug1: expecting SSH2_MSG_NEWKEYS
20130903T125139.206934146 debug1: SSH2_MSG_NEWKEYS received
20130903T125139.207669249 debug1: SSH2_MSG_SERVICE_REQUEST sent
20130903T125139.329978037 debug1: SSH2_MSG_SERVICE_ACCEPT received
20130903T125139.373120380 debug1: Authentications that can continue: publickey,password
20130903T125139.373917032 debug1: Next authentication method: publickey
20130903T125139.374664056 debug1: Offering public key: /data2/home/geoff/.ssh/id_dsa
20130903T125139.411515327 debug1: Server accepts key: pkalg ssh-dss blen 433
20130903T125139.539400533 debug1: Authentication succeeded (publickey).
20130903T125139.540170228 debug1: channel 0: new [client-session]
20130903T125139.541874106 debug1: setting up multiplex master socket
20130903T125139.542617874 debug1: Entering interactive session.
20130903T125139.688853716 debug1: Requesting authentication agent forwarding.
20130903T125139.689606730 debug1: Sending environment.
20130903T125139.690311631 debug1: Sending env LC_COLLATE = C
20130903T125139.691041155 debug1: Sending env LANG = en_AU.utf8
20130903T125139.691767747 debug1: Sending env LC_TIME = en_AU
20130903T125139.692502224 debug1: Sending command: echo hello world
20130903T125139.975169558 hello world
20130903T125139.975877869 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
20130903T125139.976613148 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
20130903T125139.977391876 debug1: channel 0: free: client-session, nchannels 1
20130903T125139.978166529 debug1: fd 1 clearing O_NONBLOCK
20130903T125139.978881806 Transferred: sent 2480, received 2456 bytes, in 0.4 seconds
20130903T125139.979670233 Bytes per second: sent 5685.5, received 5630.4
20130903T125139.980442841 debug1: Exit status 0

And After

20130903T125207.813170201 OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
20130903T125207.813914688 debug1: Reading configuration data /data2/home/geoff/.ssh/config
20130903T125207.814665734 debug1: Reading configuration data /etc/ssh/ssh_config
20130903T125207.815460302 debug1: Applying options for *
20130903T125207.816934510 debug1: auto-mux: Trying existing master
20130903T125208.118397703 hello world

What a world of difference!

Tagged with: , ,
Posted in Uncategorized

First Post!

When I was employed at the University of Queensland I had my own webpages that I used to keep hard won technical information.  I left UQ five years ago and this sort of  knowledge is often consigned to the back of my memory and then forgotten.  This blog is an attempt to stop the memory rot.  Let’s see if I remember to actually use it. 🙂

Posted in Uncategorized