473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Communicating with a DLL under Linux

I am interested in peoples experience with communicating with DLLs under
Linux.

Situation:

I'm an electrical engineer that finds pleasure in using my soldering
iron from time to time. I also find programming, preferably in Python,
entertaining. I wouldn't call myself a programmer, though. Now, I may
have found a hobby project that could give me the pleasure from both
those worlds. There's this USB development gadget for sale in my
favourite electronics store, and I sure would like to have something
like that connected to my lab computer (a fairly new budget computer
running Kubuntu 6.06).

The gadget costs about 50 Euros. It's not a lot of money, but I would
not like to buy the thing if there is a substancial risk that I will not
be able to make it work on that computer. From what I've read on the
box, it assumes Windows (a number of versions), it includes a DLL to
communicate with it, and example code in VB (iirc). For the interested,
here's the gadget:

http://www.elfa.se/elfa-bin/dyndok.p...0&dok=9001.htm

I have been looking at ctypes, and from what I read, I should be able to
communicate with a DLL by using ctypes. It even sounds fairly easy, as
long as I know what the DLL is supposed to do. I expect there to be some
kind of manual for the DLL included in the box. Are DLLs universal, or
are there different DLLs for Windows and Linux (I'm not a programmer,
remember)? If the vendor claims that the DLL is for Windows, is it
reasonable to assume that it can be made to work under Linux, from
Python, that is? Or is this perhaps completely out of the question?

So, who is willing share their experiences? Share advice? Is this as
easy as it sounds to me? Any pitfalls around?

Regards
/MiO
Mar 13 '07 #1
4 4779
On 2007-03-13, Mikael Olofsson <mi****@isy.liu.sewrote:
The gadget costs about 50 Euros. It's not a lot of money, but I would
not like to buy the thing if there is a substancial risk that I will not
be able to make it work on that computer. From what I've read on the
box, it assumes Windows (a number of versions), it includes a DLL to
communicate with it, and example code in VB (iirc). For the interested,
here's the gadget:

http://www.elfa.se/elfa-bin/dyndok.p...0&dok=9001.htm

I have been looking at ctypes, and from what I read, I should be able to
communicate with a DLL by using ctypes.
Only under Windows.
It even sounds fairly easy, as long as I know what the DLL is
supposed to do. I expect there to be some kind of manual for
the DLL included in the box. Are DLLs universal, or are there
different DLLs for Windows and Linux (I'm not a programmer,
remember)?
Yes. Shared libraries (Called DLLs under Windows) are
different than shared libraries under Linux.
If the vendor claims that the DLL is for Windows, is it
reasonable to assume that it can be made to work under Linux
No.
from Python, that is? Or is this perhaps completely out
of the question?
It's probably out of the question.

--
Grant Edwards grante Yow! I am NOT a nut....
at
visi.com
Mar 13 '07 #2
On Mar 13, 5:59 pm, Mikael Olofsson <mik...@isy.liu.sewrote:
If the vendor claims that the DLL is for Windows, is it
reasonable to assume that it can be made to work under Linux, from
Python, that is?
No. It's reasonable to assume, that there is no *easy* way to get
Win32's DLL working under unices. There are hackish ways, for example
MPlayer does support Win32's DLL codecs.
Linux/Unix shared libraries have completely different file format
(usually ELF).

http://en.wikipedia.org/wiki/Dynamic-link_library
http://en.wikipedia.org/wiki/Executa...inkable_Format
http://en.wikipedia.org/wiki/Shared_library#Naming

Mar 13 '07 #3
jkn
Hi Mikael
It is probably worth you finding out more about the specific
Hardware that Velleman use for this kit. Depending on the chip
manufacturer, there may be more or less support already available. For
instance, I have recently been communicating with the FTDI USB chips
under windows. There is a PyUSB module which might help you do
something similar, and the FTDI website has quite a lot of
information.

As it turns out, I didn't use PyUSB - for reasons connected with the
version number of Python and annoying things like that (aside - has
anyone got PyUSB compiled for 2.5?). I developed my own pure python
interface to the FTDI chips DLL, using ctypes. So yes, this can be
done. I think you'd be on quite a learning curve for this, from what
you say, but don't let that put you off! Unfortunately I can't share
my code with you, but just knowing that it can be done is sometimes a
help...

FTDI make some evaluation boards for their USB chips and you might
consider going that route... http://www.ftdichip.com BTW. No
connection, just a customer/developer.

HTH
jon N

Mar 13 '07 #4
Mikael Olofsson wrote:
I am interested in peoples experience with communicating with DLLs under
Linux.

Situation:

I'm an electrical engineer that finds pleasure in using my soldering
iron from time to time. I also find programming, preferably in Python,
entertaining. I wouldn't call myself a programmer, though. Now, I may
have found a hobby project that could give me the pleasure from both
those worlds. There's this USB development gadget for sale in my
favourite electronics store, and I sure would like to have something
like that connected to my lab computer (a fairly new budget computer
running Kubuntu 6.06).
Take a look at Wiring:

http://wiring.org.co/

That's an interface board with considerable onboard processing power
and a whole no-cost development environment that runs under Linux
or Windows. It's intended for artists who want to build projects that need
some computer control.

John Nagle
Mar 13 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martin | last post by:
This is probably a very easy one but I just can't put my finger on the communicating events name:- I have a MDIform with a couple of child forms. The child forms scroll vertically at run time...
2
by: Eric Brunel | last post by:
Hi all, We're trying to communicate with Microsoft Visual C++ 6.0 via COM to make it perform a few operations. Our main need is to set a breakpoint on a given line in a given file. We ended up...
3
by: Michael Sparks | last post by:
Hi, I'm posting a link to this since I hope it's of interest to people here :) I've written up the talk I gave at ACCU Python UK on the Kamaelia Framework, and it's been published as a BBC...
1
by: valere | last post by:
I look for information for communicating between JavaScript and a native plugin. I noticed that LiveConnect is oriented to communicate as a "bridge" between Java and JS. But how to process with a...
0
by: Jack | last post by:
I am trying to diagnose some partitioned db performance problems and am trying to figure out how to measure how much time is spent on communicating between the nodes. I'm seeing long execution...
3
by: Stan | last post by:
Hallo, I have developed an application in MS Access 2000 (Polish version) under MS Windows XP prof (also Polish). Now I would like to run this code on MS Windows XP EN and MS Access XP EN. I have...
4
by: Joćo Pires | last post by:
I have a program write in VB and I need to convert the code to C for Linux. Well, I began to do that but I have some problems ... - How can I write te code in C to comunicate with the serial...
5
by: caroalv | last post by:
Hiya, I hope I'm using the correct group here. I'm a newbie to C. I need a Java program and external program to send and receive messages to and from each other, but the only way I can do it is...
1
by: khishku | last post by:
Hai, I am using linux redhat for developing SCADA software, when i am communicating to my PLC, the packets recieved from PLC is different. when i am comparing with the test software available...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.