Monday, 26 December 2016

Game Programming patterns

After working my way through a course on C++ and The Unreal Engine, I noticed some really interesting overlaps between the work I've been recently doing on robots and the work I'm going to be working on next year (Cognitive computing).

Anyway, just thought I'd link to this great book, that is also available for free to read online (downloadable pdf available, as well as a real physical book).

Monday, 19 December 2016

IBM & BMW and IoT

I don't know what you were doing a couple of months ago?.... but I know what I was doing with one of those BMW i8s :-)

This was my "office desk"

There are times I love my job.....

"The Internet of Things is transforming our relationship with the physical world. In Munich Germany, IBM is creating a new global center for collaborative innovation side-by-side with clients and partners. IBM will invest $200 million US to make Watson IoT HQ one of the most advanced facilities in the world.

BMW is one of the first collocated partners and together, we will start a new pilot program to explore the role of IBM Watson in the BMW i8 hybrid car. BMW engineers & IBM experts will work together in "collaboratories" to explore Watson technologies for personalization of the driving experience.

With conversational interfaces & machine learning, cars will get to know their drivers better."

Wednesday, 14 December 2016

Tuesday, 6 December 2016

A case of the Vapors

This one?

or this one?

"Create modern web apps, sites, and APIs using HTTP or real-time apps using WebSockets.
Nearly 100x faster than popular web frameworks using Ruby and PHP. Swift is fast by every meaning of the word.
The latest cryptographic ciphers, digests, and LibreSSL's new TLS (SSL) make security easy.
With middleware and Swift extensions, you can add custom functionality to Vapor that feels native.
The static type system allows you to write less and do more. Vapor apps are very concise and even more powerful.
With autocomplete, debugging, and breakpoints you'll spend more time creating and less time fixing."

I like the definition of "fun"......not quite how I would describe it, but, hey-ho, I'll let you decide :-)

Thursday, 1 December 2016

Some light reading....

some "light" reading for the next month or so.......

should keep me busy and out of trouble....or it could get me "into" trouble  :-D

Monday, 21 November 2016

Zorin OS

Another week, another "this will solve world peace" Linux Distro....

except, I like the look of this one:

There is an ULTIMATE version that currently costs $15 and adds a load of things.

For trial purposes, there is a CORE version, that has all the essentials, minus a few of the custom elements.

If I get time this week, I'll do a USB install onto a 64Gb USB stick and see how easy it is to transition over to, or whether it is just like using a Debian / UBuntu distro with a new set of wallpapers....

Tuesday, 15 November 2016

PolySync autonomous vehicle

PolySync Arduino-fest..... but you have to have a Kia Soul...for now:


If you’re tired of waiting around to get an autonomous vehicle, PolySync’s Open Source Car Control Project (OSCC) development kit can be had for under $1000.
Autonomous cars are still in their infancy, and can cost upwards of $100,000. If you’re willing to do some of the work yourself—and trust a machine you modified to drive you around—PolySync has an Arduino-based kit (nearly) available to help you build your own.
You can pre-order a kit right now for $649, and you’ll have program each Arduino module yourself when you receive it. You’ll also need a 2014-or-later Kia Soul on which to install it, chosen for its combination of drive-by-wire controls as well as relatively low price. Keep in mind, however, the project is intended for R&D and off-road use only.
The OSCC Project is built around a number of individual modules that interoperate to create a fully controllable vehicle. These modules are built from Arduinos and Arduino shields designed specifically for interfacing with various vehicle components. Once these modules have been programmed with the accompanying firmware and installed into the vehicle, the vehicle is ready to receive control commands sent over a CAN bus from a computer running a control program.

Tuesday, 8 November 2016

IoT Worm via Zigbee

Zigbee...Zigbee....Zigbee..... yep, I have quite a few of these in my "Arduino" stash drawer.

Have you used the Zigbee in any of your IoT projects?  If might want to read on....

"Within the next few years, billions of IoT devices will densely populate our cities.

