|
|
(9 intermediate revisions by 2 users not shown) |
Line 19: |
Line 19: |
| Comma.ai doesn't support Tesla cars. That's why we maintain our own fork, which you will have to manually check out after setting up your EON. | | Comma.ai doesn't support Tesla cars. That's why we maintain our own fork, which you will have to manually check out after setting up your EON. |
| | | |
− | '''<span style="color: red;font-size: 18pt;">DON’T INSTALL UNLESS YOU HAVE A TESLA!</span>''' <br /> | + | '''<span style="color: red;font-size: 18pt;">DON’T INSTALL ON ANYTHING OTHER THAN A TESLA!</span>''' <br /> |
| (Someone bricked their Jeep trying.) | | (Someone bricked their Jeep trying.) |
− |
| |
− |
| |
− | <!--// Start Spoiler Area for How to SSH //-->
| |
− | <div class="mw-collapsible mw-collapsed" style="border:1px solid #f5b628;background-color:#fff6d3;padding: 0.5em;">
| |
− | How to SSH to the EON
| |
− | <div class="mw-collapsible-content">
| |
− | In order to login to your EON via SSH, use the following key:
| |
− | <pre>
| |
− | -----BEGIN PRIVATE KEY-----
| |
− | MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC+iXXq30Tq+J5N
| |
− | Kat3KWHCzcmwZ55nGh6WggAqECa5CasBlM9VeROpVu3beA+5h0MibRgbD4DMtVXB
| |
− | t6gEvZ8nd04E7eLA9LTZyFDZ7SkSOVj4oXOQsT0GnJmKrASW5KslTWqVzTfo2XCt
| |
− | Z+004ikLxmyFeBO8NOcErW1pa8gFdQDToH9FrA7kgysic/XVESTOoe7XlzRoe/eZ
| |
− | acEQ+jtnmFd21A4aEADkk00Ahjr0uKaJiLUAPatxs2icIXWpgYtfqqtaKF23wSt6
| |
− | 1OTu6cAwXbOWr3m+IUSRUO0IRzEIQS3z1jfd1svgzSgSSwZ1Lhj4AoKxIEAIc8qJ
| |
− | rO4uymCJAgMBAAECggEBAISFevxHGdoL3Z5xkw6oO5SQKO2GxEeVhRzNgmu/HA+q
| |
− | x8OryqD6O1CWY4037kft6iWxlwiLOdwna2P25ueVM3LxqdQH2KS4DmlCx+kq6FwC
| |
− | gv063fQPMhC9LpWimvaQSPEC7VUPjQlo4tPY6sTTYBUOh0A1ihRm/x7juKuQCWix
| |
− | Cq8C/DVnB1X4mGj+W3nJc5TwVJtgJbbiBrq6PWrhvB/3qmkxHRL7dU2SBb2iNRF1
| |
− | LLY30dJx/cD73UDKNHrlrsjk3UJc29Mp4/MladKvUkRqNwlYxSuAtJV0nZ3+iFkL
| |
− | s3adSTHdJpClQer45R51rFDlVsDz2ZBpb/hRNRoGDuECgYEA6A1EixLq7QYOh3cb
| |
− | Xhyh3W4kpVvA/FPfKH1OMy3ONOD/Y9Oa+M/wthW1wSoRL2n+uuIW5OAhTIvIEivj
| |
− | 6bAZsTT3twrvOrvYu9rx9aln4p8BhyvdjeW4kS7T8FP5ol6LoOt2sTP3T1LOuJPO
| |
− | uQvOjlKPKIMh3c3RFNWTnGzMPa0CgYEA0jNiPLxP3A2nrX0keKDI+VHuvOY88gdh
| |
− | 0W5BuLMLovOIDk9aQFIbBbMuW1OTjHKv9NK+Lrw+YbCFqOGf1dU/UN5gSyE8lX/Q
| |
− | FsUGUqUZx574nJZnOIcy3ONOnQLcvHAQToLFAGUd7PWgP3CtHkt9hEv2koUwL4vo
| |
− | ikTP1u9Gkc0CgYEA2apoWxPZrY963XLKBxNQecYxNbLFaWq67t3rFnKm9E8BAICi
| |
− | 4zUaE5J1tMVi7Vi9iks9Ml9SnNyZRQJKfQ+kaebHXbkyAaPmfv+26rqHKboA0uxA
| |
− | nDOZVwXX45zBkp6g1sdHxJx8JLoGEnkC9eyvSi0C//tRLx86OhLErXwYcNkCf1it
| |
− | VMRKrWYoXJTUNo6tRhvodM88UnnIo3u3CALjhgU4uC1RTMHV4ZCGBwiAOb8GozSl
| |
− | s5YD1E1iKwEULloHnK6BIh6P5v8q7J6uf/xdqoKMjlWBHgq6/roxKvkSPA1DOZ3l
| |
− | jTadcgKFnRUmc+JT9p/ZbCxkA/ALFg8++G+0ghECgYA8vG3M/utweLvq4RI7l7U7
| |
− | b+i2BajfK2OmzNi/xugfeLjY6k2tfQGRuv6ppTjehtji2uvgDWkgjJUgPfZpir3I
| |
− | RsVMUiFgloWGHETOy0Qvc5AwtqTJFLTD1Wza2uBilSVIEsg6Y83Gickh+ejOmEsY
| |
− | 6co17RFaAZHwGfCFFjO76Q==
| |
− | -----END PRIVATE KEY-----
| |
− | </pre>
| |
− | You can download the id_rsa key from the openpilot-tools repo,[https://github.com/commaai/openpilot-tools/tree/master/ssh/key here]
| |
− | With that key you can SSH in as root on port 8022. If you're using PuTTY, you'll need to convert that id_rsa (private key) into a .ppk (PuTTY Private Key)... no passwords needed.
| |
− |
| |
− | Just save the above key as a text file, name it "eonkey.pem" or anything you like;
| |
− |
| |
− | 1) Under Unix/Linux environment, or Mac terminal, please run: $ chmod 600 eonkey.pem (otherwise the system will think the text file is not safe).
| |
− |
| |
− | 2) To connect to your EON using this key, save the text above to a blank text file and name the file eonkey.pem.
| |
− | (Just make save it into the same working directory, to check using commands "pwd" and "ls".
| |
− |
| |
− | Then get the IP address of your EON in settings under settings > wifi > advanced (please make sure your EON and your computer connect to the same WiFi).
| |
− |
| |
− | 3) To check your connection: $ ping the EON IP address, like "ping 192.168.1.100"; please try a couple times until you see the data exchanging.
| |
− | like:
| |
− | "PING 192.168.2.1 (192.168.2.1): 56 data bytes
| |
− | 64 bytes from 192.168.2.1: icmp_seq=0 ttl=64 time=1.710 ms
| |
− | 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=13.899 ms"
| |
− |
| |
− | 4) Under a linux, MAC machine or PuTTY environment, use the command:
| |
− |
| |
− | ssh root@(IP address of EON) -p 8022 -i eonkey.pem
| |
− |
| |
− | like "$ ssh root@192.168.1.100 -p 8022 -i eonkey.pem"
| |
− |
| |
− |
| |
− | This is the same key in PuTTY ppk format:
| |
− | <pre>
| |
− | PuTTY-User-Key-File-2: ssh-rsa
| |
− | Encryption: none
| |
− | Comment: imported-openssh-key
| |
− | Public-Lines: 6
| |
− | AAAAB3NzaC1yc2EAAAADAQABAAABAQC+iXXq30Tq+J5NKat3KWHCzcmwZ55nGh6W
| |
− | ggAqECa5CasBlM9VeROpVu3beA+5h0MibRgbD4DMtVXBt6gEvZ8nd04E7eLA9LTZ
| |
− | yFDZ7SkSOVj4oXOQsT0GnJmKrASW5KslTWqVzTfo2XCtZ+004ikLxmyFeBO8NOcE
| |
− | rW1pa8gFdQDToH9FrA7kgysic/XVESTOoe7XlzRoe/eZacEQ+jtnmFd21A4aEADk
| |
− | k00Ahjr0uKaJiLUAPatxs2icIXWpgYtfqqtaKF23wSt61OTu6cAwXbOWr3m+IUSR
| |
− | UO0IRzEIQS3z1jfd1svgzSgSSwZ1Lhj4AoKxIEAIc8qJrO4uymCJ
| |
− | Private-Lines: 14
| |
− | AAABAQCEhXr8RxnaC92ecZMOqDuUkCjthsRHlYUczYJrvxwPqsfDq8qg+jtQlmON
| |
− | N+5H7eolsZcIizncJ2tj9ubnlTNy8anUB9ikuA5pQsfpKuhcAoL9Ot30DzIQvS6V
| |
− | opr2kEjxAu1VD40JaOLT2OrE02AVDodANYoUZv8e47irkAlosQqvAvw1ZwdV+Jho
| |
− | /lt5yXOU8FSbYCW24ga6uj1q4bwf96ppMR0S+3VNkgW9ojURdSy2N9HScf3A+91A
| |
− | yjR65a7I5N1CXNvTKePzJWnSr1JEajcJWMUrgLSVdJ2d/ohZC7N2nUkx3SaQpUHq
| |
− | +OUedaxQ5VbA89mQaW/4UTUaBg7hAAAAgQDoDUSLEurtBg6HdxteHKHdbiSlW8D8
| |
− | U98ofU4zLc404P9j05r4z/C2FbXBKhEvaf664hbk4CFMi8gSK+PpsBmxNPe3Cu86
| |
− | u9i72vH1qWfinwGHK92N5biRLtPwU/miXoug63axM/dPUs64k865C86OUo8ogyHd
| |
− | zdEU1ZOcbMw9rQAAAIEA0jNiPLxP3A2nrX0keKDI+VHuvOY88gdh0W5BuLMLovOI
| |
− | Dk9aQFIbBbMuW1OTjHKv9NK+Lrw+YbCFqOGf1dU/UN5gSyE8lX/QFsUGUqUZx574
| |
− | nJZnOIcy3ONOnQLcvHAQToLFAGUd7PWgP3CtHkt9hEv2koUwL4voikTP1u9Gkc0A
| |
− | AACAPLxtzP7rcHi76uESO5e1O2/otgWo3ytjpszYv8boH3i42OpNrX0Bkbr+qaU4
| |
− | 3obY4trr4A1pIIyVID32aYq9yEbFTFIhYJaFhhxEzstEL3OQMLakyRS0w9Vs2trg
| |
− | YpUlSBLIOmPNxonJIfnozphLGOnKNe0RWgGR8BnwhRYzu+k=
| |
− | Private-MAC: 2af7f5a599fa35e22392b7770a2eb7a0be8718b7
| |
− | </pre>
| |
− |
| |
− | To use it in PuTTY, just be sure to reference that .ppk under... Connection > SSH > Auth > Private key for authentication
| |
− |
| |
− | To set your timezone...
| |
− | # setprop persist.sys.timezone "US/Pacific"
| |
− | ...or whatever your timezone is.
| |
− |
| |
− | Instead of working with above key files, one may also add the following single line into ~/.ssh/known_hosts :
| |
− | <pre>
| |
− | [192.168.43.1]:8022 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBObmX06kATNtKj+x/Zk2gXkYzkE5St8j7kWhw07x6iiQZK8mK5VmANzHGNuTeInDZHh5sRJ/BcUqpYz1hI0WnMQ=
| |
− | </pre>
| |
− |
| |
− | With this entry one can then log into EON without password via:
| |
− |
| |
− | ssh -p 8022 192.168.43.1
| |
− |
| |
− | Note: The Wifi tethering IP address of EON is 192.168.43.1. If EON is on home WIfi, replace 192.168.43.1. with appropriate address.
| |
− | </div>
| |
− | </div>
| |
− | <!--// End Spoiler Area for How to SSH //-->
| |
| | | |
| === Git the Tesla OP Fork === | | === Git the Tesla OP Fork === |
− | SSH into your EON and execute the following commands (you need internet connectivity on your EON): | + | [https://community.comma.ai/wiki/index.php/Configuring_OpenPilot#How_to_SSH_to_the_EON SSH into your EON] and execute the following commands (you need internet connectivity on your EON): |
| <source lang="bash"> | | <source lang="bash"> |
| rm -rf /data/openpilot | | rm -rf /data/openpilot |
Line 143: |
Line 32: |
| | | |
| === Edit your Config === | | === Edit your Config === |
− | After the EON has booted you can edit your [[OpenPilot Configuration File|config]], which now has been automatically created. At the top find <source inline>user_handle = your_tinkla_username</source> and change your_tinkla_username to your Discord handle. (Tinkla username can be used if you have one, and we recommend it.) | + | After the EON has booted you can edit your [[OpenPilot Configuration File|config]], which now has been automatically created.<br/> |
| + | At the top find <source inline>user_handle = your_tinkla_username</source> and change your_tinkla_username to your Tinkla username (preferred, if available) or to your Discord handle. |
| | | |
| <source lang="bash">nano /data/bb_openpilot.cfg</source> | | <source lang="bash">nano /data/bb_openpilot.cfg</source> |
| | | |
| Make sure to set <source inline>use_tesla_gps = True</source> in case you're using a White Panda (Grey Panda has GPS built in). With GPS info of your drives you're helping Comma to improve their models (OpenPilot uploads your drives to their servers). | | Make sure to set <source inline>use_tesla_gps = True</source> in case you're using a White Panda (Grey Panda has GPS built in). With GPS info of your drives you're helping Comma to improve their models (OpenPilot uploads your drives to their servers). |
− | | + | Keep in mind that config changes only apply after rebooting the EON. |
− | After that you can proceed with flashing your [[Panda]] and possibly also your [[Pedal Interceptor|Pedal]].
| |
| | | |
| === Flash your Panda === | | === Flash your Panda === |
− | In your Tesla while it says “Car Off” connect your Panda to your Giraffe rev B OBD (or EPAS OBD). Connect your EON and panda via USB then SSH and run:
| + | {{Flashing the Panda}} |
− | <source lang="bash">cd /data/openpilot/panda/board
| |
− | Make
| |
− | Make recover
| |
− | Make recover
| |
− | Reboot</source>
| |
| | | |
− | After your EON reboots, if you have a Pedal skip to [[EON#Flash your Pedal|Flash your Pedal]]. If you don't have a Pedal, review [[#Controlling Adaptive Cruise Control|how to control OpenPilot ACC]] and take your improved Tesla for a spin.
| + | === Final steps === |
| + | Check here to learn more about all the controls, functions and features related to longitudinal control: [[Longitudinal_Control:_ACC#Using_Adaptive_Cruise_Control|Using adaptive cruise control]] |
| | | |
| Finally, edit this wiki page and add your Discord handle and Tesla type: | | Finally, edit this wiki page and add your Discord handle and Tesla type: |
| [https://community.comma.ai/wiki/index.php/Tesla#Community_ToDo_List Comma.ai wiki:Tesla] | | [https://community.comma.ai/wiki/index.php/Tesla#Community_ToDo_List Comma.ai wiki:Tesla] |
| | | |
− | === Flash your Pedal ===
| + | Experiencing issues?<br/> |
− | If you have a Pedal, now is the time to [[Pedal_Interceptor#Flashing_the_firmware_for_Tesla_Pedal|flash the firmware for Tesla Pedal]].
| + | In case you use a [[Pedal Interceptor|Pedal]] and it just won't work, chances are it doesn't have Tesla firmware on it yet. You can flash it with [[Pedal Interceptor#Flashing the firmware for Tesla Pedal|this guide]]. |
− | | + | Various other problems can be related to wiring, so double check each installation page, especially [[EPAS Harness]].<br/> |
− | Finally, edit this wiki page and add your Discord handle and Tesla type:
| + | On any other issue, please use the search function or ask us on Discord. |
− | [https://community.comma.ai/wiki/index.php/Tesla#Community_ToDo_List Comma.ai wiki:Tesla]
| |
− | | |
− | === Controlling Adaptive Cruise Control ===
| |
− | ACC allows the car to match speed with cars in front of you. The EON judges distances using the camera and dynamically adjusts cruise control speed. There are plenty of downsides to this strategy. The distance estimates are inaccurate. It only operates above 18 mph. The speed changes are not very smooth. And it can't handle sudden slowdowns so YOU MUST BE READY TO MANUALLY BRAKE AT ANY MOMENT. But it works without any new radar/pedal hardware.
| |
− | | |
− | To repeat, <span style="color:red;">'''YOU MUST BE READY TO MANUALLY BRAKE AT ANY MOMENT!'''</span>
| |
− | | |
− | Follow these steps to use ACC:
| |
− | # Press the cruise stalk IN so that the orange "cruise control ready" LED on the stalk is lit.
| |
− | # Enable the ACC option on screen if necessary.
| |
− | # Accelerate above 18 MPH.
| |
− | # Enable OpenPilot using a DOUBLE stalk pull (pull the cruise control stalk BACKWARDS TWICE in quick succession.) You will see the blue 'Cruise' icon appear on your dash. ACC is now active.
| |
− | # The initial max speed may be conservative. Press UP on the stalk to increase it.
| |
− | # Cruise is disabled if you brake or the car slows below 18 MPH. | |
− | # If ACC "AUTO" mode is enabled, manually accelerate above 18 MPH to resume.
| |
− | | |
− | Controls while ACC is enabled:
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Control
| |
− | ! Action
| |
− | |-
| |
− | | Cruise stalk IN
| |
− | | Master toggle for cruise control. Must be engaged for cruise or ACC to work.
| |
− | |-
| |
− | | Cruise stalk DOUBLE PULL
| |
− | | Enable OP ACC and steering, and increase the max allowed ACC speed if necessary.
| |
− | |-
| |
− | | On screen ACC button
| |
− | | Toggle between "FOLLOW" and "AUTO" mode. FOLLOW mode attempts to match speed with cars in front of you and disengages if you steer or brake. AUTO mode does the same, but automatically re-engages when you accelerate again.
| |
− | |-
| |
− | | Cruise stalk UP
| |
− | | Increase cruise speed, increasing max allowed ACC speed if necessary.
| |
− | |-
| |
− | | Cruise stalk DOWN
| |
− | | Decrease cruise speed and max allowed ACC speed.
| |
− | |-
| |
− | | Cruise stalk PUSH
| |
− | | Disable OpenPilot (both steering and ACC). Max allowed ACC speed is reset to 0.
| |
− | |-
| |
− | | Brake pedal
| |
− | | Pause both ACC and traditional cruise.
| |
− | |-
| |
− | | Accelerator
| |
− | | (When in AUTO mode) Accel over 18 MPH to unpause ACC.
| |
− | |}
| |
The EON is the name associated in the Comma.ai community to the device that sits in your windshield and does all the calculations for LKA and ACC.
EON DevKit (or FrEON)
The EON is based on the Qualcom Snapdragon 821 mobile platform. Phones like OnePlus 3T or LeEco LePro3 have been used to create the FrEON (the free EON). You can find some instructions here.
If you chose to buy your EON already made, you can do so from Comma.ai store for $599 USD.
Also, as we run more and more processing on the EON, it gets hotter and hotter. Some of us have opted to replace the original fan (which is also noisy when you're inside of a Tesla) with super quiet Noctua fans. $15 from Amazon and soldering two wires and you're good to go! We might have to actually double that to two Noctua fans in the neat future.
Also, keeping the phone screen off helps keeping the temperature low. I know, in the beginning one wants to see those lines matching the lines in the video, but after a while you stop paying attention to the screen. And if you have the IC integration all the data is on IC anyway. So turn that screen off and you will see the temperature drop about 15F.
Code for power management of battery (only charging when below 60% and stopping the charge when it reaches 80%) has helped keep the battery temperature lower and hence the CPU cooler. And this is a free upgrade, as the code is already in my repo.
Here is my EON bash profile (.bash_profile).
Installing OpenPilot for Tesla
Comma.ai doesn't support Tesla cars. That's why we maintain our own fork, which you will have to manually check out after setting up your EON.
DON’T INSTALL ON ANYTHING OTHER THAN A TESLA!
(Someone bricked their Jeep trying.)
Git the Tesla OP Fork
SSH into your EON and execute the following commands (you need internet connectivity on your EON):
rm -rf /data/openpilot
git clone --depth 1 https://github.com/BogGyver/openpilot.git -b tesla_devel /data/openpilot
reboot
The first reboot will take around 20 minutes to set everything up.
Edit your Config
After the EON has booted you can edit your config, which now has been automatically created.
At the top find user_handle = your_tinkla_username
and change your_tinkla_username to your Tinkla username (preferred, if available) or to your Discord handle.
nano /data/bb_openpilot.cfg
Make sure to set use_tesla_gps = True
in case you're using a White Panda (Grey Panda has GPS built in). With GPS info of your drives you're helping Comma to improve their models (OpenPilot uploads your drives to their servers).
Keep in mind that config changes only apply after rebooting the EON.
Flash your Panda
After installing or updating OpenPilot on your EON, you need to also update the software on your Panda. Here's how:
In your Tesla while it says “Car Off” connect your Panda to your Giraffe rev B OBD (or EPAS OBD). Connect your EON to the Panda via USB. Then SSH in and run:
cd /data/openpilot/panda/board
killall boardd
make clean
make && sleep 1 && (make recover || make recover) && echo Success! Rebooting in 2s... && sleep 2 && reboot
The kill command ensures that the EON stops regular communication to the Panda. That's also why a reboot is needed at the end. If any error occurs (which of course should not happen) the reboot will be skipped so you can troubleshoot.
AssertionErrors should be fixed by rebooting EON and trying a second time. Optionally you may also power cycle your Panda by reseating it.
Final steps
Check here to learn more about all the controls, functions and features related to longitudinal control: Using adaptive cruise control
Finally, edit this wiki page and add your Discord handle and Tesla type:
Comma.ai wiki:Tesla
Experiencing issues?
In case you use a Pedal and it just won't work, chances are it doesn't have Tesla firmware on it yet. You can flash it with this guide.
Various other problems can be related to wiring, so double check each installation page, especially EPAS Harness.
On any other issue, please use the search function or ask us on Discord.