Repeating Number IP Addresses

April 30, 2018 at 10:40 am (interesting, internet) (, )

Google started a bit of a trend when it released its own DNS service on IP address

The thing about a DNS service, is that when you want someone to be able to use it, they need to know how to configure it.  But you can’t use a nice memorable name, as the whole point of a DNS service is to translate names into IP addresses.  So you have to configure your DNS service using the IP address alone, hence Google finding a way to secure ownership of the address for use with DNS, landing them a nice, easy to remember address.

Now, more recently, the Quad9 DNS service has been launched, promising more privacy and performance, on, you guessed it,  And in the last month or so Cloudflare and APNIC have teamed up to bring you the DNS service, again promising privacy and performance.

So this got me wondering – who might be next?  Well if you’re after memorable IP addresses, then repeated numbers is definitely the way to go, so after a quick bit of typing into an IP address lookup tool, how about some of these?

  • – Orange Telecom
  • – Amazon
  • – Level 3 Communications
  • – E-Plus Mobilfunk GmbH & Co KG
  • – USAISC – looks like US Army
  • – Dept of Defense

And of course we know about 1, 8 and 9.  I’m not interested really in 10, but going for other repeats:

  • – US DoD again
  • – And this one too …
  • – And this one …
  • – US Amateur Radio Digital Communications
  • – USAISC again
  • – Time Warner Cable Internet LLC
  • – Dadeh Gostar Asr Novin P.J.S. Co. (with an address in Iran)
  • – Telenor Business Solutions AS (Norway)
  • – AT&T
  • – KDDI (Japan)
  • – China Telecom

So the US military certainly has ownership of the largest number of repeated number addresses.  But there are also a fair number of telcos and large Internet companies in there too (will we eventually see an Amazon DNS service on I wonder?).

Of course if you were running a universal query answering service, then the best address would have to be, which appears to be owned by South Korea Telecom.

But I dread to think what running a single service on any of these specific public addresses would do to the global routing table.

Of course you need to beware of hidden meaning in all this … although taken to extremes it reminds me of the interesting number paradox.

I quite like this idea:

When you see the number 111 stop and look around yourself. Take a note of where you are, what you are doing and who you are with! 111 is a wakeup call from the Universe, telling you to pay attention to what is happening around you.

That’s not a bad premise for a DNS service – as a reminder to pay attention to the real world.



Permalink Leave a Comment

Severe consequences of losing your data?

February 5, 2016 at 5:09 pm (internet, kids, moan, security) (, , , , , )

I read this article from TheRegister with mild interest:

“Medical Data Experiment goes horribly wrong: 950,000 records lost” –

Ok, so yet another ‘company loses personal data, warns as a precaution’ story.  In this case, six hard disks apparently containing personal health information of around 950,000 people.

So my initial thought was something along the lines of “are people really misplacing whole hard disks still in 2016”?

Personally, I suspect it is more likely an accounting problem rather than a physical loss – they are probably labelled up wrong, or left in a drawer somewhere, or have been re-used and nobody noticed, that kind of thing.  But it is interesting to look at the phraseology of two consecutive press releases from the company involved (no, I’m not quite why I looked them up either – but I did!).

On the data loss:

Centene Announces Internal Search of Information Technology Assets

“Centene has determined the hard drives contained the personal health information of certain individuals who received laboratory services from 2009-2015 including name, address, date of birth, social security number, member ID number and health information. The hard drives do not include any financial or payment information.  The total number of affected individuals is approximately 950,000.”

Fair play – they are admitting their mistake and attempting to do the right thing:

“Notification to affected individuals will include an offer of free credit and healthcare monitoring. Centene is in the process of reinforcing and reviewing its procedures related to managing its IT assets.”

Otherwise, without openness and honesty around such issues, how can lessons be learned?

But the following day, the next press release announces their financial results for the year:

Centene Announces Preliminary 2015 Financial Results

“On January 25, 2016, the Company announced an ongoing comprehensive internal search for six hard drives that are unaccounted for in its inventory of approximately 26,000 information technology (IT) devices.  This incident resulted from an employee not following established procedures on storing IT hardware.  While we cannot estimate the impact with certainty at this time, the Company does not expect the impact of the incident to have a material effect on its future growth opportunities, financial position, cash flow or results of operations.”

