Jump to content

port in e out on linux version


nicB

Recommended Posts

Hi, guy

I'm try to installa a labview 8 on linux Suse 10.0

I'm new of Linux, i would like evaluate the difference of windows or linux version.

The first problem is: The port in e out vi for access I/O port, exists on linux?

Is the problem the not work with a dll's?

I want work with the serial e lpt port on labview & linux direct to access in the memory location or pin control.

How is possible?

Thank's for answer, Nic

Link to comment
  • 2 weeks later...
Hi, guy

I'm try to installa a labview 8 on linux Suse 10.0

I'm new of Linux, i would like evaluate the difference of windows or linux version.

The first problem is: The port in e out vi for access I/O port, exists on linux?

Is the problem the not work with a dll's?

I want work with the serial e lpt port on labview & linux direct to access in the memory location or pin control.

Not easily. Linux just as Windows does not allow applications to access hardware directly. In Windows you have to write a device driver that does run in the kernel context to do that for you and that is the same for Linux. For Windows there exist several solutions with according device drivers to access the IO adres range from an application level.

For Linux there are also several possibilities but an according kernel driver has never made it into the official kernel sources and definitely never will make it into it, since this is a potential security risk. The only way to get that done is by looking for one of the various hacks for Linux port IO access on internet

and put that yourself into your kernel. This obviously will require you to at least compile some stuff like a kernel module but more likely to compile your own kernel.

Basically while it sometimes seems necessary to do direct port IO it is mostly a bad idea and a potential security risk for sure.

Rolf Kalbermatter

Link to comment
Is the problem the not work with a dll's?

there is no problem. a windows dll will simply not work on linux. but if you have the source code, you can compile it as a *.so module yourself ... (dont ask for more, that's all i know about that topic ;) )

Link to comment
Thank for all,

On conclusion i will try to find a sourc code on C wich access the port, i compile on linux and i join this with a cin node?

Is correct thats? Thank you for all reply.

Nic

This won't work. The CIN node or shared library is still running in the application context and as such has no direct access to the protected kernel resources to whom the Port IO adresses belong. You have to extend your kernel itself to allow port access either by a port IO kernel driver that translates your port access requests to the actual hardware access on behalf of your application or by an expansion to the kernel with a system call to manipulate the IO permission map.

In the first case you call your device driver and pass it the IO adress, access mode and data and it does then do the actual port read or write for you and in the second case you do a system call to that new kernel function to tell it to modify the port IO permission map for your process to allow direct access to specific IO adresses from your application process.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.