<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jafar Al-Gharaibeh on Medium]]></title>
        <description><![CDATA[Stories by Jafar Al-Gharaibeh on Medium]]></description>
        <link>https://medium.com/@to.jafar?source=rss-1a3cda7cc773------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ouIZ1EpedmWauHUF</url>
            <title>Stories by Jafar Al-Gharaibeh on Medium</title>
            <link>https://medium.com/@to.jafar?source=rss-1a3cda7cc773------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 02:23:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@to.jafar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Setup OpenPilot on Mazda]]></title>
            <link>https://medium.com/@to.jafar/how-to-setup-openpilot-on-mazda-3eb54c62fdc5?source=rss-1a3cda7cc773------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eb54c62fdc5</guid>
            <category><![CDATA[ada]]></category>
            <category><![CDATA[commaai]]></category>
            <category><![CDATA[openpilot]]></category>
            <category><![CDATA[mazda]]></category>
            <category><![CDATA[cx5]]></category>
            <dc:creator><![CDATA[Jafar Al-Gharaibeh]]></dc:creator>
            <pubDate>Mon, 27 Jan 2020 05:44:28 GMT</pubDate>
            <atom:updated>2023-01-17T04:43:18.601Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c5o09kqLwwz5fRjPYmM1KQ.jpeg" /></figure><p>In this guide I will cover the steps to get Comma AI’s OpenPilot (OP) working on Mazda cars. As of January of 2020, Mazda is not officially supported by OP. However a community maintained port has been known to work with CX-5 and CX-9 2017 to 2019. Several other Mazda models such as Mazda CX-3 and Mazda 6 use the same Camera system used in CX-5 [update March 2020, Mazda 6 2018 is confirmed to work with this port]. The steps here might work with those cars with little extra work. The new Mazda 3 2019 onward used a completely new system and is not supported yet. Effort to add support for the new Mazda 3 is ongoing.</p><p><strong>[Update: June 2020]</strong> Mazda is now supported by OP starting with version 0.7.6 but in forced dashcam mode only. For more info click [<a href="https://github.com/commaai/openpilot/wiki/Mazda">here</a>]</p><h3>Hardware needed</h3><p>==============</p><p>You need to buy a Comma Two DevKit and a Car Harness. These can be bought together from <a href="https://comma.ai/shop/products/comma-two-devkit">comma.ai</a>. The <a href="https://comma.ai/shop/products/comma-car-harness">car harness</a> comes with a harness connector that works with only one type of cars. If you want to use OP with multiple cars you can just buy multiple connectors for each car you intend to use OP with. These connectors are also sold at <a href="https://comma.ai/shop/products/harness-connector">comma.ai </a>for $50 a piece.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQxcJp5aRQ_csfKJtQ_3PQ.jpeg" /></figure><p><strong>[UPDATE August 2020] Comma now sells Mazda connectors. When you select a car harness, look for Mazda development in the list.</strong></p><p><strong>IMPORTANT: </strong>Mazda is not officially supported by OP yet, you wont be able to buy a harness connector from comma.ai. To get a Mazda connector you have two options, either make one yourself, or buy one from OP Mazda community. Join the Mazda channel on comma.ai discord channel for more information and resources.</p><p>To summarize, you need to buy 1) Comma Two and 2) Car Harness. Both of these are available from comma.ai shop, pick Mazda development vehicle. 3)<strong>[NO longer needed as of August 2020</strong>] You also need a harness connector that you have to get from elsewhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*bd1OQ_MMxUcEqg5gqb_ZZQ.jpeg" /><figcaption>Custom made Mazda Harness Connector</figcaption></figure><h3>Software Setup</h3><p>============</p><p>Make sure your Comma Two is up to date. If you have any updates available, follow the on screen instructions to get the updates and reboot your device. IF this is the first time you boot your Comma Two, follow the on screen instructions to set it up and pair it with your account. In particular when you get to the screen to choose a software to install, pick the second option “Custom Software (Advanced)”. for the URL type in “https://openpilot.comma.ai”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JTtolgyVAZ6aHExz7OHCg.png" /></figure><p>The next step is to get the Mazda port on the device. Connect to Comma Two using ssh. If you are not familiar with ssh follow the instruction <a href="https://medium.com/@jfrux/comma-eon-getting-connected-with-ssh-3ed6136e4a75">here</a>.</p><p>Once connected, change directory to /data/openpilot</p><pre>root@localhost:/system/comma/home$ cd /data/openpilot</pre><pre>root@localhost:/data/openpilot$</pre><p>After that make sure the git state is clean and then add the Mazda community port git repo, fetch the repo, and check out mazda-devel branch (Comma3 users, use the branch mazda-c3 instead of mazda-devel):</p><pre>root@localhost:/data/openpilot$ git clean -Xfd</pre><pre>root@localhost:/data/openpilot$ git remote add mazda <a href="https://github.com/Jafaral/openpilot.git">https://github.com/Jafaral/openpilot.git</a></pre><pre>root@localhost:/data/openpilot$ git fetch mazda</pre><pre>#If you have Comma2 do:<br>root@localhost:/data/openpilot$ git checkout mazda/mazda-devel -b mazda-devel</pre><pre>#If you have Comma3 do: <br>root@localhost:/data/openpilot$ git checkout mazda/mazda-c3 -b mazda-c3</pre><p>Once the steps above are all done, reboot the device and it will be running with Mazda Support. The boot process after the update might take several minutes to complete, be patient! Now it is time to setup the hardware in the car. If you go the the developer screen you should see the mazda-devel branch as the active Git Branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SSxEN2CPzCt9RPlr_PXUVA.jpeg" /><figcaption>OP Version and Git active branch</figcaption></figure><h3>Hardware setup</h3><p>============</p><p>1- Open the camera cover by pulling the right piece of the cover away from the left piece. You might need to apply force to get them off the first time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*Xx_iFOoOHB8x3WjI4zL38g.gif" /><figcaption>Open the cover by puling the right piece away from the left piece</figcaption></figure><p>2- Unplug the stock camera cable by pressing the clip at the top of the connector</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBQww15Q5Pu1eIqZc5LHrA.jpeg" /><figcaption>The stock camera connector unplugged</figcaption></figure><p>3- Plug the harness connector to the camera side and the car side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*qZmCNEbAWrU-mf_fOlKGIA.jpeg" /><figcaption>The harness connector plugged in</figcaption></figure><p>Once connected, route the cable so that you can close back the cover while the other side of the connector is routed along the rearview mirror pole.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vkEPwdlgwCLG-gHCxCNrTA.jpeg" /><figcaption>Routing the harness connector preparing to close the cover</figcaption></figure><p>4- Close the cover, plug the harness connector to the relay/car-harness and comma power</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U48A8a0HjMmFEON6fHY9rA.jpeg" /><figcaption>Cover closed and the rely/car-harness plugged in</figcaption></figure><p>At this point you should be able to start the car and see no dashboard warnings. The stock camera should work normally with messages forwarded correctly by the rely. If you see dashboard errors that means have some wiring issues. Make sure all plugs are seated correctly, take then out and plug them again. Make sure all of the harness connector wires have contact. If you continue to see warnings you need to retest the harness connector and potentially rewire it.</p><p>5- Connect and mount Comma Two as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W8bAKgsZ3vebT_vDih4bAw.jpeg" /><figcaption>Comma Two mounted and connected the the harness connector which is connected to the car and also powered by comma power which comes as part of Comma Two DevKit</figcaption></figure><p>At this point the hardware setup is complete and the software is ready, start the car and you should be ready to go. For some cars you may need to update the fingerprint to match your car.</p><p>Note that you might get dashboard errors when you first runt Comma Two. Turn off the car for a little over one minute and turn it back on again. You might need to repeat that a couple of times. If you continue to see dashboard errors you have to make sure the car is fingerprinting correctly and also all wiring is done correctly.</p><h3>Mazda Limitations with OpenPilot</h3><p>==========================</p><p>Due to restriction that Mazda put in in their Stock LKAS system there are a few limitations when using OP with Mazda.</p><p>1- LKAS Steering is not available until the speed is at least 32 mph, once that speed is reached LKAS becomes available even if the speed dips below 32 down to 28 mph. If the speeds dips below 28 mph LKAS becomes unavailable again until you drive above 32 mph. OP will not engage if LKAS is unavailable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CeAPsRMTlRIeQprQv12uzg.jpeg" /><figcaption>OpenPilot cannot be engaged if stock LKAS is unavailable due to low speed</figcaption></figure><p>If you slow down and LKAS becomes unavailable when OP is already engaged, a warning will be displayed asking the user to take control immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*myO92lx08APDlFmiD7M4Hg.jpeg" /><figcaption>If OP is engaged and the speed dips below 28, OP continues to be engaged but with a warning</figcaption></figure><p>2- LKAS Steering becomes unavailable if you keep your hands off the steering wheel for 5 of more seconds, in that case OP warning will be displayed asking the user to take control immediately. One solution to this problem is to add a weight (about a 1 lb/450 grams )to the steering wheel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lLVUf6R1TEhf-lg8308s4w.jpeg" /><figcaption>Steer Unavailable Warning due to steer lockout timer (hands off the steering wheel for 5 seconds)</figcaption></figure><p><a href="https://photos.app.goo.gl/LqjvxK3pb2TJUkvg6">New video by Jafar Al-Gharaibeh</a></p><p>3- LKAS steering torque is limited preventing OP from handling tight curves. In general the torque is enough to handle up to 10 degrees in best case scenarios. Be prepared to take over and correct the trajectory of the car if the system cannot handle such turns.</p><p>If you have question please join us on Mazda channel on Comma AI’s discord server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eb54c62fdc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>