{"id":439,"date":"2010-09-03T21:00:00","date_gmt":"2010-09-03T21:00:00","guid":{"rendered":"http:\/\/3.68.38.87\/?p=439"},"modified":"2023-06-01T03:13:57","modified_gmt":"2023-06-01T03:13:57","slug":"network-management-part-2-osek","status":"publish","type":"post","link":"https:\/\/canbushack.com\/web\/network-management-part-2-osek\/","title":{"rendered":"NETWORK MANAGEMENT \u2013 PART 2: OSEK"},"content":{"rendered":"\n<p>Let me start out with this statement: my OSEK skills are decent, but I\u2019m not the foremost expert here.&nbsp; I will tell you what I know and leave it up to you to belittle me in the comment section.&nbsp; Thank you.<\/p>\n\n\n\n<p>The OSEK standard is a large section of documents that cover many, many aspects of CAN BUS communication, Network Management is a small section of this entire cadre.&nbsp; The entire document can be purchased publicly, I just don\u2019t remember how.&nbsp; The Network Management section (2.5.3; available for free download&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20190623094806\/http:\/\/portal.osek-vdx.org\/index.php?option=com_content&amp;task=view&amp;id=9&amp;Itemid=13\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>) is 130+ pages and is a riveting tale of bits and bytes.&nbsp; So let me tell you about some of the highlights\u2026<\/p>\n\n\n\n<p>OSEK Network Management (NM) primarily works by passing a \u2018token\u2019 around a logical \u2018ring\u2019.&nbsp; This token is simply like passing a one byte message to your neighbor and then your neighbor passes it to his neighbor and so on until it comes back to you and you start the process all over again.&nbsp; The key here is what does the message token mean?&nbsp; At first the message token just broadcasts your network management ID.&nbsp; For example if your CAN BUS Arbitration ID is 0x420 your NM ID would be 0x20 (the lower byte of your Arb. ID). Each node on the bus would have its own NM message.&nbsp; So if you have five nodes you would have five NM messages all of them within a particular range (this range is specified by the OEM not OSEK).<\/p>\n\n\n\n<p>Once the node has sent out its ID, it starts listening for other NM messages (it knows of other NM messages because these messages will be in a particular range of Arbitration IDs).&nbsp; Once a certain time has elapsed it will send a token to its neighbor.&nbsp; This might look like this:&nbsp;0x420 21 12 00 00 00 00 00 00 00 00.&nbsp; Where the 0x21 is its neighbor\u2019s ID and 0x12 is the token.&nbsp; Once the neighbor has received his message, he will in turn send his own NM message with his own token:&nbsp;0x421 26 32 00 00 00 00 00 00. Where<strong>&nbsp;0x26<\/strong>&nbsp;is the next node ID in the ring and&nbsp;<strong>0x32<\/strong>&nbsp;is the token. And then the cycle would continue, where each node passed their token to the next node and so on.<\/p>\n\n\n\n<p>The token is encoded data that indicates the node\u2019s desired state for the network.&nbsp; For instant if the network should go to sleep, nodes that wish for sleep will turn on an \u201cenable sleep\u201d bit in the token.&nbsp; If all of the nodes enable this bit, then the final node to elect for sleep will then send the \u201csleep network\u201d bit and the network will go to sleep.&nbsp; This sleep is only temporary until another message is sent, this will initial a network wakeup and NM messages will start broadcasting with a token that indicates this message is an Initialization message.<\/p>\n\n\n\n<p>So the key to a NM message is how the token is decoded and this is not specified by the OSEK layer but rather by the OEMs themselves.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let me start out with this statement: my OSEK skills are decent, but I\u2019m not the foremost expert here.&nbsp; I will tell you what I know and leave it up to you to belittle me in the comment section.&nbsp; Thank you. The OSEK standard is a large section of documents that cover many, many aspects [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":375,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[7],"tags":[],"class_list":["post-439","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/posts\/439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/comments?post=439"}],"version-history":[{"count":0,"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/posts\/439\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/media\/375"}],"wp:attachment":[{"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/media?parent=439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/categories?post=439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/canbushack.com\/web\/wp-json\/wp\/v2\/tags?post=439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}