In this paper we describe a new type of threat in which adjacent IoT devices will infect each other with a worm that will spread explosively over large areas in a kind of nuclear chain reaction, provided that the density of compatible IoT devices exceeds a certain critical mass. In particular, we developed and verified such an infection using the popular Philips Hue smart lamps as a platform.
The worm spreads by jumping directly from one lamp to its neighbours, using only their built-in ZigBee wireless connectivity and their physical proximity. The attack can start by plugging in a single infected bulb anywhere in the city, and then catastrophically spread everywhere within minutes, enabling the attacker to turn all the city lights on or off, permanently brick them, or exploit them in a massive DDOS attack. To demonstrate the risks involved, we use results from percolation theory to estimate the critical mass of installed devices for a typical city such as Paris whose area is about 105 square km: The chain reaction will fizzle if there are fewer than about 15,000 randomly located smart lights in the whole city, but will spread everywhere when the number exceeds this critical mass (which had almost certainly been surpassed already).

To make such an attack possible, we had to find a way to remotely yank already installed lamps from their current networks, and to perform over-the-air firmware updates. We overcame the first problem by discovering and exploiting a major bug in the implementation of the Touch link part of the ZigBee Light Link protocol, which is supposed to stop such attempts with a proximity test. To solve the second problem, we developed a new version of a side channel attack to extract the global AES-CCM key that Philips uses to encrypt and authenticate new firmware. We used only readily available equipment costing a few hundred dollars, and managed to find this key without seeing any actual updates. This demonstrates once again how difficult it is to get security right even for a large company that uses standard cryptographic techniques to protect a major product.

Sunday, 30 October 2016

Elementary OS

"Elementary, my dear Watson".....

A fast and Open replacement for Windows and MacOS.  Interesting.

Wednesday, 19 October 2016

The next few months of play

Toys for me to work on over the next couple of months:
 Raspberry Pi 3 C programming...

Combine Arduino, webcam and a Sherman tank with WiFi capabilities....

and finally, insert some radio equipment and motor into this boat, so it too can be controlled over the internet, etc.... also put a load of sensors on everything to capture data and feed back to Node-Red IoT services.

If you have any other/extra ideas of what I could do with these, please feel free to let me know :-)

World's biggest IoT online conference for developers

If you are not up to much on Saturday/Sunday October 29/30th, get online and join in:

"IoT With The Best second edition is a two-day online conference tailored for developers wanting to explore IoT deeper and enjoy an interactive empowering experience while connecting with peers from all over the world. 

Join from wherever you may be, the world's top IoT experts to get inspired and learn from their tech talks and masterclasses. 

Explore the hardware, software, data and services behind IoT. With The Best is the biggest Online Conference Series for developers. Join 100 IoT experts (CEOs, CTOs, Architects, Researchers and Devs) for exclusive tech talks, live coding and demos on sensors, smart grids, smart homes, smart cities, intelligent transportation, connected devices and wearables. Go further and benefit from 1-to-1 mentoring sessions with the speakers."

Tuesday, 18 October 2016

CAN-Bus Arduino shield

After receiving my Can-Bus Arduino shield & cable from ElecFreaks (very fast P&P!), having a little play around with some C code and then soldering the pin legs on, it was time to give it a little test run in the car.  I chose the 2016 Mercedes c200.  Why? Well, it was the nearest :-)

(I had an old DFRobot Romeo knocking around, should really be for robot programming, but it does the job)

Hmmm...... well, after a little bit of fiddling I managed to start reading some data and boy, is it chatty!

Somewhere in the end of that file are the codes from the Drivers side window going up and down.

Next step, isolate the ID codes and the commands and replay them back to the car....
(or just identify which ones give me some useful information)

Saturday, 15 October 2016

Hack the a car

Some of you might know that I've been building a custom car (for what feels like an eternity) and I have kept it really basic with no modern technology at all.  (Hey, I've seen some of the code you guys (and myself) write, I'm not trusting that in my £100k car!).

Here's a photo of earlier in the year, minus lots of things, working brakes being one of them, hence the custom low-loader delivery truck:

So whilst I keep Lil'Merc nice and dumb, I do have an MG F, a Subaru Sambar and a shiny new Mercedes c200 company car, that has LOTS of new technology.

