Category Archives: VSCP

State of VSCP

The thought was that I would do the 13.1.0 release today. But I have to postpone this until after my summer vacation. Well it to should have started today, but it also is postponed until Tuesday. But then I will be four weeks away from the computers and the  bugs. It is very warm and dry in Sweden now, and has been so since May,  and actually an office is NOT the place to be.

I work with a full Debian package for VSCP at the moment. It is a lot of rules. A lot of info to take in. A lot of things to add and change. After this is finished I will hopefully manage to get a sponsor/mentor at Debian and after that VSCP can enter in the golden path of Debian distribution, meaning much simpler installation and update for all in the future.

So I will silence for a while from now on so don’t expect rapid replies and fixes during this time. Hopefully I will come back after the vacation with a lot of new energy.

Have fun!

VSCP Events

VSCP event files and docs now is auto generated.  The docs for the scripts that generate the misc. file is here if you are interested.

Updated files will be available here https://www.vscp.org/events/ The docs sub folder here contains event documentation in markdown and also a zip and a tar of all content. This information is generated for the VSCP specification document.

All files generated contains version information which is the date and time when the docs was generated. This information is embedded in the generated files (if possible) and also available in JSON form here (version.json) and in JSONP form here (version.jsonp). In automated processes compare the on-site version information in one of there file with the downloaded version and download a new version if a newer one is available.

C header files are are here for event classes (vscp_class.h) and here for event types (vscp_type.h). The files are automatically included in the vscp and the vscp-firmware packages.

Python VSCP event include files are here for VSCP classes (vscp_class.py) and here for vscp types (vscp_type.py). The files are automatically included in the pyvscp package.

The vscp_hashclass.h and vscp_hashtype.h files are headers for the vscp helper class.

For JavaScript VSCP events are available in JSON format (vscp_events.json) and in JSONP format (vscp_events.jsonp).

vscp_class.js and vscp_type.js holds VSCP class and VSCP type information suitable for JavaScript.

XML format is available here (vscp_events.xml).

SQL format is available here (vscp_events.sql).

 

State of #VSCP

It’ been quiet on all VSCP fronts for a while.  Well VSCP is anyway probably the least written about project in the world in relation to time alive and efforts put into it. And that is OK as long as things move forward (and they do – slowly).

We approach 18 years of VSCP now in August. I never could see that coming when I started this project.  I think I have worked almost daily during this time on the project. Crazy if you think about it.

A lot of other projects has emerged (and died) now with the buzz of IoT.  It’s a bit like waves of knowledge coming to people unused to embedded development who never ask questions to people that has been into embedded development for ages. First everything  should connect to the cloud, then people realised that that was not the best solution, it was impossible to realize actually,  border routers was introduced, we called them (home) gateways before, then web standards where abandoned for binary protocols and so on. Soon someone will realize that things will we both wireless and connected with cables and that small devices really have limited resources and then we probably end up in something like what VSCP has been about all the time. Well, it’s the way things work in our industry. Hype, hype, hype. Happy, happy, sad.

Here is the current state.

TSL/SSL

OK VSCP. Changes has been made to the VSCP daemon. The mongoose tcp/ip code is on the way out and is replaced with some code derived from the Civetweb project.  A fun thing is that this derived code is also the ancestor to the Mongoose code to. Good thing is that now all the VSCP Daemon code will be MIT licensed.  Freedom for you.

The derived code is published as a separate project sockettcp (still needs to be documented) and this is code that makes it easy to code tcp clients/servers that use TSL/SSL or unsecure connections. Works on Windows and Linux.

The VSCP Daemon tcp/ip interface will therefore be fully TLS/SSL from the next version.

Encryption will also be introduced in another layer to both the winsock and the tcp/ip interfaces. Much like what is available today in the multicast and UDP interfaces. This makes it possible for clients that don’t have the ower to use full TSL/SSL to still implement secure connections.

VSCP Daemon

