{"id":6278,"date":"2026-03-17T10:54:42","date_gmt":"2026-03-17T09:54:42","guid":{"rendered":"https:\/\/grodansparadis.com\/wordpress\/?p=6278"},"modified":"2026-03-17T10:54:42","modified_gmt":"2026-03-17T09:54:42","slug":"the-vscp-general-binary-frame-gbf","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=6278","title":{"rendered":"The VSCP general binary frame (gbf)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-From-2026-03-17-10-30-23.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"490\" data-attachment-id=\"6280\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=6280\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-From-2026-03-17-10-30-23.png?fit=822%2C694&amp;ssl=1\" data-orig-size=\"822,694\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot From 2026-03-17 10-30-23\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-From-2026-03-17-10-30-23.png?fit=580%2C490&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-From-2026-03-17-10-30-23.png?resize=580%2C490&#038;ssl=1\" alt=\"\" class=\"wp-image-6280\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-From-2026-03-17-10-30-23.png?w=822&amp;ssl=1 822w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-From-2026-03-17-10-30-23.png?resize=300%2C253&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-From-2026-03-17-10-30-23.png?resize=768%2C648&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Binary frames have been around for a long time now. MQTT, UDP and Multicast transport uses them.  In the current project I work with, a CAN4VSCP &lt;-> wireless gateway I have finally realized that TLS\/SSL is not the perfect solution for an embedded server device. The reason is that certificates need to be updated on a regular basis. This is easy to handle on a pc based higher end solution but very much not so on a remote device. So what to do?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My solution to this problem is to generalize the binary protocol and use it also (as an option) in websockets and tcp\/ip. This gives a communication path that allows for secure AES-128\/192\/256 encryption on all transports supported by VSCP.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the addition\/change of the nanosecond timestamp the frame format is changed to support this. The old frame is still available though. But all conversions in the helper libraries. will convert the format to the newer frame type. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is also two new <strong>packet types <\/strong>(defined in the high nibble of the first byte of the frames).  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first is <strong>command frames<\/strong> which have a 16-bit command code and an argument. Looking at the tcp\/ip link protocol and the web socket protocols the commands used in both is translated here to a binary form.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second is <strong>reply frames<\/strong> which are designed for command replies to a client. Error codes and state information can be sent here.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Frame format<\/strong> and <strong>packet types<\/strong> is a bit confusing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Packet type 0<\/strong>: Can have frame types 0\/1. The frame type is defined in bit 8\/9 of the VSCP event head. All frames will be promoted to frame type 1 with  nan second timestamp.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Packet type 14<\/strong>: This is the command packet. Just one frame type.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Packet type 15<\/strong>: This is the reply packet. Just one frame type.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The helper library, vscphelper.cpp and vscp-firmware-helper.c will all support the binary protocol. So in reality it is not more work to use than to decide on encryption, share a secret key between devices and send\/receive events (and commands) as before.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can read more about the binary frames <a href=\"https:\/\/grodansparadis.github.io\/vscp-doc-spec\/#\/.\/vscp_over_binary\" data-type=\"link\" data-id=\"https:\/\/grodansparadis.github.io\/vscp-doc-spec\/#\/.\/vscp_over_binary\">in the documentation<\/a>. Some things may still change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ps<\/strong> I try not to break things if possible but have done so in the vscp header (vscp.h) by removing the multicast defines and renames them to &#8220;binary&#8221;&#8230;  Some applications may thus need to be recompiled after fixing the naming. Sorry for that, but this as a good time for doing this. <strong>ds<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Binary frames have been around for a long time now. MQTT, UDP and Multicast transport uses them. In the current project I work with, a CAN4VSCP &lt;-> wireless gateway I have finally realized that TLS\/SSL is not the perfect solution for an embedded server device. The reason is that certificates need to be updated on [&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_post_was_ever_published":false,"_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}},"categories":[13],"tags":[],"class_list":["post-6278","post","type-post","status-publish","format-standard","hentry","category-vscp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-1Dg","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\/6278","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=6278"}],"version-history":[{"count":2,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6278\/revisions"}],"predecessor-version":[{"id":6281,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6278\/revisions\/6281"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}