I went through a cycle of getting various OBDII bluetooth devices for the MG F, only to find that is was built 6 months before that technology was adopted and has a MEMS unit in it, which is not compatible. Sigh.  I even did some diagnostic work with this guys Android app to try and get it to work, with no luck.  So I did what I do best.  I threw the stuff to the back of the "Play desk" and got on and did some "other" stuff.

Well....time has moved on, things have changed and I did some stuff recently (for work/work) that led me to look into connecting to cars at a low level.  According to "the people that know", modern cars are just at the tipping point, where they will ALL BE CONNECTED, ALL OF THE TIME.

Yay!, WooHoo! great, 5G access from my vehicle, oh hang on, "won't that be like Big Brother in my car?  Will my insurance company be monitoring my every move / speed etc...?" This type of thinking will get counter-acted with responses like: "Yes, but think of the benefits and all the good/nice shiny stuff that you will now be able to do, it's okay, it's just a small compromise, honest...." well, anyway, I'll not discuss the ethics of such things, it's going to happen, it's just a matter of when & how:

What was the point I was going to make.....oh, I remember :-)

I'm currently typing this post on a KALI Linux OS laptop.  Most of people will not really know what that means (or care!).  But you should.  You REALLY should.  Why?  Well, it gives me access to pretty much all of the tools I need to perform Penetration Testing of Networks and Software.  "Why would I have this", you ask?  Well, partly for "fun", but mainly for curiosity and, well, because I like to know how things work "inside the black box".

You would be really surprised how many home WiFi can be hacked into in less than an hour - yes, even today, in 2016, it is still that simple.  Why?  Consumers, or "users" as us IT chaps like to call people.  Consumers like simple (just ask Microsoft about Windows XP), what consumers like to think is: "the manufacturer has my back, they've done everything for me, I just plug-n-play and the world is made of marshmallows and fluffy candy...skip..skip...skip..."

The truth is quite a way off from that.  I'll save Home Networking and the Internet-of-things for a future post, as I'm trying to remind myself to stick to the topic of cars.

I just dug out the "stuff" that I put to the back of the "Play desk", dusted off a Raspberry Pi Zero, my C-programming wurzel gummage head and got to reading all about CAN bus sniffing with WireShark from my Kali Linux OS laptop....

