tags:

views:

78

answers:

2

Hi,

How can I make an application interface so that a PC application can communicate to an embedded device like a POS terminal?

Like for example, an embedded device like POS terminal that has an embedded linux as an OS. Then I want a PC application to communicate in that POS terminal and access its module hardware like for example its magnetic stripe reader. What implementation should I create in the device, should I use CORBA or something related in that technology so that a PC application can communicate in the POS terminal?

Many thanks.

Edit:

The connection between the PC and the POS terminal is a serial.

+1  A: 

Just make a simple text-based menu interface that can be accessed via telnet or ssh, then make a pretty interface on the host PC that "pushes the buttons" so to speak.

Ignacio Vazquez-Abrams
You mean, I will connect to the POS terminal via telnet or ssh?
sasayins
Sure. Or you could hook up the interface to a serial port. The actual connection isn't as important as how the interface works.
Ignacio Vazquez-Abrams
So do I have to implement some program in the POS terminal so that it can accept the the incoming request from the PC?
sasayins
Yes. It would be a simple command-line application, and you would run it on the serial port from `gettytab`.
Andrew McGregor
Or via [x]inetd, or as a login shell for ssh. The possibilities are almost endless.
Ignacio Vazquez-Abrams
how to run that commandline application on the serial port on gettytab?
sasayins
+2  A: 

How are you going to connect your PC to the POS terminal? Most likely RS232 (serial) or maybe Ethernet/Wi-Fi. That should dictate how you're going to create your interface.

For serial connections, my recommendation would be a simple command-line prompt. It's easier to write and easier to debug. Write a parser that takes commands and responds accordingly.

For TCP/IP, how about a web interface? Or a telnet interface to a command-line prompt (like the serial connection).

tomlogic
What about in the side of the POS terminal? What implementation should I create? Should I make a server so that it will wait for the command from the PC?
sasayins
How you're connecting to the device is the first question to ask, I would say. +1
Dean Harding
Yeah, its a serial connection between the device.(PC and POS terminal)
sasayins
Just write a program in C on the POS hardware to open the serial port and write characters out to it. Using embedded Linux might be overkill -- check out the C-programmable embedded processors at www.rabbit.com or the Arduino controller.
tomlogic
@tomlogic - I would avoid the rabbit processor, particularly for learning. It is programmed in a language that is not-quite-C, is based on a processor that is not-quite-a Z80 and has chip prices that are twice that of an ARM, AVR32 or MSP430.
Ian