norly / elmcan Goto Github PK
View Code? Open in Web Editor NEWLinux SocketCAN kernel driver for ELM327 based devices
License: GNU General Public License v2.0
Linux SocketCAN kernel driver for ELM327 based devices
License: GNU General Public License v2.0
I tried sudo dkms install pwd
Result:
Error! Invalid number of arguments passed.
Usage: add / or
add -m / or
add -m -v
I'm trying to connect via bluetooth. After I run ldattach
on the bluetooth device I've connected with rfcomm
I get a can0
network device. I try doing ip link set can0 bitrate 38400
but it won't let me set it that low. I have to do something like ip link set can0 up type can bitrate 125000
. I can then bring the device up but candump shows nothing. My end goal is to connect it to something like Kayak. Any idea how this would be done. Am I on the right path?
Is there a plan to add support for the extended ST command set (e.g. STM, STMA)?
Documentation: https://www.scantool.net/scantool/downloads/98/stn11xx21xx_frpm_d.pdf
Hi I'm trying to use this module at Ubuntu 20.04, but when I run ldattach comand, it ends with error
when I input
sudo ./attach-me.sh /dev/ttyUSB0
it shows me that
ldattach: iflag (set/clear): 64/4352
ldattach: opened /dev/ttyUSB0
ldattach: set to raw 38400 8n1: cflag=0xcbf
ldattach: cannot set line discipline: Invalid argument
Do you have any idea why it's not working?
Hi,
I have kernel 4.9.232, I have tried to build elmcan but I have got the error below, is that because my kernet is not 4.11?
khadas@Khadas:~/elmcan/module$ make
make -C /lib/modules/4.9.232/build M=/home/khadas/elmcan/module modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.232'
CC [M] /home/khadas/elmcan/module/elmcan.o
/home/khadas/elmcan/module/elmcan.c: In function ‘elmcan_ldisc_open’:
/home/khadas/elmcan/module/elmcan.c:1118:11: error: ‘struct can_priv’ has no member named ‘bitrate_const’; did you mean ‘bittiming_const’?
elm->can.bitrate_const = elmcan_bitrate_const;
^~~~~~~~~~~~~
bittiming_const
/home/khadas/elmcan/module/elmcan.c:1119:10: error: ‘struct can_priv’ has no member named ‘bitrate_const_cnt’
elm->can.bitrate_const_cnt = ARRAY_SIZE(elmcan_bitrate_const);
^
scripts/Makefile.build:340: recipe for target '/home/khadas/elmcan/module/elmcan.o' failed
make[2]: *** [/home/khadas/elmcan/module/elmcan.o] Error 1
Makefile:1656: recipe for target 'module/home/khadas/elmcan/module' failed
make[1]: *** [module/home/khadas/elmcan/module] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.9.232'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
Hi! I was very glad to find this project. Looking forward to using by OBDLink LX device with SavvyCAN and other socketcan software.
I have verified with ESP32 CAN reader that my car is constantly sending CAN messages with IDs 0x45A
0x4E0
when engine is on. I also see these messages in RaceChrono Android application when using OBDLink LX.
However after setting up elmcan candump can0
does not return any messages. How could I debug this situation?
I am able to connect to the OBDLink via picocom
and the ELM version is ELM327 v1.4b
. ldattach
runs fine and can0
device is created. However neither candump
and neither cansniffer
is showing CAN messages on the bus.
I am trying to use the can327
module that comes with my distribution's kernel 6.2.8-100.fc36.x86_64
. The device is using an open wifi network and you have to connect to 192.168.0.10:35000
. It is working fine with regular mobile software were I can read ecu errors and see live data.
After some googling I found the command to forward pty to a tcp connection using socat:
socat -d pty,link=/dev/ttyUSB0,waitslave tcp:192.168.0.10:35000
Then I am following the documentation instructions:
# ldattach --debug --speed 38400 --eightbits --noparity --onestopbit --iflag -ICRNL,INLCR,-IXOFF 30 /dev/ttyUSB0
ldattach: iflag (set/clear): 64/4352
ldattach: opened /dev/ttyUSB0
ldattach: set to raw 38400 8n1: cflag=0xbf
ldattach: line discipline set to 30
# ip link set can0 down && ip link set can0 type can bitrate 500000 && ip link set can0 up
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
link/ether 38:00:25:8b:0a:5b brd ff:ff:ff:ff:ff:ff
35: can0: <NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can
# dmesg
[25810.509171] can0: can327 on pts4.
[25851.397760] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
Then I use candump can0
and I don't get anything back.
I could use some help.
I Cannot find ./elmcan.ko
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.