By the end of the weekend, I may or may not have "bricked" my Mercedes c200 or my MG F or my Subaru Sambar (not going anywhere near my wife's car!), but I will have learnt a LOT more about how it talks to itself, how I can listen to those conversations, how I can inject my own code to "do things" well as finding out, just how secure my car is from the outside.

Today, people think, "I've installed anti-virus software on my tablet / laptop, I'm protected".  But, in the very near future, they will have to start thinking, "am I safe & secure when I get in my car?"  and I don't mean the seat belt style safe&secure, I mean, "did that geek sitting in that coffee shop window I just stopped at for the red-light, just hook into my cars WiFi, drop an app into my car that is now sending data back to his laptop and then allow him to have full control of my car?  such as locking the doors and holding me to ransom and only releasing me when I pay.  Then deleting all reference from the cars computer and being totally untraceable?"

Sounds like something from a movie....but it'll soon be a real possibility... so if you want to know more about hacking a car, either visit AMAZON and buy the book for £35+ or CLICK HERE for an earlier pdf version.    Happy reading.

"If you’re curious about automotive security and have the urge to hack a two-ton computer, make The Car Hacker’s Handbook your first stop."

UPDATE: This Arduino Can-Bus Shield looks like a great place to start with the physical access

Friday, 14 October 2016

Finally......Code C on Raspberry Pi (book)

Well, you could have done this previously (of course), but is is sooooooo nice to see that this has become more mainstream.

If, like me, you have played around with Arduino (for many many years!), then you most likely were coding in C.  Then the Raspberry Pi came out and everyone was excited, yay! it was a mini-Linux 'puter that could do stuff with GPIO pins (or not), but a vast majority of the code you found was for Python.

Begrudgingly, I did actually use some Python to control my Maplin robotic arm from a web page, which worked and the code did make sense.  But, and this is a big BUT, I don't know, maybe I'm old skool, I just didn't LIKE coding in Python.  It felt like Perl (now who remembers that nightmare from the early 2000s!!!), it allowed you to do a lot of stuff and you could hack stuff together, but come back in 6 months time and you were none the wiser.  Don't even think about picking up code from someone else!

Anyway, I digress, through a series of events, I ended up with a Fujitsu Lifebook (small tablet computer) that is running Point Linux and I could code C on it.  Cool stuff.  So, (as you do), I wrote my own "naughty" version of PING.  You know the one, it's the first thing you type at a prompt when your web browser says, "No Connection".  Well, I wrote the C code for doing what Ping does, but I decided to "cough cough" 'extend' it a little, so that it does a full port scan/probe of the destination IP address.  Cool little tool to have btw.

Damn it, I digressed again...oh wait, back to the original thread.  Okay, so whilst I have been basking in the C programming glory for a while, I was thinking to myself, I have (too many) Raspberry Pis sitting on my "Play desk" waiting for me to do something funky with them, why am I not getting on with doing something?..... and the penny dropped.  Whilst I can do some funky stuff with Node-Red (IoT related things), I should really be doing more lower level stuff.... and I really still do not revel in having to use Python.  I don't know, maybe it just reminds me of PHP or something (ask Dion!).

Then yesterday I received an email with this image:
Ohhhh!!! then I thought about it a little more and then I realised, you've been able to code in C on a Pi for ages, in fact I think I even did do so about a year ago, but I got distracted by my day job (funny that) and it slipped my mind.

(Okay, the link to download the PDF, is kinda, not obvious, "look to the right....and look for the word 'FREE'")

It's a great refresher for all those people (over a certain age), who "got into IT" back when you learnt to code in C.  Guess what? you can again, my friend.  Go relive some fond memories, but more importantly, go and do some NEW things that the Raspberry Pi offers you too, plus get it doing stuff with the Cloud.

Seriously, this weekend, get the book, dust off the Pi that you've had connected to a web-cam for the past year (doing nothing) and "make a thing", there are so many things you can do now.
Impress your friends, okay maybe not.
Impress your children, okay maybe not.
Impress your wife....okay, I'm going too far now.

Talking of wife, my missus saw me looking at this and her first comment was, "I hope you use pointers properly this time".   I love my missus :-D

psttt... go do some C coding....... now!

Thursday, 13 October 2016

Be a nerd and have fun

I was invited to do some work at the new IoT Watson offices in Munich : Highlight Towers

After work, I was invited for a meal...I was told there was an interesting guy who was going to join the team.  Anyway, due to some error with the restaurant booking, I had the pleasure of being on a 4-person table with John Cohn for the entire evening.

I'm not sure who was the geekier / nerdier.  As you can imagine, Arduino's, MQTT, Pi's, Robotics, all-the-IBM stuff and a ton of other stuff was talked about and laughed about.  It was a great evening and helped me to realise, I should stay as I am and not "become what management structures" think I should be.

Continue to have fun and actually do that rare thing: ENJOY what you do.  If you do not, stop doing it, do something else.  I know I have fun & actually enjoy what I do.

Look forward to some "fun" postings over the next year - rather than "an IBM sales blog" (as a good Friend recently called this site).  I can see where he was coming from, it did kind of become a work repository rather than general geeky stuff.

Monday, 10 October 2016

JavaScript Speech 2kb!

Yes, you read that correctly, SpeechRecognition in your web-browser from a 2Kb JavaScript library...

Oh, did I mention that it can also be used by your ARDUINO!

That is pretty darned awesome....

(and here's a video of some chap coding with it in AngularJS.  all very simple)

Tuesday, 27 September 2016

Connecting IoT devices to the Watson Conversation Car-Dashboard app

Using "Watson Conversation Speech to Text" to control a simple physical IoT device

It has been a couple of months since I did anything "exciting", I just noticed this great developerWorks recipe and thought, "Hey, I've got to share that, it's pretty awesome!".

It also contains the code to get you up & running, see section (6) at the bottom of the page.

Saturday, 30 July 2016

Learn the IBM Watson API

Use IBM's Personality Insights API to analyze traits shared between two Twitter users.

I don't do Twitter, so, it's of no use to me, but hey, you might find it useful?

Monday, 25 July 2016

IBM MobileFirst Platform v8 - install and sample Hybrid app

Fancy having a quick run through of setting up IBM MobileFirst Platform Server Foundation v8 and having a working app as a starter for ten?  Then look no further.

Here's a presentation of how I made this work for me:

Friday, 8 July 2016

Japanese self-driving bus

I am absolutely, in no way, making any implications that I have anything to do with this type of technology, but I thought this was a good article about "Tomorrows World" getting closer to today:

This is the sort of technology for cities, that a society that I would like to live in, could use to help them go about their day, without the risk that some neanderthal uggs decide they are going to trash/abuse and ruin it for everyone.... maybe, Japan is finally calling to me?  ;-)

Wednesday, 1 June 2016

MobileFirst v7.1 oAuth JMeter Performance Testing Adapters

So, you've setup your IBM MobileFirst Platform Server UAT/TEST/INT environment and now you want to perform some Performance Testing to see how much load your MFP Servers can take before failing?... Then you start the cycle of tuning, tweaking, enhancing and squeezing to get the best performance for your specific environment...

Full credits go to Nir Grande and his original Blog post about this subject, I hope I've just enhanced the explanation for people who are applying the setup themselves.

Monday, 23 May 2016

Friday, 20 May 2016

Oculus Rift arrived today

My Oculus Rift arrived today:

Pretty awesome, but I don't have a Windows PC powerful enough (or with a good enough graphics card) to use it.  shame.  Guess I'll stick to the Samsung GearVR for a while longer :-D

Hyper Reality

A really cool 6 minute video showing a potential future with Augmented Reality:


Tuesday, 10 May 2016

Telic Alcatel Minitel - running as a USB Raspberry Pi Terminal

A short while back I was surfing good old eBay, when I stumbled over a Minitel machine.
After doing a bit of checking on wikipedia, I found out that it was an old 1980s machine that was the Internet before the Internet....but they only switched off the service in July 2012!
It involved you dialing up a phone number, connecting your phone to the device and then using the keyboard and special orange function keys to navigate around.
It looks to be like a Prestel / Teletext / Ceefax / CompuServe type of "internet".  Remember those days :-)  If you're from the US, then think early days AOL (before the free CDs).