Yes I changed the name to “VSCP Server” for a while. Just like “VSCP Dameon” better. so I changed back. Probably will use the term  “Border Router” for this piece of software more in the future.

Documentation

Most if the documentation (still some work left to do on VSCP Works) has now been moved to Markdown and is available on Gitbook (old paths work). Docs are licensed under Creative Commons BY 4.0 now. Search and pdf/ebook availabilities is the good things that come with this change. Source for the docs are available on Github (vscp-doc-….) and it is now easy to post corrections and changes as for all Git projects.

Specs

To add classes and types has been something that has been getting harder and harder over time. The defines for them are all over the place. A change/addition means editing all these places. This has been changed now so all files are auto-generated including the class/type part of the VSCP spec. JSON/XML/sql… and other formats will be available soon for dynamic downloads.

Well there is a lot more changes in the code and it will all be included in the next release that will be available later this summer.

Snap

VSCP will use the snap package system. Easy install. Easy use. Debian packages is still in the pipeline to.

Help

I will not ask directly for help here any more. It’s been a useless question to ask all times I tried (many now… 😉 ). That is OK.  If you been hanging around the project you know you are welcome to contribute. The ever growing todo list is here.

That’s all for now. Midsummer here tomorrow.  A day without any VSCP related work all together.

Have fun!
/Ake

#VSCP interfaces howto

Something that may confuse new users of VSCP is the GUID of interfaces. Looking at the interface above the CAN4VSCP driver have GUID set to

FF:FF:FF:FF:FF:FF:FF:FE:B8:27:EB:0A:00:02:00:00

which means nodes connected to this interface will come in with GUID’s

FF:FF:FF:FF:FF:FF:FF:FE:B8:27:EB:0A:00:02:00:01
FF:FF:FF:FF:FF:FF:FF:FE:B8:27:EB:0A:00:02:00:02
FF:FF:FF:FF:FF:FF:FF:FE:B8:27:EB:0A:00:02:00:03
FF:FF:FF:FF:FF:FF:FF:FE:B8:27:EB:0A:00:02:00:04
....

If we look at the GUID’s if this machine we see that they all start with

FF:FF:FF:FF:FF:FF:FF:FE

As of  the spec we know that this is a GUID constructed from an Ethernet address. In this case only four of the six MAC digits is used. The

00:02

is the interface id as set by the VSCP daemon and the last two digits are the nickname id for a connected node.

The problem that can occur here is that the interface digits can be different at different runs of the VSCP daemon. The number is just set when the interface is set up and from time to time this setup can happen in different order. So sometime

00:02

can be

00:03

or even

00:11

One can’t tell beforehand.

This is a problem if one want to use the GUID to identify a node. Problematic as this is just what we want in most cases. To trigger on an event from a specific node in a decision matrix the GUID is the item to filter on. Just as in this case

Here we store a temperature measurement in a variable if it comes from a node with GUID

FF:FF:FF:FF:FF:FF:FF:FE:B8:27:EB:0A:00:02:00:01

and measurement index = 1

If the interface ordinal  becomes something else like

00:03

we are in trouble here as the action (store measurement value in variable) will not be triggered.

If we look at the current driver for this setup it is set to

 

<!-- The can4vscp driver -->
<driver enable="false" >
    <name>can4vscp</name>
    <config>/dev/ttyUSB1</config>
    <path>/srv/vscp/drivers/level1/vscpl1drv-can4vscp.so</path>
 <guid>00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00</guid>
    <flag>>0</flags>
</driver>

The “problem” is solved by changing the <guid> tag from an all zero value (or not defined) to a valid GUID.  If not defined or all zero the VSCP daemon will assign a GUID as of above. But if a valid GUID is set this value will always be used.

In my case I can use

01:00:00:00:00:00:00:00:00:00:00:00:01:02:00:00

as I have some assigned GUIDs.  The two LSB’s is still used for the nicknames.

After that change the “problem” is no more and I can filter on the new GUID instead which alway will be the same.