Code Monkey home page Code Monkey logo

elmcan's People

Contributors

norly avatar tomaszduda23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elmcan's Issues

elm327 with wifi interface

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.

ldattach: cannot set line discipline: Invalid argument

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?

No messages received

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.

fail in compiling

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

How to use?

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?

Installing elm327 on Ubuntu 20.04 - errors received

Hello,

I'm trying to install the elm327 driver on Ubuntu 20.04 with kernel 5.4.0-113-generic with the following commands:

sudo modprobe can-dev
cd module/
sudo dkms install .

These commands results in the following error found at /var/lib/dkms/can327/1/build/make.log:

elm327

Whats going wrong?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.