# 安装依赖
sudo apt install libsdl2-dev libsdl2-image-dev can-utils maven autoconf -y
# 下载ICSim
git clone https://github.com/zombieCraig/ICSim.git
# 编译安装
cd ICSim/
sudo make
# 下载socketcand
git clone https://github.com/linux-can/socketcand.git
cd socketcand# 获取缺少的文件
wget https://raw.githubusercontent.com/dschanoeh/socketcand/master/config.h.in# 编译安装
autoconf
./configure
make clean
make
sudo make install
# 下载
git clone https://github.com/dschanoeh/Kayak.git
# 安装jdk
sudo apt-get install openjdk-8-jdk
# 安装
cd Kayak
mvn clean package
# 设置vcan(虚拟CAN)接口
sudo modprobe can
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
# 打开仪表盘模拟器
./icsim vcan0
# 打开仪表盘控制器
./controls vcan0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 使用candump抓包
candump vcan0 -l
canplayer -I candump-2023-01-12_151749.log
(1673507873.514241) vcan0 19B#00000E000000
grep 19B candump-2023-01-12_151749.log
19B#00000E000000
为开启左前侧车门,19B#00000F000000
为关闭所有车门
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
右后侧车门 左后侧车门 右前侧车门 左前侧车门
8 4 2 1
1 0 0 0
188#01000000
188#02000000
E
N
D
本文作者:TideSec
本文为安全脉搏专栏作者发布,转载请注明:https://www.secpulse.com/archives/197219.html