inb outb functions

the reason is that i have a project in mind in robotic field so i need serial to accomplish that

On Wed, 10 Apr 2013 20:06:02 +0000, wiss1990 wrote:

> the reason is that i have a project in mind in robotic field so i need
> serial to accomplish that

OK, so the communication to the robotic device would be connected to the
serial port on the host? Would it use virtualization at all in final
implementation, or would it be a native serial implementation on the
platform without virtualization?

Writing to an actual serial port is different than writing to an emulated
serial port that dumps to a file - which is part of what I’ve been trying
to understand about your goal so I could explain it to you. Real serial
communications involve flow control that file-based emulation cannot
emulate effectively. It may be more effective to actually connect
something to the serial port that you can interact with, even if it’s
just a terminal program connected via a serial-to-serial connection.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Now we start to get a picture. I agree with Jim that using hardware for
simulation is to be preferred it rules out artificial problems which
just come from the virtualized simulation.
Independent from that do not make your life harder than it has to be.
There are libraries for serial communication, no need to reinvent the wheel.
Look at termios, here is a pointer to get you started how that looks like
http://en.wikibooks.org/wiki/Serial_Programming/Serial_Linux#termios


PC: oS 12.3 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.10.0 | GTX 650 Ti
ThinkPad E320: oS 12.3 x86_64 | i3@2.30GHz | 8GB | KDE 4.10.2 | HD 3000
HannsBook: oS 12.3 x86_64 | SU4100@1.3GHz | 2GB | KDE 4.10.0 | GMA4500

Am 10.04.2013 22:45, schrieb Martin Helm:
> Now we start to get a picture. I agree with Jim that using hardware for
> simulation is to be preferred it rules out artificial problems which
> just come from the virtualized simulation.
> Independent from that do not make your life harder than it has to be.
> There are libraries for serial communication, no need to reinvent the wheel.
> Look at termios, here is a pointer to get you started how that looks like
> http://en.wikibooks.org/wiki/Serial_Programming/Serial_Linux#termios
>
and of course the mandatory
http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/
old but still good.

Btw if you plan to use termios in C you need the package glibc-devel
(should be installed by default if you have the C compiler installed I
think).


PC: oS 12.3 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.10.0 | GTX 650 Ti
ThinkPad E320: oS 12.3 x86_64 | i3@2.30GHz | 8GB | KDE 4.10.2 | HD 3000
HannsBook: oS 12.3 x86_64 | SU4100@1.3GHz | 2GB | KDE 4.10.0 | GMA4500

thnx guys for your answers !!
but i wanted to solve the problem which is reading from serial port is not well organised as the sent caracters :slight_smile: any solutions for that ? and thnx

Am 10.04.2013 00:16, schrieb wiss1990:
> ioperm(0x2F8,0x2F8,1)

why do you pass the port number as length parameter to ioperm? That just
does not make any sense IMHO.


PC: oS 12.3 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.10.0 | GTX 650 Ti
ThinkPad E320: oS 12.3 x86_64 | i3@2.30GHz | 8GB | KDE 4.10.2 | HD 3000
HannsBook: oS 12.3 x86_64 | SU4100@1.3GHz | 2GB | KDE 4.10.0 | GMA4500

On Thu, 11 Apr 2013 22:16:03 +0000, wiss1990 wrote:

> thnx guys for your answers !!
> but i wanted to solve the problem which is reading from serial port is
> not well organised as the sent caracters :slight_smile: any solutions for that ? and
> thnx

I would suggest using a real serial port rather than an emulated serial
port that uses a file, because flow control to a file isn’t possible, and
characters arriving out of sequence is likely a flow control issue.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C