469,275 Members | 1,594 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Access to CAN-Bus

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
4 4027
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
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
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
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.

Similar topics

63 posts views Thread by Jerome | last post: by
49 posts views Thread by Yannick Turgeon | last post: by
64 posts views Thread by John | last post: by
52 posts views Thread by Neil | last post: by
17 posts views Thread by Mell via AccessMonster.com | last post: by
37 posts views Thread by jasmith | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.