Replies: 2 comments
-
Reserved. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Reserved. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
INTRODUCTION
See the well maintained README for a general explanation of what the project involves here
First and foremost, the car must have Adaptive Cruise Control (ACC); attempting to port a car without it could require an excessive amount of coding and retrofitting work.
Knowing which ECU to install the pico-flexray on depends on your car's infrastructure and requires familiarity with your vehicle. If you need assistance, you can try contacting the official Discord channel here.
The MITM circuit needs to be built, which requires first obtaining the necessary components. This project is not affiliated with AliExpress, but it appears to be the best place to find all the parts at a reasonable price for Western users, while Taobao is preferable for Eastern users. (Please suggest any other alternative if needed.)
It is advisable to purchase more parts than required to have spare replacements available.
Note: As of now, no ready-made solution exists, so resorting to a DIY approach is necessary. This requires skills in soldering, cable crimping, and dismantling vehicle parts, for which YouTube can be helpful, as well as access to diagnostic software and original assembly manuals (e.g. for BMW, ISTA+, TIS, etc.).
This guide requires Ubuntu 24 LTS, as it is the official and recommended operating system by Comma.
2x FlexRay transceivers TJA1082 or TLE9222 or NCV7383, they are pin to pin compatible.
1x Raspberry Pico2 RP2350 based board
Female connector and one male socket compatible with your ECU unit, supplied complete with their respective pins.
Note: The original connector part is a male 6913632 (white), which is almost impossible to find on its own, and the female connector is even harder to source. However, the male 6913630 (black) and its corresponding female connector are readily available. The trick is to slide out the original insert of the white connector and fit it onto the Pico-FlexRay harness on the ECU side, then use the black 6913630 connector on the original vehicle connector. Please refer to the top picture for more details.
Please note, based on your car features, SAS the harness can have more
Please note that the 6913632 (white) and 6913630 (black) connectors are NOT identical and do not fit together, as the notch is located differently (see below). However, their internal inserts are actually identical.
Buying the crimp-style connectors you can save some money by crimping only the wires you actually need.
Optional Parts to make the prorotype more flexyble:
Follow the readme here to assemble and flash the pico2
BEFORE STARTING CABANA AND CONNECTING TO THE VEHICLE
Double-check your harness and pico-flexray soldering job before connecting to the car; a faulty cable can cause irreparable damage to your ECUs!!
Now it is time to learn how to port the car. A good starting point before asking for help here is to watch the official Comma AI tutorial on car porting. video
Disconnect the negative terminal of the 12V battery. Connect the Pico-FlexRay board. Reconnect the negative terminal. Power the pico-flexray via USB-C using your Ubuntu laptop or a USB charger. The car should start without any issues and must not display any ACC or PDC warning messages. If any problems occur, double-check the Pico-FlexRay PCB and wiring for faults.
Start Cabana using the referenced readme guidelines.
Switch to the "Panda" tab and check if the PicoFlex board is recognised.
If it is not, this is often a common
lsusb
permission issue visible in the terminal; it is not advisable to run Cabana usingsudo
so,Reload udev (or reboot the system):
In Cabana Settings, under New SIgnal Settings, Drag Directions, be sure to select
Always Little Endian
It is safer to record a "route" and analyse it later. Once Cabana is started, it immediately begins logging data from the FlexRay bus and stops when the app closes or the stream is closed. The route files are stored in the Cabana path, typically in /home/user.
Be sure to be on a safe road or, better still, an empty car park. Perform all the operations described in the video and more, such as activating and deactivating all the ACC controls. It is also advisable to record a video with a securely fixed camera during this time so you can correlate the frames with those generated in Cabana.
The video can also be included in Cabana with a script (part to be completed). This will allow synchronising the video frames with the generated data for better reference and analysis.
ANALYSING FRAMES
This is the tricky part. First reopen Cabana, load your recorded route in the 'Replay' tab, using the route directory that has the suffix '-0', routes are split into 1-minute segments.
5, then drag signals you are interested in, select type to multiplexed signal, multiplex value is from 0-3, which showed in Messages panel.
for example, 0x3c01, means frame id=0x3c, mux value=1
The cabana fork offered in this repo is different from the original as two functions designed specifically for demultiplexing (demux) were added.
HOW MUX AND DEMUX WORKS
How to mix different functions into a single frame id?
This is "multiplexing", the cycle count field is a 6 bits counter, starts from 0-63, when cycle counter % 2 == 0, it's called cycle repetition=2
Now the frame is splitted into 2 function, even cycle for braking, odd cycle for steering
When counter % 2 == 0, it's called cycle base=0,
Counter % 2 == 1, means cycle base=1
HOW TO RUN STEERING SCRIPT TO TEST LATERAL CONTROL
The cloned repository in the 'pico-flexray' directory contains all necessary files.
Prerequisites:
(Section to be revised)
Run crc8_test
python3 crc8_test.py
Lateral steering wheel turn test
python3 inject_sas_steering_angle.py
To be continued....
Beta Was this translation helpful? Give feedback.
All reactions