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)