Category Archives: Technology

Technology

Moving on from an #HourOfCode to 20 hours of code…

A couple of weeks ago, I wrote about the Hour of Code events that are running as part of Computer Science Education Week and, last Thursday, I took my 10 year-old son to our local Apple Store to take part in an event. Unfortunately his younger brother wasn’t interested (“I don’t really like programming” was the response) but I’m not going to push it – not everyone likes the same things and I do at least know he’ll be exposed to some coding at school (Scratch was part of the ICT curriculum at their school, even before the recent shake-up in computer science education here in the UK).

Using a Scratch-like user interface, the Hour of Code used a sequence of puzzles to guide Angry Birds through a route to find some pigs, the Zombies and Plants, and Squirrels and Acorns… with the opportunity to view the resulting JavaScript code at each stage.  Working up from simple steps forward/turns to repeat [for] loops, repeat until [while] loops, if statements and if/else statements it was great to see my son asking “what are all the funny brackets” when he viewed the code (and equally great to be able to use some of the C he’s tweaked with the Arduino as an example of passing parameters).

At the end of the session we were pointed at another twenty hours of code available at the code.org studio, allowing kids (and adults) to build up confidence and knowledge of basic computer science principles but the real buzz for me was seeing my son’s browsing history the next morning, spotting the Google search for “20 hours of code” and the fact he’d got stuck in to some of the puzzles to create his own game without any nudging from his geek father. That put a big smile on my face.

Technology

Reconfiguring a PlusNet ADSL router (Technicolor TG582n)

This post is probably not much interest to many people but it might help some if, like me, you’re trying to re-configure a Technicolor TG582n ADSL router from PlusNet. Just make sure you read all the way to the end and save yourself some time!

For the last 11 years, my ADSL connection has been running with an elderly Solwise SAR110 ADSL modem/router, provided by PlusNet when we first connected to 512Mbps ADSL. Those were the days – half a meg download speeds seemed so fast back then! Whilst fibre has (just about) reached my neck of the woods, my ADSL 2 connection is working well, most of the time, and I get about 6Mbps down and 0.7Mbps up these days. Indeed, the connection actually seems to have become more responsive lately (my theory is that the contention rate has dropped in line with people switching to fibre)!  I did have cause to call PlusNet for support last week though, and they agreed to ship me a new router if I signed up to one of their current packages (which, incidentally saved me money too as we were still on a very old tariff).

The new router is a Technicolor TG582n and I finally got around to setting it up tonight. I was told that I might get slightly faster speeds but there’s no evidence of that based on the tests I’ve run so far (that may change in a couple of days when we roll into a new billing month and onto the new service) [Update: after a few reboots my speed has doubled to around 12Mbps]. For now though I just want to swap the old router out for the new one.

The first thing I found was that the default configuration sets the router’s IP address to 192.168.1.254. That’s the IP address of my wireless access point, and all of my devices are expecting a gateway address of 192.168.1.1.  So, I downloaded the router configuration (Technicolor Gateway -> Configuration -> Save or Restore Configuration).  This gave me a file called user.ini, which I then searched for all instances of 254 and looked like they were part of an IP address (ignoring one which was part of a long string of numbers) and replaced 254 with 1.  I then uploaded the new configuration and, hey presto, the browser refreshed giving me back the config for my wireless access point on 192.168.1.254 and the router was responding on 192.168.1.1.  That seems a bit of a kludge and there should be another way to do this, but I couldn’t find it in the GUI (at least not with software release 10.2.2.B).

Then, reading around I found that the router also has a DHCP server enabled by default. I don’t want that right now (my Raspberry Pi is doing that job for me) so I started to investigate switching that feature off. Again, I couldn’t find it in the GUI, so I tracked down a copy of the CLI guide for the router (from another ISP – Demon – albeit for an older release) and, sure enough, after telnetting onto the box the dhcp server config command told me it was enabled so I corrected that with the following commands:

dhcp server config state=disabled
saveall

After all that, I found the config that I needed – it seems that the location to make the changes is Home Network -> Interfaces -> Local Network -> Configure.

There I found some handy checkboxes to turn on/off DHCP servers (IPv4 and IPv6) as well as the static address for IPv4 addresses!

