Access to CAN-Bus

T

Thin Myrna

I'd like to access some drive hardware via CAN bus from Python under Linux
(sending rec'ing PDOs). Googling around I couldn't find a Python package,
but people who said that they are doing this, though. I guess they are
using their home brewn software.

Any pointer to
- such software (anyone willing to share his experience?)
- how to write such software?

Under Windows, I guess, I could use some COM or ctypes functionality to
access the hardware vendor's hardware. What if I wanted to access such
hardware from Linux? Is there a package that allows that in a vendor (who
doesn't support Linux) independent way?

Many thanks in advance
Thin
 
D

Diez B. Roggisch

Thin said:
I'd like to access some drive hardware via CAN bus from Python under Linux
(sending rec'ing PDOs). Googling around I couldn't find a Python package,
but people who said that they are doing this, though. I guess they are
using their home brewn software.

Any pointer to
- such software (anyone willing to share his experience?)
- how to write such software?

Under Windows, I guess, I could use some COM or ctypes functionality to
access the hardware vendor's hardware. What if I wanted to access such
hardware from Linux? Is there a package that allows that in a vendor (who
doesn't support Linux) independent way?

I've never heard of a OS-level CAN-bus-integration. So I doubt that
there is any vendor-independent way.

Doesn't your CAN-bus-interface have some library or driver support?

Diez
 
S

Stephan Diehl

Thin said:
I'd like to access some drive hardware via CAN bus from Python under Linux
(sending rec'ing PDOs). Googling around I couldn't find a Python package,
but people who said that they are doing this, though. I guess they are
using their home brewn software.

Any pointer to
- such software (anyone willing to share his experience?)
- how to write such software?

Under Windows, I guess, I could use some COM or ctypes functionality to
access the hardware vendor's hardware. What if I wanted to access such
hardware from Linux? Is there a package that allows that in a vendor (who
doesn't support Linux) independent way?

Many thanks in advance
Thin

We've done this once (sorry no open source). If I remember right, we've
been using ctypes on windows to access the CAN card. If I had to do
something like this again, I'd definatelly check out an USB CAN adapter
which might be easier to handle (but one never knows).

Stephan
 
E

eliben

I'd like to access some drive hardware via CAN bus from Python under Linux
(sending rec'ing PDOs). Googling around I couldn't find a Python package,
but people who said that they are doing this, though. I guess they are
using their home brewn software.

Any pointer to
- such software (anyone willing to share his experience?)
- how to write such software?

Under Windows, I guess, I could use some COM or ctypes functionality to
access the hardware vendor's hardware. What if I wanted to access such
hardware from Linux? Is there a package that allows that in a vendor (who
doesn't support Linux) independent way?

Many thanks in advance
Thin

I don't think this can be done in a vendor independent way, because as
far as I know there is no standard for CAN drivers. It all depends on
the card you have and what its maker supplies.

It usually works as follows: the car maker supplies a DLL file with
some examples of calling it from C or Visual Basic (for Windows
systems). Maybe the DLL is downloadable from the company's website.
You can easily ruse this DLL from Python, with the excellent 'ctypes'
module. I've had some dealings with DLLs from various scripting
languages, and I can tell you with confidence that nothing comes close
to the ease of use and functionality of ctypes.
 
T

Thin Myrna

Thin Myrna wrote:

Thanks for all your answers.

I've just contacted the vendor for Linux support. If I went for an other
vendor (I'm on a notebook, so USB-hardware is needed): Does anyone have
especially good experiences with a particular one? Anyone I should stay
away from?

Kind regards
Thin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top