Anyway, I happen to have won a bid and the nice snug little device arrived at my humble abode waiting for me to do something useful with it.  First of all, I was surprised that it actually worked!  It powered on and everything!  I say, "everything" it just sat there with a blinking cursor and didn't really do anything at all.  Oh and there was no manual.

I did however spend some time surfing the good old interwebs and found that some smart people had converted their Minitel devices to be USB Linux Terminals.

The gauntlet was thrown.  The challenge was accepted.  A couple of 1am night times were had.  But, I got there in the end!  Oh, and I used a Raspberry Pi 2 as well.  Extra geek points awarded.  I "was" going to do something with an Arduino, but I wanted to keep the device in as original spec as I could (yes, I did just say that).  I wanted to re-use the keyboard and monitor with no extra hacking.

Oh, did I also mention that I could not find ANYONE who has done this with a Minitel 1 device?  Read that again, a "Minitel 1", not a "1b" or any other version, a "Minitel 1".  That is correct the one WITHOUT the FNCT button!
So, all you people that post replies on forums stating, "just press FNCT T+A, FNCT T+E, etc...", yeah, it doesn't work on these devices as there is NO FNCT button!  I did however find out what you do have to do.... see the in-depth article for more details!

Wednesday, 4 May 2016

Kitura - Server-side SWIFT

Build end-to-end apps using Swift with Kitura.  Kitura is a new, modular, package-based web framework written in the Swift language.

Put simply, if you write iOS apps using Swift for iPhone/iPad, then you can now write Swift code Server-side.  Personally, I think I'll stick with writing JavaScript server-side as I've been doing that since 2001 and I'm not a hipster...

Friday, 29 April 2016

Raspberry Pi3 MusicBox player

A Raspberry old radio/speaker box... time to make a "portable" music player, that not only plays local music, but streams from Spotify etc..etc... and is controlled from a web-app that you control from your web-browser (running on any device you fancy)