After all this, I may well switch over to one of the popular open source firmware packages on the router… but I’ll leave it alone for now…

Technology

Learn the basics of computer programming in an #HourOfCode

Next week (8-14 December 2014) is Computer Science Education Week and the Hour of Code is coming to the UK. More than 3 million people have tried an Hour of Code already, in an initiative that aims to dispel any myths that computer programming is difficult and to provide parents, teachers and students across the nation with an enjoyable introduction to coding. Code.org hope that this will help build awareness of and confidence in the changes that have come in the September 2014 English school curriculum.

It’s not just in schools either – my employer has 24 “hour of code” workshops scheduled all over the country for our technical staff to give non-techies a one-hour introduction to the basics of computer programming and there’s been a fantastic sign-up rate.

Other IT companies are getting involved too (actually, there’s an extensive list of partners) including Apple, who are hosting Hour of Code workshops in Apple Stores across the world on 11 December (I’m hoping to get at least one of my sons to come along with me). It’s billed as “no experience needed” and for “ages 6-106″.

If computer programming is a mystery to you but it might be something of interest, find out more about the hour of code on the Code.org UK website or follow @codeorg on Twitter.

And if the Hour of Code whets your appetite, you might like to check out some of these resources:

[Update 10 December 2014: added Microsoft Imagine to the list]

[Update 14 December 2014: added 20 hours of code to the list]

Technology

Short takes: Unicode characters in Windows; OS X Remote Disc goes AWOL

More micro-posts from the collection of open tabs in my browser…

Unicode characters in Windows

Sometimes, when tweeting, it’s useful to be able to type the unicode horizontal ellipsis (…) rather than three full stops (…). It might look similar, but that’s two less characters out of 140.  I remember back in early days of Windows I could enter special characters using the numeric keypad but it seems that still works (sort of): FireFormat.Info has some useful information on entering Unicode characters in Microsoft Windows.

Mac OS X Remote Disc goes AWOL whilst installing Adobe Lightroom

My new Mac Mini doesn’t have an optical drive. That’s not generally a problem except I needed to install Lightroom on it, so I used OS X’s Remote Disc technology to share the DVD drive from my old MacBook across the network.  The software installation was progressing nicely until, right at the end, the Adobe installer wanted me to insert the disc! As I was already connected to a logical disc, I had no way forward but to abandon the installation, connect a USB DVD drive and try again.  Seems it’s not the universal solution to accessing optical media that I had hoped…

To add insult to injury, I then found (thanks to the Lightroom Queen) that the Lightroom downloads on the Adobe website are the full programme, so I could have downloaded the software and installed it locally – all I really needed was my license key!

Technology

Choosing an Office 365 identity model (when to use ADFS)

At the time of writing, Microsoft Office 365 has the ability to work with three identity models:

  • Cloud identity (stored in Microsoft Azure Active Directory).
  • Synchronised identity (a copy of the objects from an on-premises Active Directory is made in Microsoft Azure AD), optionally with synchronised password hashes.  This is also known as same sign on (not single sign on as there are still two separate objects, albeit two objects that are kept synchronised).
  • Federated identity, using a federation service (such as Active Directory Federation Services, but others are supported) to authenticate users in an on-premises directory following which authorisation can be granted to Office 365 resources. This is also known as single sign on.  In this instance, directory synchronisation is still used to populate the Azure AD with user objects, although authentication happens on-premises.

Whilst the majority of small businesses will be fine with cloud identities, many of my conversations with enterprise customers start off in the directory synchronisation space. Generally, synchronisation is performed using the Office 365 DirSync appliance (a customised version of Forefront Identity Manager) although, more recently a new tool (Azure AD Sync) has been released that will eventually replace DirSync.  At the time of writing the main difference is that Azure AD Sync supports multiple forests (DirSync is a single forest solution) but it doesn’t support password synchronisation (still a major advantage for DirSync).

