Categories
CANAL

CANAL wizard beauty

I am currently in the process of developing vscpworks+ a new version of the VSCP Works toolbox. This is something that has been in the pipeline for many years now as the old version is pretty old and outdated at this time.

The previous version was developed using the wxWindgets framework and I never quite liked it. It is non intuitive and hard to work with IMHO. But at the time when it was selected, QT, which was the alternative GUI framework, had strange licensing and a very unsure path ahead. Well a bad choice as it turned out.

The year before last year I removed all dependencies of wxWidgets in the core code of VSCP software. That was quite a rewrite I can assure you. Now it is dependent almost only on standard C++. Now when that has been done time has come for the rewrite of the VSCP works toolbox.

My goal is to handle all the standard pieces of the VSCP specification in VSCP Works. Many are missing just because I thought that the old project was a dead end and that there was no meaning in putting in to much development in that end.

So this is a rewrite also. A large project. (Help is welcome 😉 )

But it not about the VSCP Works rewrite this post was supposed to be about. It is about CANAL.

Many many years ago I did the CANAL specification and it’s API as an abstraction layer for CAN (CAN Abstraction Layer). The thought was to select something really low-end and build VSCP functionality on top that. Thus allowing VSCP to work on really low end devices and on high end devices. Nope there is no tcp/ip and json at that level. Sorry.

The CANAL spec has survived over time and is more or less unchanged since it was created. Companies like Rusuka and 8Devices and others use it for there devices. It’s main use here is of course as the VSCP Level I driver API. The last common denominator format for a VSCP low end device is outlined from the constraint set up by this interface.

On the client side, there is the VSCP daemon that use the API, but there is also C/C++ code available, Python code, node.js code and more. (See https:docs.vscp.org)

The CANAL specification has one method that I never used in my client implementations (because of the reasons above) but which I think is very nice and beautiful indeed. It is a method that allow a CANAL driver to tell it’s client how it should be configured. This method should be implemented for all CANAL/VSCP Level I drivers and is called canalgetdriverinfo.

Before I go in to how it works I need to explain how CANAL/VSCP Level I drivers are configured. It is simple. There are a only two items that need to be configured.

  • The configuration string which is a semicolon separated string with driver specific configuration values.
  • The flags which is 32-bit unsigned integer where each bit or group of bits can be used for configuration.

So for the simplest of driver both of thees could be empy and for a really complex driver there could be many many complex options.

What the canalgetdriverinfo method does is to return a XML structure. This structure explains each option both for the configuration string and for the flags integer. The thought is of course that a client software, as soon as it knows the path to the driver, call this method and parse the XML content and then can be able to support the user with the configuration of the driver. Easy and nice and beautiful.

The XML object is constructed in such a way that it can present the configuration of the driver as a step by step wizard. So by going through the steps the driver can be set up in a way an end user (yes it could be a machine to) wants.

So in vscpworks+ when a user defines a CANAL/VSCP Level I driver this option will be present. Making it very easy to configure drivers without looking for documentation topics. The code is encapsulated in a couple of C++ classes so this code can in turn be used by other projects including Python and node.js code.

Just simple and beautiful as VSCP itself.

Categories
IoT VSCP

“I’m about to change the world”

Vscp_logga_wiki

When people ask me what I do I always answer “I am about to change the world” and I have been saying that since August in the year 2000 when the VSCP project was first started. It is fourteen years ago  now with millions of lines of code and many, many, many. many… hours of work and the bumblebee is still flying. The Swedish companies Ericsson and Electrolux rejected VSCP in favor of OSGi in the first months of its life, but to be honest, I think the real reason for the reject was the chance for the project group  to travel to international meetings, but don’t tell anyone. The result, the Screenfridge died and was the joke of the industry for many years.

Back then no one was talking about Internet Of Things of course. But the goal for this project has always been the same. We want small low cost things to be able to talk to each other regardless of the protocol they use and regardless if they talk through a cable or through the air or if they are delivered and manufactured by company B or company A. And knowing company A and B and C… we know that the VSCP way of thinking will never attract them fully. They will find there own way, “which is better”,  but of course incompatible,  but they will anyway. Vertical is the only way for many people to move.  So we are happy to place ourselves in between as a hardware abstraction layer also. So if they don’t adopt to the model they can be made to look like they did with a middle layer driver just as HAL in most OS’s of today.