Yes – they don’t expect the fact that 950,000 people’s personal health details going missing will affect their financial position now or in the future.

I guess that answers the question of why it is 2016 and companies still lose whole hard disks of personal information.  If there is minimal financial impact, it is good business sense for them to keep their procedures at the minimum deemed necessary – that is just sensible business risk-management.   In fact the whole ‘free credit and healthcare’ monitoring could be seen as a cost effective insurance policy against possible loss should it occur, compared to the costs of labour intensive, fault-free asset management to prevent any chance of loss up front.

These things will only change when the impact of the issue impacts the companies involved much more significantly, rather than just ending up a problem for the people whose data is lost.

In the UK, I guess we have the Information Commissioner’s Office guidelines for handling data and ability to set fines, but even this misses the point for me.  A fine is after the fact and with so many charities and volunteer organisations (cough, Scout National database) storing personal details, a significant fine would end up burying an organisation and an insignificant fine is largely pointless.  But either way the data will still be lost.  So the answer to this one is really education – so to that end, the ICO Guide to Data Protection is great – but unless someone is actually auditing and proactively educating organisations, or perhaps more appropriately companies now selling online services to organisations, on these principles, I suspect we’ll keep seeing problems occurring.

As we see massive growth in companies providing online payment services (ParentPay, SchoolMoney, PaySchool and so on) information and content management (dbPrimary, Google for Education, etc), communications and mailing services (ParentMail, etc), biometric authentication (40% of secondary schools apparently), online learning, and so on to education and charities, more of our data ends up online regardless of the fact it might not be us putting it there!  For a cash-strapped organisation, managing an offline and online database isn’t going to happen.  You might not use their online system, but your data will be there as they’ll be using it themselves.

The school use of biometrics is particularly  worrisome – many kids may have their biometrics compromised before they are even old enough to decide for themselves if they want to hand over their biometric signatures to any company.

Fundamentally, at present, all the risk from a company storing your data is on you, not them.  Until that risk balance is addressed, I guess we will stay at the mercy of “bottom line (non-)impact” reporting.  And whilst it is convenient and cost-saving for organisations to use more of these online services, our data will keep being stored who knows where and there is very little we can do to stop the tide of information uploading.




Permalink Leave a Comment

How much? I could buy a computer for that!

January 18, 2016 at 9:17 pm (computers, internet) (, , )

First there was the C.H.I.P. – the $9 computer with built-in Wifi.  Then soon after that appeared on Kickstarter, the Raspberry Pi Zero came out – a $5 Raspberry Pi.  Ok, so strictly speaking you need a few accessories to really get them going as fully fledged computers as most people would recognise the term, but in these days of cheap computers, it made me think, just how does this compare with other ‘everyday’ items?

So, taking the “list price” for the Pi Zero, as £4 … that is:

Of course, these days, $5 will get you  a whole range of goods and services, including, according to Dave Gormon, 5000 Twitter followers!

And of course, as per the tweet that started the thinking behind this ramble … just slightly more than a 10 minute bus trip in Cambridge!



Permalink Leave a Comment


December 1, 2015 at 11:17 pm (internet, maker, music) (, , , , )

I wanted to do something with MIDI and Arduino.  I’ve just picked up some cheap Arduino Nano Ethernet shields, based on the Microchip ENC28J60, so thought I’d combine the two.  The ENC28J60 and a cheap Arduino Nano makes for a very compact and economical Ethernet ready microcontroller and I have a nice Roland MT-32 Synth module gathering dust that I wanted to try again.

2015-12-01 21.16.05

My initial idea was to use MIDI to trigger sounds based on arp requests received by the Arduino, (hence the name MIDI Arp), but then decided that on my home network arp requests wouldn’t give a lot of variation, so I decided to see if I could trigger on the destination IP address of any packet received.