In general, the approach I recommend is to choose the simplest model for the organisation’s needs. The cloud identity model can work well when there is no on-premises directory service or there is no requirement to integrate; synchronised identity is the most commonly used (assuming there is an existing Active Directory) but sometimes federation is required:

  1. If there is an existing ADFS infrastructure.
  2. If a third party federated ID provider is in use.
  3. If Forefront Identity Manager 2010 is in use (which does not support password synchronisation).
  4. If there are multiple on-premises Active Directory forests (although Azure AD sync may negate this requirement).
  5. If smart cards or other third-party multi-factor authentication solutions are in use (Azure AD does have an MFA capability, although there are some restrictions on its use).
  6. If custom hybrid apps or hybrid search are in use (SharePoint).
  7. If a hybrid Lync solution is in use (i.e. placing users with enterprise voice capabilities on premises and those that don’t need voice in Lync Online, sharing the same SIP namespace).
  8. For self-service password reset via a web service (only administrators have self-service password reset in Office 365).
  9. If there is a requirement to audit logins and/or immediately disable accounts.
  10. If there is a requirement for single sign-on (i.e. accessing Office 365 workloads with the same user credentials as on-premises).
  11. If there is a requirement to restrict client logins by time or location.
  12. If the organisational security policy prevents the synchronisation of password hashes to Azure AD.

On a related topic, the Microsoft Online Services Sign-in Assistant (MOSA) for IT Professionals only exists to simplify the user experience (handling tokens, etc.) and is generally not required with modern versions of Office. Administrators using PowerShell may still need it though.

Finally, if ADFS is down, there is no way for users to authenticate. For that reason, federated infrastructure needs to be highly available (e.g. multiple ADFS proxies and multiple ADFS servers).  One method that’s starting to be commonly recommended is an “ADFS safety net”, using DirSync as a fall back (it’s possible to move between identity models on demand) but obviously that’s only an option if your organisation’s security policy allows the synchronisation of identities (including password hashes to minimise the impact on end users).

For reference, the PowerShell commands are:

Convert-Msol-DomainToStandard -DomainName domainname.tld -SkipUserConversion $true
Convert-Msol-DomainToFederated -DomainName domainname.tld

Set-Msol-DomainAuthentication -Authentication Managed -DomainName domainname.tld
Convert-Msol-DomainToFederated -DomainName domainname.tld

Credit is due to Michel de Rooij (@mderooij) for the ADFS safety net tip.

Technology

My new Office 365 Resource Centre

I’ve been doing a fair amount of work with Office 365 in recent months (including passing certification exams) and, along the way, I’ve found a lot of snippets of useful information. Normally I’d write a blog post but I expect to be constantly adding to the information so I thought I’d create a different solution this time.

So, I’ve started to create what’s currently known as Mark’s Office 365 Resource Centre. It’s work in progress – and I’m sure the structure will change as it grows over time – but at least I’ve found something to do with the public website on my Office 365 subscription!

Technology

Déjà vu: buying and upgrading another Mac Mini

Eight years ago, I was writing blog posts about buying a Mac Mini and upgrading its inner workings. Then, last weekend, I bought a new one.  Well, actually I bought the outgoing model at a knock-down price, thanks to a tip-off from Dom Allen (@ca95014).  A 2.3GHz Core i7 late-2012 model should happily replace my aging MacBook and, unlike the late-2014 model that Apple recently announced, it has upgradable RAM (up to 16GB) rather than memory integrated on the main logic board (I believe the term is planned obsolescence and I find it deeply cynical…).

As usual, I bought my memory from Crucial but, whilst I was waiting for it to arrive, I introduced my eldest son to the Apple unboxing experience…

The memory turned up a day or so later and now I’m in the process of transferring all of my images and photo-editing software to the new Mac… I’m sure there will be more posts to follow on that experience.

With some more hard disk space and a faster Mac, maybe I’ll start taking more pictures (lost my “photo mojo” of late, although I did grab a few shots when I went to watch the Revolution Series track cycling a couple of weeks ago).

Technology

Microsoft course review: 10968B (Designing for Office 365 Infrastructure)

