{"id":1920,"date":"2016-09-09T09:05:04","date_gmt":"2016-09-09T09:05:04","guid":{"rendered":"http:\/\/grodansparadis.com\/wordpress\/?p=1920"},"modified":"2016-09-09T09:05:04","modified_gmt":"2016-09-09T09:05:04","slug":"the-vscp-guid-iot-m2m-vscp","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=1920","title":{"rendered":"The VSCP GUID #IoT #m2m #VSCP"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1719\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=1719\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?fit=4128%2C2322&amp;ssl=1\" data-orig-size=\"4128,2322\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;GT-I9500&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1460730442&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.2&quot;,&quot;iso&quot;:&quot;320&quot;,&quot;shutter_speed&quot;:&quot;0.058823529411765&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"20160415_142722\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?fit=580%2C326&amp;ssl=1\" class=\"alignnone size-full wp-image-1719\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?resize=580%2C326\" alt=\"20160415_142722\" width=\"580\" height=\"326\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?w=4128&amp;ssl=1 4128w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?w=1160&amp;ssl=1 1160w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/04\/20160415_142722.jpg?w=1740&amp;ssl=1 1740w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>Today I am writing about the globally unique identification code (GUID). Can it be more boring than that?\u00a0 Well maybe not, but it is needed in VSCP, and it is important for any VSCP system to work.<\/p>\n<p>Lets get started.<\/p>\n<p>First the VSCP GUID is 16-bytes and looks something like this<\/p>\n<p><strong>FF:60:83:12:111:49:A0:1C:00:97:97:C8:CC:02:01:42<\/strong><\/p>\n<p>Sixteen hex bytes forming a globally unique id. MSB is to the left. An empty or unassigned GUID is represented by all nills<\/p>\n<p><strong>00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00<\/strong><\/p>\n<p>you can see this in many configuration files where the GUID is expected to\u00a0 come from some other place. This unassigned GUID should never be used on a working system.<\/p>\n<p>By writing to <a href=\"mailto:guid@vscp.org\">guid@vscp.org<\/a> and request a GUID series you can get a series of GUID&#8217;s for your own project. Doing so you will get something like<\/p>\n<p><strong>27:00:00:00:00:00:00:00:00:00:00:00:XX:XX:XX:XX<\/strong><\/p>\n<p>(this GUID btw belongs to <a href=\"http:\/\/www.grodansparadis.com\">Grodans Paradis AB<\/a>).<\/p>\n<p>The <strong>XX:XX:XX:XX<\/strong> part is what we have for our own devices.\u00a0 So with it we can start out and set<\/p>\n<p><strong>00:aa:bb:cc<\/strong><\/p>\n<p>for product series 00 (aa:bb:cc is increased for every built unit) and products series 01 get<\/p>\n<p><strong>01:aa:bb:cc<\/strong><\/p>\n<p>etc.\u00a0 Or we just have a number that is increase for every product made. Or we request a new series of GUID&#8217;s for each product series. The important thing is that no other device on earth (or in the universe for that matter) should have the same GUID.<\/p>\n<p>Requesting GUID&#8217;s is btw free of charge. After all VSCP IS free, will be free and is proud to be free and open forever. We may starve to death in the process of keeping it that way though. I can promise GUID&#8217;s (and VSCP) will still be free.<\/p>\n<p>You can find current assigned GUID&#8217;s <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=appendix_a\">here<\/a>.<\/p>\n<p>But wait now, with VSCP being the protocol of the world, the IoT framework that unite them all, every IoT makers first choice etc, should it not be a lot more people requesting GUID&#8217;s. (Note: Joking here (Note: At least try to. ) )<\/p>\n<p>Well one of the reasons is that you actually do not need to request a GUID, you probably have one already, or more precise you can form one.<\/p>\n<p>For example if you have a machine that have an Ethernet MAC address you are in the free. Using it you also have a series of GUID&#8217;s you can use.\u00a0 The reason is that some GUID series has been set aside for other id series. You can find them all <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=globally_unique_identifiers\">here<\/a>.<\/p>\n<p><strong>FF:FF:FF:FF:FF:FF:FF:FE:YY:YY:YY:YY:YY:YY:XX:XX <\/strong><\/p>\n<p>The series<\/p>\n<p><strong>FF:FF:FF:FF:FF:FF:FF:FE:00:00:00:00:00:00:00:00<\/strong><\/p>\n<p>is set aside for Ethernet MAC range. The<\/p>\n<p><strong>YY:YY:YY:YY:YY:YY<\/strong><\/p>\n<p>is the MAC address (MSB left, first), and<\/p>\n<p><strong>XX:XX<\/strong><\/p>\n<p>is the part you can assign to your own devices.<\/p>\n<p>There is also a range set aside for IPv4 addresses<\/p>\n<p><strong>FF:FF:FF:FF:FF:FF:FF:FD:YY:YY:YY:YY:XX:XX:XX:XX<\/strong><\/p>\n<p>where again<\/p>\n<p><strong>YY:YY:YY:YY<\/strong><\/p>\n<p>is the IPv4 address and<\/p>\n<p><strong>XX:XX:XX:XX<\/strong><\/p>\n<p>is the bytes you can use for your own devices.<\/p>\n<p>If you <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=globally_unique_identifiers\">look at the list<\/a> there are many other possibilities to form GUID&#8217;s from other unique ID&#8217;s.<\/p>\n<p><strong>Where is it stored?<\/strong><\/p>\n<p>Every device have a GUID and it is stored in the standard register space from where you can read it. You find it at address 208\/0xD0-223\/0xDF for a Level I device and on address 0xffffffd0 &#8211; 0xffffffdf on a Level II device.<\/p>\n<p><strong>Proxy GUID&#8217;s<\/strong><\/p>\n<p>When a device send you an event in higher level software the GUID is usually part of the message. For instance you can get a temperature sent to you from a device with GUID<\/p>\n<p><strong>FF:FF:FF:FF:FF:FF:FF:FD:C0:A8:01:33:01:02:00:04<\/strong><\/p>\n<p>and then when you read the GUID from the actual device you get<\/p>\n<p><strong>32:00:00:00:00:00:00:00:00:00:00:00:20:13:02:88<\/strong><\/p>\n<p>which appears to be wrong. But it isn\u2019t actually wrong, the temperature event from the device have just probably passed another interface which acted like a proxy for the actual device.<\/p>\n<p>This is not as hard to understand as it sound.\u00a0 GUID&#8217;s are 16 bytes and therefore far to big to use in many low-end transmission media. On the CAN bus for example VSCP uses only one byte for its id.\u00a0 This byte is called a nickname id as it is a nickname, a simpler version, of the full GUID.\u00a0 Other systems may have 16-bit nicknames and even other formats.<\/p>\n<p>The thing with VSCP nicknames is that when they pass an interface they wil take the interfaces GUID and place the nickname in the LSB. So the GUID<\/p>\n<p><strong>FF:FF:FF:FF:FF:FF:FF:FD:C0:A8:01:33:01:02:00:04<\/strong><\/p>\n<p>comes from an interface<\/p>\n<p><strong>FF:FF:FF:FF:FF:FF:FF:FD:C0:A8:01:33:01:02:00:00<\/strong><\/p>\n<p>on a machine with IP address 192.168.1.51 (C0:A8:01:33:01) .\u00a0 On that interface a node has reported a temperature and that node use the nickname 04 or 0004 on the subsystem connected to the interface.\u00a0 I can now communicate with that device on this GUID as it was the GUID of the device itself and actually it is in a way.<\/p>\n<p>GUID&#8217;s are used for everything in VSCP. Locations also have GUID&#8217;s. Servers have them. The principle is simple. Very simple indeed.<\/p>\n<p>That was all for this week.\u00a0 Enjoy your weekend. I will work with a new admin interface for the VSCP daemon this weekend.<\/p>\n<p>Cheers<br \/>\n\/Ake<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I am writing about the globally unique identification code (GUID). Can it be more boring than that?\u00a0 Well maybe not, but it is needed in VSCP, and it is important for any VSCP system to work. Lets get started. First the VSCP GUID is 16-bytes and looks something like this FF:60:83:12:111:49:A0:1C:00:97:97:C8:CC:02:01:42 Sixteen hex bytes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[13],"tags":[],"class_list":["post-1920","post","type-post","status-publish","format-standard","hentry","category-vscp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-uY","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1920"}],"version-history":[{"count":1,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1920\/revisions"}],"predecessor-version":[{"id":1921,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1920\/revisions\/1921"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}