We are  also , just as anyone else, waiting for “the mighty one” to come and hand the killer solution to us, just as we once got tcp/ip  and the packages handed over to us while everyone was busy working with X400/X500.  Actually ten fingers plus ten toes  isn’t enough to count all of the solutions we have tried to work together with during the years, all without a single exception  telling us that they where the final solution. All of them are gone now of course. Gone and forgotten. But the bumblebee still flies, not thinking it was the only solution back then and not thinking it is now.

But of course, for us a tiny device can be really tiny. Having almost no resources at all. A device that think something like a string is heavy stuff.  Silicon even.  A tiny little thing that still wants to send a measurement value to the world. Something important maybe. So I started there. Tiny things, larger things, and really big things should all work in the VSCP model . It is easier for the big to adopt to the small then vice versa. So I made the model around that.

So one day there was “a thing” that fulfilled the initial goals

  • Uniform device discovery and identification.
  • Uniform device configuration.
  • Autonomous/distributed device functionality.
  • A uniform way to update/maintain device firmware.

so I attended meetings and tried to present the solution, but of course there was always a big company that just started a multibillion dollar project (or a government financed project for that matter) that would solve this thing once and for all. Common for them all is the belief that  everything have one megabyte of flash at least and endless amounts of ram and a radio transceiver that does not even need current and of course all of these small devices is like small humans, even Facebook embraced all this and told the world they will build a Facebook for machines and soon Twitter will come and…. And the stupidity just goes on an on and on and all the tiny things are just left out. The tiny thing that counts for at least 90% of the estimated billions of devices everyone is talking about. The things that have 200 bytes of ram and less and maybe even is just silicon.

So I entered competitions. Did not win of course. Did not even get any attention. Probably no one even read the documents. There contain to few pictures of hot homes controlled by Nest’s and Ipads and IoT is not in capital letters all over the pages. And this is not a solution coming from a big company or a well known institution. So one day there was a IoT competition in Eindhoven in the Netherlands. Famous for being Philips home town. The tree top participants got a free ticket to the event and a chance to win a prize. So I asked all my friends to vote of course, everyone else did,  and VSCP was finally chosen as one of the tree selected (there was not that many participants). OpenHAB,  a home automation project,  based on OSGi (!!!) got most votes, and then came  the VSCP project and last a project called The Incredible Machine.  There are some info about the event here. At the last day of the event and because it was only three participants we ended up at place tree and I got two size small t-shirt as  a price. A Dutch joke maybe as I am a +110 kg person!?  But if there had been four entries or more  we would not even been among the three winners.  Why is that? Is it because VSCP is totally useless. No I’m sure the judges on this event as on every other IoT competition just like good looking (but pretty useless) things and gadgets, gadgets, gadgets and never ending toys.  They don’t even understand the things that are needed to get this thing IoT  everyone is talking about going. Actually most of the people working with it is utterly fools that should be put back to kindergarten at first possible chance to do so. Most of the stuff coming up is just a joke IMHO. Yes a JOKE.

So did I stop to say “I will change the world” after this?

Noop

Did I stop to say it after I searched VSCP on Google trends and got a really sad result

2014-04-23_21-53-03

Noop. What is fourteen years of hard work without anyone even notice you are there. If you feel in your heart that something is right it probably is.  Ask Mr. Tesla… Oh well it could be hard, but if he was around we would have told you. So I move on.

And sometimes you find a page like this one

2014-04-23_22-01-36

and you understand that at least one person has seen the beauty of VSCP and you which more people did. And you see Alljoyn an other projects getting started from scratch and they have never ever taken a look at what’s already available. People don’t do that  anymore. I would be utterly surprised if anyone of the Alljoyn alliance ever cared to read a page of the VSCP spec. But they think I should read the documents of course and as all the other projects that has  been there for a while and then disappeared even without a small amount of smoke remaining after they are gone they will probably finally also vanish into the air. Or maybe set a standard for IoT things. For the big things. With huge  memory, power and glory and pride and a horn to beep with. Less then ten percent of the devices.

I will still continue to say that I will change the world. I will. maybe I will die before I actually do and  I think I add

  • There is one way to Discover them all.
  • There is one way to Configure them all.
  • There is one way to Update firmware of them all.
  • There is MANY ways to communicate with them all.

to that.  And please understand that I am the bumblebee that WILL change the world.  And I am just utterly happy trying to do that.

 

Categories
VSCP

VSCP downloads increase every week #IoT #VSCP #M2M

2014-04-08 20-08-03

Download your copy here.