I’ve spent the last three days on a Microsoft Official Curriculum training course at QACourse 10968B: Designing for Office 365 Infrastructure. Like many Microsoft courses, this is badly named (it won’t teach you how to design for Office 365) but I really did find it useful because it focuses very heavily on Microsoft’s FastTrack deployment methodology for Office 365.  Stepping through each of the stages of pilot (although it’s questionable whether enterprises will do this), deploy and enhance, the course reminds us of the key points to consider at each stage with labs to work through with a fictitious company (for once, it’s not Contoso).  Then, the final module is a full case study (using Trey Research of course) where the class divides into groups and works with the instructor (as a customer) to walk through a series of meetings to understand the environment and make the appropriate decisions for use of the Office 365 services.

I found it really beneficial – particularly the final exercise – as I’m doing this with customers all the time and it’s good to compare the approach I take with the Microsoft recommendations.  I was fortunate as well that we had a very knowledgeable instructor, Dan Lewis, and that led to some really good classroom conversations (in contrast to an Exchange course I attended at the same venue last year, where the instructor was limited in her knowledge) – and the range of roles in the room (midsize company infrastructure manager; large enterprise employees; specialist service provider; systems integrator) also added to the depth of discussion.

The one negative – and it’s a huge one – was the courseware.  Microsoft has moved from printed materials to online content and I can understand the reasons (both financial and environmental) but the system used is awful.  Microsoft Learning have partnered with Skillpipe, who have a content platform using a proprietary document format (presumably for reasons of digital rights management – although why they can’t use Microsoft’s own DRM is beyond me) and the content is only available in browser, or in a reader app for Windows (Vista/7 or 8/RT). No mobile devices – not even Windows Phone!  Added to which I find it really difficult to absorb information on screen (e.g. reading a scenario) and it really damages the learning experience.

Incidentally, if you want to learn about the detail of Office 365, this course is not for you – there’s a 5 day hands on course (Course 20346B: Managing Office 365 Identities and Services or you can access the same content, minus the hands-on elements, in the Microsoft Virtual Academy). And, if you really think that’s all a bit too much fuss and you would like to engage a Microsoft Partner instead… then you could always contact me at work!

Technology

Ethernet control for my office “traffic lights”

A couple of years ago, I wrote about the “traffic lights” I’d created for my home office (and subsequent “upgrade”). Shortly after that, I updated the solution to use three LEDs (as shown below) but it still wasn’t quite what I needed. Walking to the door to push a button and change the light defeated the object somewhat.  I needed to enable this device with a “web service”!

The solution comes in the form of an Arduino Ethernet Shield, allowing pin control over a standard Ethernet connection.  I didn’t use the official shield though – cheap imports can be found on eBay for around £7.  Following that, I amended my code using the Instructables Arduino Ethernet Shield Tutorial and another Instructables post on controlling an LED over the Internet using an Arduino.

The end result is below (or on Github) – and the Arduino uses DHCP to obtain an IP address (reservations can be used to control which one – or DHCP logs can be analysed) and a simple query string is read to set the light using:

  • http://xxx.xxx.xxx.xxx/?r for red.
  • http://xxx.xxx.xxx.xxx/?a for amber.
  • http://xxx.xxx.xxx.xxx/?g for green.

Anything else fails back to red.  

/*
Red/green LED indicator with pushbutton control
Based on http://www.makeuseof.com/tag/arduino-traffic-light-controller/

USE_GITHUB_USERNAME=mark-wilson

*/

// Setup Ethernet Shield
#include <SPI.h>
#include <Ethernet.h>
boolean reading = false;

// Enter a MAC address and IP address for your controller below.
// The IP details will be dependent on your local network (commented out if DHCP in use):
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// byte ip[] = { 192, 168, 0, 112 }; //Manual setup only
// byte gateway[] = { 192, 168, 0, 1 }; //Manual setup only
// byte subnet[] = { 255, 255, 255, 0 }; //Manual setup only

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

// Pins for coloured LEDs
int red = 3;
int amber = 4;
int green = 5;
int light = 0;

int button = 2; // Pushbutton on pin 2
int buttonValue = 0; // Button defaults to 0 (LOW)

void setup(){
  Serial.begin(9600);
  
  // Set up pins with LEDs as output devices and switch for input
  // Pins 10,11,12 & 13 are used by the Ethernet Shield
  pinMode(red,OUTPUT);
  pinMode(amber,OUTPUT);
  pinMode(green,OUTPUT);
  pinMode(button,INPUT);
  
  // start the Ethernet connection and the server:
  Ethernet.begin(mac);
  //Ethernet.begin(mac, ip, gateway, subnet); //for manual setup

  server.begin();
  Serial.println(Ethernet.localIP());
}