First I needed the MIDI interface.  I followed the simple circuit and example provided on the Arduino website, but wanted it all self-contained inside a MIDI plug rather than on a breadboard, so I soldered up the 220 resistor inside a 5 pin MIDI DIN plug as follows (MIDI pins are number 1, 4, 2, 5, 3 for some reason):

  • Arduino GND – Brown – MIDI Plug pin 2
  • Arduino 5v – Red – 220 Ohm resistor – MIDI Plug pin 4
  • Arduino TX (Pin 1) – Orange – MIDI Plug pin 5

This was then connected to the Arduino and the MIDI test programme showed that all works fine.

2015-12-01 21.16.212015-12-01 21.19.13

So, to the Ethernet side of things.  The following is an excellent starting place for the ENC28J60 based nano shield:

After reading this, I decided to use the UIPEthernet library as my starting point as I liked the idea of a plug-in replacement to the standard Arduino Ethernet library.  There was two major things to work out – first, how to set the device into some kind of promiscuous mode, assuming it supports it at all; second how to grab the destination IP address from any received packets.

From the ENC28J60 data sheet, the key register that controls the receiver filtering is the Ethernet Receive Filter Control Register – ERXFCON (see section 8 ‘Receive Filters’).  There are a number of modes for filtering and the UIPEthernet library is set up to filter for the unicast address associated with the MAC address configured for the module, for broadcasts, and to use the pattern matching filter to spot arp packets.  It turns out that to set the receiver into promiscuous mode, this register just has to be set to zero.

Now this is where things got lazy.  I just dived into the UIPEthernet library sitting in my Arduino library folder and hacked about. I might tidy this up one day and do it properly.

The low-level driver code can be found in utility/Enc38j60Network.cpp.  In the Enc28J60Network::init function, there is a line that sets up the ERXFCON register:


This needs to simply be changed to clear the register:

writeReg(ERXFCON, 0);

Next, how to store the destination IP address.  Again, simplicity ruled this one too.

The high-level interface to the library can be found in UIPEthernet.cpp and UIPEthernet.h.  I added two public functions and two private variables to the UIPEthernetClass class in UIPEthernet.h:

  IPAddress lastSrcIP();
  IPAddress lastDestIP();
  static uip_ipaddr_t uip_lastipsrc;
  static uip_ipaddr_t uip_lastipdest;

Then in the UIPEthernet.Cpp file, added the code to store the last source and destination IP addresses from received packets.

First, define a structure to dig into to the IP header (a bit of a layer violation, but I wasn’t after neat designs really).  Add the following after the definition of ETH_HDR near the top of the file.

#define IPBUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])

Then add two (static) global variables to the file:

uip_ipaddr_t UIPEthernetClass::uip_lastipsrc;
uip_ipaddr_t UIPEthernetClass::uip_lastipdest;

Add two accessor methods to retrieve the last source and destination IP addresses (with appropriate conversion to the Arduino Ethernet friendly IPAddress format):

IPAddress UIPEthernetClass::lastSrcIP()
  return ip_addr_uip(uip_lastipsrc);
IPAddress UIPEthernetClass::lastDestIP()
  return ip_addr_uip(uip_lastipdest);

Finally add the code to save the addresses to the UIPEthernetClass::tick() function, on reception of a packet.

          if (ETH_HDR ->type == HTONS(UIP_ETHTYPE_IP))
              uip_packet = in_packet; //required for upper_layer_checksum of in_packet!
              Serial.print(F("readPacket type IP, uip_len: "));
              if (uip_len > 0)
                // Extra code added here
                uip_ipaddr_copy(uip_lastipsrc, IPBUF->srcipaddr);
                uip_ipaddr_copy(uip_lastipdest, IPBUF->destipaddr);
                // Extra code ends

That should be all that is required to expose the destination IP address of any received packet via the UIPEthernet class (ok, breaking compatibility now with the standard Arduino Ethernet library).

The arduino sketch file now consists of the following:

MIDI based on

UIPEthernet Examples used for rest
NB: Requires hacked UIPEthernet Library!
#include <SPI.h>
#include <UIPEthernet.h>
#include "IPAddress.h"

int lastIP;
int thisIP;

