{"id":754,"date":"2018-12-19T22:19:42","date_gmt":"2018-12-19T21:19:42","guid":{"rendered":"http:\/\/www.embedded-communication.com\/?p=754"},"modified":"2019-10-01T14:43:12","modified_gmt":"2019-10-01T12:43:12","slug":"english-can4osx-can-usb-device-driver-for-mac","status":"publish","type":"post","link":"https:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/","title":{"rendered":"can4osx &#8211; CAN USB device driver for Mac"},"content":{"rendered":"<p>When it comes to embedded development, the Mac becomes more and more popular. Because of that many semiconductor nowadays provide native Mac support for there Integrated Development Environments. All the Major ones have tools for developing and debugging on Mac machines. But when it comes to embedded development on CAN based system most of us encounter the problem that there is no native support for most of \u00a0the CAN to USB interfaces. Almost none the CAN interface manufactures provide a proper device driver for Mac.<\/p>\n<p>Because of that a open source project, called <a href=\"http:\/\/aph-le.github.io\/can4osx\/\">can4osx<\/a>, startet. It&#8217;s supposed as a generic CAN interface driver for CAN-USB interfaces of different vendors.<\/p>\n<h1>What is can4osx?<\/h1>\n<p>can4osx was born as a daughter project of <a href=\"https:\/\/gitlab.com\/hjoertel\/can4linux\">can4linux<\/a>, a project with the aim to bring CAN interfaces to Linux since several years. can4osx is a CAN-USB device driver, completely running in the User-Space of OSX. It uses\u00a0OKitLib and IOUSBLib, so it doesn&#8217;t have to run in the kernel. The driver can be directly compiled into applications, or run as a library.<\/p>\n<h1>How to use it<\/h1>\n<p>can4osx comes with an API, which is very close to the API of Kvasers CANLIB. A little example how to use it in a simple application:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nvoid simpleSend(void)\r\n{\r\nCanHandle hdl;\r\nint channel = 0;\r\nint bitrate = canBITRATE_125K;\r\ncanInitializeLibrary();\r\n\r\n    hdl = canOpenChannel(channel, canOPEN_EXCLUSIVE | canOPEN_REQUIRE_EXTENDED);\r\n    canBusOff(hdl);\r\n    canSetBusParams(hdl, bitrate, 10, 5, 1, 1, 0);\r\n    canBusOn(hdl);\r\n    canWrite(hdl, 0x123, &amp;amp;quot;can4osx&amp;amp;quot;, 8, 0);\r\n    canBusOff(hdl);\r\n}\r\n<\/pre>\n<h1>Supported interfaces<\/h1>\n<p>At the moment only a few interfaces are officially supported. The reason for that is that only a few real hardware interface could be verified. Verified ones are:<\/p>\n<ul>\n<li>Kvaser Leaf Light V.2<\/li>\n<li>IXXAT USB-to-CAN FD Automotive<\/li>\n<li>Kvaser Leaf Pro V.2 (unstable)<\/li>\n<\/ul>\n<p>But since can4osx is open source every can implement or verify other interfaces.<\/p>\n<h1>Where is can4osx used<\/h1>\n<p>Besides in some little CAN hobby projects, <strong>can4osx<\/strong> is used for example in the \u00a0Mac Toolchain version of the different CAN Tools of the company <a href=\"https:\/\/www.emotas.de\/en\/allgemein\/cancanopen-toolchain-fuer-mac-os-x-verfuegbar\">emotas embedded communication GmbH<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-794 aligncenter\" src=\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png\" alt=\"\" width=\"300\" height=\"273\" srcset=\"https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png 300w, https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-768x700.png 768w, https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-1024x933.png 1024w, https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-1200x1094.png 1200w, https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41.png 1606w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>When it comes to embedded development, the Mac becomes more and more popular. Because of that many semiconductor nowadays provide native Mac support for there Integrated Development Environments. All the Major ones have tools for developing and debugging on Mac machines. But when it comes to embedded development on CAN based system most of us &hellip; <a href=\"https:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;can4osx &#8211; CAN USB device driver for Mac&#8221;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[45],"class_list":["post-754","post","type-post","status-publish","format-standard","hentry","category-misc","tag-can4osx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>can4osx - CAN USB device driver for Mac - embedded communication<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"can4osx - CAN USB device driver for Mac - embedded communication\" \/>\n<meta property=\"og:description\" content=\"When it comes to embedded development, the Mac becomes more and more popular. Because of that many semiconductor nowadays provide native Mac support for there Integrated Development Environments. All the Major ones have tools for developing and debugging on Mac machines. But when it comes to embedded development on CAN based system most of us &hellip; Continue reading &quot;can4osx &#8211; CAN USB device driver for Mac&quot;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\" \/>\n<meta property=\"og:site_name\" content=\"embedded communication\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-19T21:19:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-10-01T12:43:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png\" \/>\n<meta name=\"author\" content=\"Alexander Philipp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EmbeddedComm\" \/>\n<meta name=\"twitter:site\" content=\"@EmbeddedComm\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexander Philipp\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\"},\"author\":{\"name\":\"Alexander Philipp\",\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#\/schema\/person\/8df820296d4e943c0370b066161607ef\"},\"headline\":\"can4osx &#8211; CAN USB device driver for Mac\",\"datePublished\":\"2018-12-19T21:19:42+00:00\",\"dateModified\":\"2019-10-01T12:43:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\"},\"wordCount\":361,\"publisher\":{\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png\",\"keywords\":[\"can4osx\"],\"articleSection\":[\"Misc\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\",\"url\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\",\"name\":\"can4osx - CAN USB device driver for Mac - embedded communication\",\"isPartOf\":{\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png\",\"datePublished\":\"2018-12-19T21:19:42+00:00\",\"dateModified\":\"2019-10-01T12:43:12+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage\",\"url\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png\",\"contentUrl\":\"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/www.embedded-communication.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"can4osx &#8211; CAN USB device driver for Mac\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#website\",\"url\":\"https:\/\/www.embedded-communication.com\/en\/\",\"name\":\"embedded communication\",\"description\":\"A blog about embedded communcation protocols.\",\"publisher\":{\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.embedded-communication.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#organization\",\"name\":\"embedded communication\",\"url\":\"https:\/\/www.embedded-communication.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png\",\"contentUrl\":\"https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png\",\"width\":240,\"height\":240,\"caption\":\"embedded communication\"},\"image\":{\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/EmbeddedComm\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.embedded-communication.com\/en\/#\/schema\/person\/8df820296d4e943c0370b066161607ef\",\"name\":\"Alexander Philipp\",\"sameAs\":[\"http:\/\/www.emtas.de\/team\/4136\"],\"url\":\"https:\/\/www.embedded-communication.com\/en\/author\/phi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"can4osx - CAN USB device driver for Mac - embedded communication","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/","og_locale":"en_US","og_type":"article","og_title":"can4osx - CAN USB device driver for Mac - embedded communication","og_description":"When it comes to embedded development, the Mac becomes more and more popular. Because of that many semiconductor nowadays provide native Mac support for there Integrated Development Environments. All the Major ones have tools for developing and debugging on Mac machines. But when it comes to embedded development on CAN based system most of us &hellip; Continue reading \"can4osx &#8211; CAN USB device driver for Mac\"","og_url":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/","og_site_name":"embedded communication","article_published_time":"2018-12-19T21:19:42+00:00","article_modified_time":"2019-10-01T12:43:12+00:00","og_image":[{"url":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png","type":"","width":"","height":""}],"author":"Alexander Philipp","twitter_card":"summary_large_image","twitter_creator":"@EmbeddedComm","twitter_site":"@EmbeddedComm","twitter_misc":{"Written by":"Alexander Philipp","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#article","isPartOf":{"@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/"},"author":{"name":"Alexander Philipp","@id":"https:\/\/www.embedded-communication.com\/en\/#\/schema\/person\/8df820296d4e943c0370b066161607ef"},"headline":"can4osx &#8211; CAN USB device driver for Mac","datePublished":"2018-12-19T21:19:42+00:00","dateModified":"2019-10-01T12:43:12+00:00","mainEntityOfPage":{"@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/"},"wordCount":361,"publisher":{"@id":"https:\/\/www.embedded-communication.com\/en\/#organization"},"image":{"@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage"},"thumbnailUrl":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png","keywords":["can4osx"],"articleSection":["Misc"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/","url":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/","name":"can4osx - CAN USB device driver for Mac - embedded communication","isPartOf":{"@id":"https:\/\/www.embedded-communication.com\/en\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage"},"image":{"@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage"},"thumbnailUrl":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png","datePublished":"2018-12-19T21:19:42+00:00","dateModified":"2019-10-01T12:43:12+00:00","breadcrumb":{"@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#primaryimage","url":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png","contentUrl":"http:\/\/www.embedded-communication.com\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-19-um-22.02.41-300x273.png"},{"@type":"BreadcrumbList","@id":"http:\/\/www.embedded-communication.com\/en\/misc\/english-can4osx-can-usb-device-driver-for-mac\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/www.embedded-communication.com\/en\/"},{"@type":"ListItem","position":2,"name":"can4osx &#8211; CAN USB device driver for Mac"}]},{"@type":"WebSite","@id":"https:\/\/www.embedded-communication.com\/en\/#website","url":"https:\/\/www.embedded-communication.com\/en\/","name":"embedded communication","description":"A blog about embedded communcation protocols.","publisher":{"@id":"https:\/\/www.embedded-communication.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.embedded-communication.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.embedded-communication.com\/en\/#organization","name":"embedded communication","url":"https:\/\/www.embedded-communication.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.embedded-communication.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png","contentUrl":"https:\/\/www.embedded-communication.com\/wp-content\/uploads\/2016\/08\/embedded-communication.png","width":240,"height":240,"caption":"embedded communication"},"image":{"@id":"https:\/\/www.embedded-communication.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/EmbeddedComm"]},{"@type":"Person","@id":"https:\/\/www.embedded-communication.com\/en\/#\/schema\/person\/8df820296d4e943c0370b066161607ef","name":"Alexander Philipp","sameAs":["http:\/\/www.emtas.de\/team\/4136"],"url":"https:\/\/www.embedded-communication.com\/en\/author\/phi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts\/754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/comments?post=754"}],"version-history":[{"count":12,"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts\/754\/revisions"}],"predecessor-version":[{"id":970,"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/posts\/754\/revisions\/970"}],"wp:attachment":[{"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/media?parent=754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/categories?post=754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.embedded-communication.com\/en\/wp-json\/wp\/v2\/tags?post=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}