void loop(){
  
  // listen for incoming clients, and process qequest.
  checkForClient();
  
  // Read the value of the pushbutton switch
  buttonValue = digitalRead(button);
  if (buttonValue == HIGH){
    changeLights();
    delay(1000); // Wait 1 second before reading again
  }
}
  
void changeLights(){
  // Change the lights based on current value: 0 is not set; 1 is red; 2 is amber; 3 is green
  switch (light) {
    case 1:
      turnLightAmber();
      break;
    case 2:
      turnLightGreen();
      break;
    case 3:
      turnLightRed();
    default:
      turnLightRed();
  }
}

void turnLightGreen(){
  // Turn off the red/amber and turn on the green
  digitalWrite(red,LOW);
  digitalWrite(amber,LOW);
  digitalWrite(green,HIGH);
  light = 3;
}

void turnLightAmber(){
  // Turn off the green/amber and turn on the red
  digitalWrite(green,LOW);
  digitalWrite(amber,HIGH);
  digitalWrite(red,LOW);
  light = 2;
}

void turnLightRed(){
  // Turn off the green/amber and turn on the red
  digitalWrite(green,LOW);
  digitalWrite(amber,LOW);
  digitalWrite(red,HIGH);
  light = 1;
}

void checkForClient(){

  EthernetClient client = server.available();

  if (client) {

    // An http request ends with a blank line
    boolean currentLineIsBlank = true;
    boolean sentHeader = false;

    while (client.connected()) {
      if (client.available()) {

        if(!sentHeader){
          // Send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          sentHeader = true;
        }

        char c = client.read();

        if(reading && c == ' ') reading = false;
        if(c == '?') reading = true; //found the ?, begin reading the info

        if(reading){
          Serial.print(c);

           switch (c) {
             case 'a':
               turnLightAmber();
               break;
             case 'g':
               turnLightGreen();
               break;
             case 'r':
               turnLightRed();
               break;
           }
        }

        if (c == '\n' && currentLineIsBlank)  break;

        if (c == '\n') {
          currentLineIsBlank = true;
        }else if (c != '\r') {
          currentLineIsBlank = false;
        }

      }
    }

    delay(1); // give the web browser time to receive the data
    client.stop(); // close the connection:

  }

}

All it needs now is another service to read my Lync status and call the Arduino accordingly, although, having got this far, I have to admit the form factor is not exactly brilliant and I probably should spend the money on a Busylight or a Blynclight instead so that my Arduino can be repurposed for a new project!

Or, of course, there’s Garry Martin (@GarryMartin)’s beautifully simple approach:

Technology

Visual C++ runtime error R6034 caused by duplicate startup entries

I think I’ve logged more IT support calls this week than ever before… most of which have resulted in frustration (possibly on both ends of the phone) – I guess that’s the danger of being a technical end user, who doesn’t really want to have a 90-mile round trip for a desktop support technician to look at a problem when I can really fix things for myself.

Yesterday’s call was really just a “niggle” though – but, as I was in the process of fixing some of the issues on my PC, one I wanted to be rid of…

Every time I booted the PC (not resumed from hibernation – just on a cold start or warm reboot), I was presented with a Visual C++ Runtime Library error:

Runtime Error! Program: C:\Program Files (x86)\Common Files\BeCrypt\BCSystray.exe R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information

It wasn’t a major issue – more of an annoyance – but Googling didn’t turn up much so, once again, I tried the IT support route. When it didn’t look like I was getting very far, I also tweeted ByCrypt – who were very helpful but, in the meantime, the correct support channels came back with the solution (and a 100% success rate, I’m told).

The issue was that a previous software update had left two startup entries for the BeCrypt system tray application active – one 32-bit and one 64-bit:

Disabling the 32-bit C:\Program Files (x86)\Common Files\BeCrypt\BCSystray.exe entry (not the 64-bit C:\Program Files\Common Files\Becrypt\BCSystray.exe version) and restarting the computer cured the problem.

 

 

%d bloggers like this: