By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 2,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

Access to CAN-Bus

P: n/a
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

Jun 27 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Thin Myrna schrieb:
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
Jun 27 '08 #2

P: n/a
Thin Myrna schrieb:
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
Jun 27 '08 #3

P: n/a
On Jun 9, 8:57 am, Thin Myrna <no.s...@spam.nowrote:
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.

Jun 27 '08 #4

P: n/a
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
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
Jun 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.