{"id":686,"date":"2023-11-10T23:11:15","date_gmt":"2023-11-10T22:11:15","guid":{"rendered":"https:\/\/www.sevenwatt.com\/main\/?p=686"},"modified":"2023-11-10T23:11:15","modified_gmt":"2023-11-10T22:11:15","slug":"ford-nugget-linbus-part-1-a-first-look","status":"publish","type":"post","link":"https:\/\/www.sevenwatt.com\/main\/ford-nugget-linbus-part-1-a-first-look\/","title":{"rendered":"Ford Nugget LINBUS &#8211; part 1: A first look"},"content":{"rendered":"\n<h2>connecting the oscilloscope<\/h2>\n\n\n\n<p>After installing solar panels on the roof of the campervan I wanted to see whether the solar voltage regulator was providing electrical potential and current data at the solar panel and battery side. The Votronic MMP solar regulator is connected to the LIN bus of the campervan. So I build a &#8220;sniffer&#8221; for the LIN bus and did some programming on an ESP32 board. To get it all working the oscilloscope came in handy. For example to figure out the baud rate of the LIN-bus.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"480\" src=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint7.png\" alt=\"\" class=\"wp-image-687\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint7.png 800w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint7-300x180.png 300w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint7-768x461.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>LinBus trace of 1000ms showing a repeating pattern of approximately 360ms<\/figcaption><\/figure>\n\n\n\n<p>The baud rate appears to be 19200 and it appears to be a repeating pattern every 360ms. Zooming in on the data reveals that<\/p>\n<ul>\n<li>There is a single &#8220;spike&#8221; of about 3ms<\/li>\n<li>After 47ms it is followed by a train of 10 frames<\/li>\n<li>After 82ms it is followed by a second train of\u00a0 frames<\/li>\n<li>Finally after 47ms the single spike is detected again.<\/li>\n<\/ul>\n<h2>Individual frames<\/h2>\n<p>The short frames (called spikes before) are requests from the master on the LIN bus that remain unanswered, because the device is offline or just not build into the campervan. They contain typically the byte sequence <code>00 55 xx<\/code> where xx = the Protected ID:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"480\" src=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint2.png\" alt=\"\" class=\"wp-image-688\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint2.png 800w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint2-300x180.png 300w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint2-768x461.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>Master request that remains unanswered to Protected ID = 0x5B<\/figcaption><\/figure>\n\n\n\n<p>The frame always start at nice 10ms time slots,. An example of a regular frame comes form the campervan living part batteries intelligent battery sensor:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"480\" src=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint5.png\" alt=\"\" class=\"wp-image-689\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint5.png 800w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint5-300x180.png 300w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2023\/11\/DS1Z_QuickPrint5-768x461.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>Hella IBS frame PID = 0x25 (State of Charge  SoC)<\/figcaption><\/figure>\n\n\n\n<p>The Hella IBS sensor LIN bus protocol is well documented in those github repositories:<\/p>\n<p><a href=\"https:\/\/github.com\/frankschoeniger\/LIN_Interface\">https:\/\/github.com\/frankschoeniger\/LIN_Interface<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/mestrode\/IBS-Sensor-Library\">https:\/\/github.com\/mestrode\/IBS-Sensor-Library<\/a><\/p>\n<h2>Frame identity<\/h2>\n<p>Finally, the complete overview of the frames with Protected and normal ID&#8217;s:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table  class=\" table table-hover\" ><tbody><tr><td>start time<br> \/ ms<\/td><td>PID<br>(hex)<\/td><td>ID<br>(hex)<\/td><td>comment<\/td><\/tr><tr><td>0 (=360)<\/td><td>C1<\/td><td>01<\/td><td><\/td><\/tr><tr><td>10<\/td><td>42<\/td><td>02<\/td><td><\/td><\/tr><tr><td>20<\/td><td>C4<\/td><td>04<\/td><td><\/td><\/tr><tr><td>30<\/td><td>85<\/td><td>05<\/td><td><\/td><\/tr><tr><td>40<\/td><td>FB<\/td><td>3B<\/td><td><\/td><\/tr><tr><td>50<\/td><td>0C<\/td><td>06<\/td><td>no response<\/td><\/tr><tr><td>60<\/td><td>97<\/td><td>17<\/td><td>no response<\/td><\/tr><tr><td>70<\/td><td>D8<\/td><td>18<\/td><td>no response<\/td><\/tr><tr><td>80<\/td><td>99<\/td><td>19<\/td><td>no response<\/td><\/tr><tr><td>130<\/td><td>5B<\/td><td>1B<\/td><td>isolated spike, no response<\/td><\/tr><tr><td>180<\/td><td>C1<\/td><td>01<\/td><td>called a second time<\/td><\/tr><tr><td>190<\/td><td>42<\/td><td>02<\/td><td>called a second time<\/td><\/tr><tr><td>200<\/td><td>20<\/td><td>20<\/td><td><\/td><\/tr><tr><td>210<\/td><td>E2<\/td><td>22<\/td><td>Hella IBS<\/td><\/tr><tr><td>220<\/td><td>25<\/td><td>25<\/td><td>Hella IBS<\/td><\/tr><tr><td>230<\/td><td>A6<\/td><td>26<\/td><td>Hella IBS<\/td><\/tr><tr><td>240<\/td><td>78<\/td><td>38<\/td><td>no response<\/td><\/tr><tr><td>250<\/td><td>39<\/td><td>39<\/td><td><\/td><\/tr><tr><td>260<\/td><td>BA<\/td><td>3A<\/td><td><\/td><\/tr><tr><td>270<\/td><td>4C<\/td><td>0C<\/td><td>no response<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Several Frame IDs do not have a response. Device ID 01 and 02 are called twice in a cycle and three of the ID&#8217;s are known to be from the Hella IBS and for the better part the data is decoded. More posts will appear among others on the LINBUS listener based on an ESP32 and decoding of the frames of some of the connected devices.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>connecting the oscilloscope After installing solar panels on the roof of the campervan I wanted to see whether the solar voltage regulator was providing electrical potential and current data at the solar panel and battery side. The Votronic MMP solar regulator is connected to the LIN bus of the campervan. So I build a &#8220;sniffer&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[79,80,78],"tags":[76,77,74,73,75],"class_list":["post-686","post","type-post","status-publish","format-standard","hentry","category-esp32","category-ford-nugget","category-linbus","tag-dometic","tag-esp32","tag-ford-nugget","tag-linbus","tag-westfalia"],"_links":{"self":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts\/686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/comments?post=686"}],"version-history":[{"count":7,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts\/686\/revisions"}],"predecessor-version":[{"id":696,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts\/686\/revisions\/696"}],"wp:attachment":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/media?parent=686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/categories?post=686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/tags?post=686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}