// Initialise note array with whole tone scales in octaves 3 through to 6
// C3 = 36
// C4 = 48
// C5 = 60
// C6 = 72
// C7 = 84
#define NOTES 24
int notes[NOTES] = {
  // C3  D3  E3  F#3 G#3 A#3
     36, 38, 40, 42, 44, 46,
  // C4
     48, 50, 52, 54, 56, 58,
  // C5
     60, 62, 64, 66, 68, 70,
  // C6
     72, 74, 76, 78, 80, 82

void setup() {
  //  Set MIDI baud rate:

  // Initialise the uIP and UIPEtherent stacks
  uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
  IPAddress myIP(192,168,0,6);
  lastIP = 0;
  thisIP = 0;

  // Initialise patch using program change
  // 32 = Synth 1, Fantasy
  midiCmd (0xC0, 32);

void loop() {
  IPAddress sip = Ethernet.lastSrcIP();
  IPAddress dip = Ethernet.lastDestIP();
  thisIP = 256*dip[2] + dip[3];
  if (thisIP != lastIP)
    lastIP = thisIP;
    int note = (thisIP & 0xff) % NOTES;  // Scale to number of notes
    int vel  = ((thisIP & 0xff00) >> 8)/4;        // Scale to val between 0 and 64

    //Note on channel 1 (0x90), some note value (note), middle velocity (0x45):
    noteOn(0x90, notes[note], 16+vel);

//  plays a MIDI note.  Doesn't check to see that
//  cmd is greater than 127, or that data values are  less than 127:
void noteOn(int cmd, int pitch, int velocity) {

void midiCmd(int cmd, int val) {

The final byte of the IP address determines which note from the array of notes to play (modulo the number of notes) and the third byte determines the volume to be used, scaled and with a minimum specified.

There is a control message to set the voice on the MT-32 to Synth1-Fantasy as this sounds suitably ambient. There are no note-off messages, so notes are allowed to keep ringing. As the note array defines four octaves of whole tone scales, the running-on notes create quite an interesting effect.

2015-12-01 21.40.12

There seems to be a regular drone set up, which I think is due to the IP address of my PC and router. These two addresses provide a sort of default back-drop of sound to anything else going on.

In order to get anything useful though, it would be no good just using a port on the router, as even the dumbest, cheap modern router will tend to do some MAC level filtering on ports. I had a laptop and the Arduino plugged into an old Netgear En104 4-port Ethernet hub, which has no intelligence (as far as I know) built in – so the Arduino could see everything coming out of the laptop.

The results were quite pleasing. Google has a nice enhanced drone to it. You can really hear the clutter of a site that is pulling in ads from all over the Internet – such as Amazon or YouTube or a news site.

Edited to add:  Here is a short video below showing them being opened.  It’s a bit crude but you get the general idea.

 Maybe next, I’ll see if I can do the same with a Wi-Fi link for the Arduino instead of wired Ethernet.  It might also be worth trying different scales and alternative mappings of notes to addresses.


Permalink Leave a Comment

The Real Price of Internet Advertising?

October 2, 2015 at 9:19 am (internet) (, , , , )

I’ve been following some of the discussions about ad-blocking with interest.  I’ve now seen a number of comments from a range of sides on this one and am continually being surprised by some of the attitudes and opinions starting to appear in this arms race between blockers and advertisers.

Some of the facts and opinions that have surfaced that surprised me are:

  • Advertisers can buy their way out of ad-blocking.  So are advertisers now having to pay twice to advertise?  Kind of.  Or are ad-blockers positioning themselves as ‘guardians of the web’.  Kind of that too.
  • Blocking ads hurts the small people more than the big people.  Small businesses or creators or hobbyist event organisers and so on are the people losing out with ad-blockers.  The large providers will probably ride over much of this (or pay their way out) but these are the people whose enterprises (commercial or personal) are being enabled by the global reach and scale of the Internet, but it may all become fully cost ineffective if cheap, simple, high-reach advertising channels disappear.
  • Some websites are actively degrading their user experience for visitors using ad blockers.  The Washington Post apparently has experimented with not allowing articles to be viewed if you turn off ads.  And Google was removing ‘skip ad’ options for viewers of YouTube videos running Adblock Plus.

Why do people use ad blockers?  Well I suspect that many don’t mind adverts in the more general sense.  I’d say Ad blockers are arguably a blunt instrument deployed against anti-social, exploitative and intrusive adverts.

I regular get annoyed with in-your-face popups in front of an article I’m trying to read.  Is this a design failure on the part of the site to catch my attention by more subtle means?  Is it taking advantage of a captive audience?  Not sure., but that is a good reason for ad-blocking if the industry can’t regulate itself better.  And the drive for more intrusive ads is increasing – especially with more automatically playing video ads and the like on mobiles.  It is not want you want or when you want it.  End of.  That does not win friends or makes people warm to your products.  Maybe it is time for more obvious ‘commercial breaks’ in Internet use rather than a constant drip-feed of annoyance.

I also find it insulting when ads are designed to trick and fool you into clicking.  Whether that is placing link buttons right next to close X icons, especially successful on small screens I assume.  Or the plethora of ads that include the words ‘download’ as very visible buttons when you are attempting to download a document or software from sites such as sourceforge. Or maybe it is just in the general placing of ads so as to maximise accidental clicking. If the revenue is based on trickery, subversion and relies on accidental clicking/swiping/selecting to survive … then that is an industry in trouble indeed.

But the major reason right now for utilising ad blocking for me is as a defence against malware.  I regular read the detailed analysis published by a range of security vendors on how they’ve uncovered a complex malware serving system taking advantage of some of the large-scale advertising networks.  The bidding and auctioning processes for serving ads, coupled with many levels of redirection and URL shortening, and linked with content-delivery networks, not to mention links off to marketing and tracking databases, has created such a complex set of third party dependences for even the most trustworthy of websites that no place seems safe anymore.  Yes, you patch, keep plug-ins up to date, run AV checks, but it must surely be impossible to keep a PC clean of unwanted software these days and a major vulnerability is exposure to ads on sites you use and trust everyday.

Do I mind about the tracking?  Well again it depends. If done sensitively, then why not – there are benefits to seeing things of interest.  But I have no faith in such a lucrative business acting in the interests of us, their users – their ‘product’.  We have not opted-in to the use of free services in exchange for privacy – at best it is a false-choice due to the overwhelming network effects and dominant positioning of the large Internet companies.  We all know they are very good at staying below the ‘creepy line’ in knowing about you and providing just enough usefulness to keep us hooked to their services.  But with more hooking up between online services and offline data brokers, and not even thinking about any kind of future Internet of connected sensing and data gathering devices, things only look like getting worse before they get better.

So whilst the ad blocking war continues, being played out as a warning of the end of free services for consumers if they all block ads – I think the real win situation can only be when some of the above are fixed – lose intrusive ads, keep consumers in control of when they click or not and not trick them, ensure ad networks can not compromise trusted websites, and support responsible tracking of consumers with real opt-in.

I think only then will the need for ad-blockers go away.  I don’t think ad blockers have ever really been about blocking advertising – they have always been about maintaining control over the exploitation of a consumer’s Internet experience.  And for that, they serve more the purpose of an anti-virus, pop-up blocking, privacy supporting, malware-prevention, PC cleaning tool to me.

And in a world where people still fall for telephone ‘Microsoft support scams’, still install rogue Facebook applications in the hope of gaining a Dislike button, and still believe they can change the world via a status update (or at least think it will keep their Facebook data being sold off or made public), the need for protection like this shows no sign of going away just yet.


Permalink Leave a Comment

GNU Terry Pratchett

March 18, 2015 at 12:24 am (books, internet) (, , )

Every so often out of sadness comes a truly inspired idea.  The origins of X-Clacks-Overhead may just be one such moment in geek folklore.  It is very fitting that the name of Sir Terry Pratchett should live on in a very subtle manner following one of the ideas from his own stories – keep sending out his name as part of the actual machine overhead itself.  Forever.

For details, see

My own set of discworld books have faded covers, from many years on and off bookshelves, but are now being read once again.

GNU Terry Pratchett


Permalink Leave a Comment

I’ll name that tune in …

January 14, 2015 at 11:10 pm (internet, music) (, , , , , , )

Whilst studying music at school some(mumble, mumble) years ago (pre Internet really) I remember there being an old book on the shelves alongside the vinyl recordings of classical music that fascinated me.  It was a music dictionary.  Not in the sense of a dictionary of music words, but in the sense of being a dictionary of musical themes.

Basically, how it worked, was you thought of a tune, transposed it to start on a C, and then spelt out the letter names of the tune and looked it up.  So, for example, the National Anthem would go CCDBCDEEFEDCDCBC once transposed, so you’d flick through for the C section, then find the entry CCD… and so on, as they were all listed in alphabetical order, and it would tell you it is the National Anthem.

There were tens of thousands of well known classical themes in that book and I always wanted a copy, but never, ever found one to buy.

As I started to find my way onto the largely textual Internet in the early 1990s, I always thought that this kind of thing would make a great website, but instead of typing in letter names, why not submit a MIDI file with the pitch values, do the transposition automatically and then return the results.  Of course, this never happened, it got binned in my “might think about it one day” pile and forgotten.

Well technology has a habit of spawning useful applications and of course, these days there are now a number of services that let you look up a tune by various means.  I heard a tune over a tannoy system today that I’m sure is a fairly recent pop song, but not one I know.  The kids didn’t recognise my poor rendition of it either, so I turned to the Internet.

If you have a mobile handy to record an extract, then you have a number of very good apps that will tell you what it is.  Shazam is one of the most popular, and available on the major platforms.  However, I belive it will only work for the actual legitimate recording of the song – I don’t think you can play the tune on a piano, for example, and ask it to recognise that.

However, musicpedia and MelodyCatcher do aim to do just that.  You can play in the tune on a virtual keyboard, creating the equivalent of the CCDBCD… above and if it recognises it, it will tell you what results have come back in its search. Musicpedia is best for classical themes whereas MelodyCatcher appears to support a wider range of styles.

But the applications that have given me the most entertainment this evening are WatZatSong and Name My Tune.  These both allow you to record and extract, post it on the site and wait until someone listens to it and posts and answer if they recognise it.  WatZatSong has a number of snippets of poor quality, but largely recognisable recordings.  There are people singing, playing guitar, capturing recordings on their phones.  And the site allows you to browse both submissions and answers and vote to agree or dissagree with the identification.

But nothing beats Name My Tune for shear entertainment value. It will only accept uploads via a microphone, and it is quite amusing listening to all the attempts at whistling, huming, singing in “la”s or “dum”s, playing on old casiotone keyboards, playing on a recorder, penny whistle … you name it.  I’m sure I heard a stylophone for one!  It is great!  The only downside is that it doesn’t have any of the social features of other sites.  You click though the sound clips (a bit like a one-way, audio version of chatroulette) and if you know one, can fill in the author and title and click “send” and off it goes on its merry way.  There is no way to know if you were correct or satisfied the questioner’s query as far as I can tell.

But if you want a peculiar way to spend an evening, that is guaranteed to make you smile, do take a look.  It was quite a lot of fun.

But I still don’t know what my tune is …


Permalink 1 Comment

Simple English Encyclopedia

October 24, 2014 at 9:25 pm (interesting, internet) (, , , , , )

I like to think I’ve been around a bit on the Internet, remembering my first exposure to web pages via IBM Web Explorer on OS/2 (don’t ask), following gopher information links, logging in to sites via command line FTP and I still remember my amazement when I first saw an ad on TV that included a URL, wondering how many people watching would actually know what to do with it.

So I find it fascinating when I find something that has been around for ages that I never knew existed.  In this case, the Simple English “Translation” of wikipedia.  Apparently this was created in 2003 and now boasts more than 100,000 pages.  What brought me to this site was reading about the Euler Identity in the latest book to hit my bookshelves – Dataclysm (Euler – “He was a slacker” according to the footnote from Christian Rudder :)).

Searching for Euler Identity yeilded the Wikipedia entry as the first hit and the Simple English Version as the second hit.  When I realised that you could use the “select language” option at the bottom of wikipedia pages to choose “Simple English”, I thought that was a really inspired use of the idea of language.  I know techies often go to town with language and computers – just consider the Google “big data” approach to translation, Luis von Ahn‘s crowd-sourced approach using desire to learn language to translate the web with Duolingo and the fact that Unicode itself has been used to include non-Earth languages among its character set!

So when I thought about the idea of using “select language” to choose not just translations, but also approaches to conveying the information in the first place, I thought it was a really good idea, and looked a bit deeper on what else was available.  It turns out there are actually a number of English language wikipedia sites:

And it turns out that there are also sites for:

Whilst they apparently didn’t want to split into British and American verisons, there is also apparently a schools wikipedia.

Naturally the first thing to do when one discovers the Simple English Wikipedia is to search for the most complicated subjects you can think of.  Consequently, I present links to the Simple English guide to:

But to be honest, actually the most mirth an merriment is probably reading about modern video game franchises in Old English



Permalink Leave a Comment

RPi Ethernet and Wifi at the same time

May 25, 2014 at 9:34 pm (computers, internet, maker) (, , , )

This should have been a lot easier than it ended up being!  I wanted to turn one RPi into a router between its Ethernet and Wifi networks, so that a single wifi dongle could be shared across a few Ethernet devices (via a simple dumb Ethernet hub I had lying around).

Well there are lots of posts around the Internet showing how to configure the Pi as an Access Point or an Ethernet Bridge, but in all discussions of the /etc/network/interfaces file I’ve found, no-one has really (that I’ve found so far) mentioned quite how the wpa_supplicant, ifconfig and ifplugd systems all interact and fit together.

Whilst a number of people have speculated that there might be power supply issues that will knock out your Wifi if you plug in an Ethernet cable, I didn’t see any evidence of that.  What I was actually seeing is ifplugd detecting the plugging in of the cable and then running its action scripts in /etc/ifplugd/action.d.  On my version of Raspbian, one of these scripts is a symlink over to /etc/wpa_supplicant/ which basically disconnects any wpa-roam managed interfaces if the Ethernet is plugged in.

This is the designed-in behaviour, as the basic idea is that if you are using Ethernet and Wifi, then typically it will be to the same network (and ultimately connected to the Internet) so it will only need Wifi when the Ethernet is not connected.  If you have a wired connection, it will disable the wireless connection to use the wired for preference, which is the desired behaviour in the vast majority of cases.

There are a number of “fixes” around the Internet, from killing ifplugd to removing or adding auto or hotplug related options in /etc/network/interfaces.  I’m sure there must be some magic combination of options that means that the hotplugging of cables and dongles can still work, but will not automatically turn the wifi on and off – but I haven’t found it yet.

Instead, I went for the very simple, but almost definitely “quick hack” version of including an “exit 0” command near the top of /etc/wpa_supplicant/ before it actually did anything.  This way, I get to keep the automatic configuration on plugging cables and dongles in, but the arrival of a new interface does not automatically shutdown the wpa-roam managed ones.

This seems to work really well for keeping Wifi connections open when plugging in an Ethernet cable.  When plugging in a Wifi dongle, that also seems to work, in that both Ethernet and Wifi end up active – although I did get a break in continuity over the Ethernet when this happened – but it reconnected again fine.

Of course, this may well completely shaft true wifi roaming across networks – I don’t know – I don’t take this RPi out and about to test it and I haven’t read enough how the wpa-roam system is meant to work to see.

I expect there is a more elegant way to achieve this, but the Internet wasn’t providing it; the Debian networking configuration manual seemed to be suggesting that I should probably use the GUI and that everything else is legacy; and I’d had enough of reading man pages. If you know of a good reference for how these scripts all interact and how this can be achieved in a nicer way, I’d very much like to hear from you!

But, this will do for now for my relatively static setup of single Wifi network, routed across to the Ethernet network.



Permalink 1 Comment

Parasitic Photography

May 12, 2014 at 9:42 pm (internet, odds) (, , , , , )

Do you still use a camera? I don’t really anymore. I still have one – digital naturally – and I have one on my phone. And on my tablet. And on my laptop. But I don’t very often use any of them and this paradoxically is down to social media.

Wait- doesn’t social media encourage the use of cameras on devices? Yes, lots – and this is why I only use my camera if I am doing something that is not a generally public event. I always used to use my camera for a couple of reasons:

  • When I want to explicitly send someone a picture to show them something.
  • When I am doing that I personally want to preserve.
  • Taking pictures of the kids.

I am not a photographer, so never really used a camera for the joy of finding and taking a good picture (although I do enjoy seeing good photographs that talented others often take). So, I am finding that in general, when I would have previously used a camera – when out on a trip, on holiday or when watching the kids do something – most of the time I don’t need to take my own photos. And that is where social media comes in.

I still take a camera on holiday, but these days, the kids tend to do the recording for me, as they want to be sharing their holiday with their friends via social media. They are very prolific in their picture-taking, so these days, mostly I just take a copy of their pictures when we’re done. I hardly ever take pictures on holiday, yet return with far more pictures than when I used to!

When the kids are performing somewhere, it is usually as part of a group and once again there are lots of people who will be recording, and later posting, the event via social media. In some cases the groups they are with will actively be using records of their events in their own social media publicity so official photographs are likely to be close-ups and plentiful. Yes, I sacrifice control – I don’t get to chose what the pictures are of – but there are benefits too (more on that in a moment).

If I go on trips or events myself, do I still take pictures? It depends. If I was going to a gig and it seemed big and public enough, there is a significantly high possibility that someone will be posting pictures on social media during or after the gig and I can look at those after the event. If it was a family trip, well I can rely on the kids again or maybe this is when I would take a few photos myself.

A new area where I might have started taking pictures is technical conferences. I used to wait for slides to come out and was just getting to the point where I might have used my phone camera to take a picture of a slide to record it, when social media steps in again. These days I can follow on social media and if an interesting or number laden slide pops up then someone in the audience will almost certainly tweet it for me. Either that of most slides, or a variant of them, will often appear on sites such as slideshare.

So, in an era of social media it is very often possible to avoid interrupting your own experiences with a screen providing there are enough people around you who are taking photos – who feel like the event hasn’t happened unless it has been snapped, recorded and posted for others to see. So whilst some may lament the interruptions that screens are having in our experiences, there are some positive sides – selfishly, I can preserve events for posterity, but not have to worry about seeing it through a screen myself.

Psychologist Sherry Turkle calls this drive for recording “the documented life” and discusses how many will interrupt their own experience in order to make sure it is captured with a photo. I like the recounting of the following story (from the above article):

“Last spring, I had the occasion to spend a day with the actor and comedian Aziz Ansari discussing our mutual interest in the psychology of texting. As we walked through Los Angeles, people approached him every few minutes not to ask for an autograph, but to demand a photograph. Mr. Ansari is gracious to his fans. He explained that instead of a photograph, he would offer a conversation. He inquired about their taste in music, what they liked about his performances, his stand-up, his sitcom “Parks and Recreation.” His fans were mollified but they were rarely happy. They had to walk away with nothing on their phones.

She has a lot to say on this and the wider subject of lives mediated by technology.

Depending on others like this – is this fair? Is this ethical? I don’t know. I guess people will record and post things for posterity anyway. It is somewhat parasitical to rely on them and there are issues of ownership and copyright – but then that doesn’t stop most people posting to social media and I’m pretty sure almost every license to use social media means you allow the service provider to use them as they see fit. What permissions are granted to others though to use them too? I don’t know, especially for personal use – you wouldn’t be able to re-post them as your own work naturally.

It is also one of those things that if everyone took this attitude, it wouldn’t work for anyone. There is a trade-off and many will continue to feel the need to take their own photos in order to show “there were there” regardless of others.

Sherry Turkle again:

“Technology doesn’t just do things for us. It does things to us, changing not just what we do but who we are. The selfie makes us accustomed to putting ourselves and those around us “on pause” in order to document our lives. It is an extension of how we have learned to put our conversations “on pause” when we send or receive a text, an image, an email, a call. “

Personally, I’d rather experience the things without a screen in the way, without pausing the experience, whenever I can. If I get lucky and can grab a photograph off the Internet, all good. If I can’t, well I don’t always need to subscribe to the view that I need to interrupt an experience to document it. Sometimes it’s nice simply to remember it.



Permalink Leave a Comment

Next page »