Vehicular libraries/projects written using Elixir (e.g. OBD-II logger etc.)

This is a thread to gather some information about the efforts of using elixir in combination with cars or vehicular systems in general.

I’m really interested in this area and would love to use elixir and its eco system (e.g. Raspberry PI running nerves).
So far I’ve found the following:

Libraries:

  • NgCAN (a simple elixir library to read from and write to a CAN bus. since it uses socketCAN, it only runs on Linux.)

Talks:

Maybe some of you have some more links, libraries, or information.
That would be really great :+1:t3:

There must be something, as IIRC QuickCheck was used in the automotive industry for testing some systems. But I cannot tell anything more.

About NgCAN, it seems that with OTP 23+ (or 24+) you do not need C code, as you can use socket module instead (it allows any protocol ID, and these can be found via socket:supports/{0,2}).

Thanks for your response.

Yeah with NgCAN you should be right. :+1:

Hey @fklement, did you make progress here? I’m converting a Ford Transit into a vanlife/tinyhome and am building a Nerves/Phoenix dashboard for management of lighting, heating, etc. I have an OBDLink MX+ bluetooth OBD-II reader and am attempting to query vehicle data. Did you find more prior art or develop a solution yourself?

1 Like

Hey, for reading the vehicle data maybe you wanna checkout my latest project here :slight_smile:

2 Likes

Hi @skyler first of all sorry for the late reply.
No, I would have loved to. But I decided not to use nerves for my project.

Regarding reading CAN data, I have started to develop a small library to facilitate the candump tool for Linux. The library is called cannes (GitHub - fklement/cannes: A library for CAN written in Elixir) and is in a very early stage. But I plan to develop it further after I finish my master thesis next month.
(@pay64k This might be interesting for you to look into as well. Maybe we could work together to develop a unified CAN library for elixir. )

Thanks also to @pay64k for pointing out your project. I will definitely have a look at it.

1 Like

Definitely, it would be nice to be able to use CAN library for projects that includes reading data form car’s ECU. My project uses ELM327, which has some hiccups from time to time - I don’t know wether it’s caused by poor quality of my adapter or by the fact that it’s not fast enough (or maybe it’s the ECU). Problems appear when, for example I try to read a lot of data in short intervals (like 250 ms). I believe that eliminating ELM and talking directly over CAN would be faster.

On the other hand, getting ELM is way cheaper then a specialised CAN module/connector for RPi for example. But hey, I’d definitely like a smoother data refresh on my dashboard :slight_smile:

I’ve been using elixir professionally in the automotive industry for a few years. One of the artifacts was open sourced and be found here GitHub - AleksandarFilipov/signalbroker-server: Development tool to read and write CAN/LIN/flexray and other buses using gRPC which allows usage of preferred language. - it was previously hosted by and automotive company.
Today I’m working on a derivate (which is closed source) which is located here GitHub - beamylabs/beamylabs-start (yep it’s a shameless plug) but nevertheless it might be fun knowing that stuff is ongoing.
I would have assumed that the mentioned open source project would be easy to find given that I’ve populated it will loads of automotive buzzwords.

2 Likes