i want to take data from serial port and want to redirect it to the ps/2(keyboard) port.
is it possible to do so if yes please help.

You don't really have to redirect it to the keyboard port but instead stuff the keys in the keyboard buffer. How to do that depends on the operating system.

You don't really have to redirect it to the keyboard port but instead stuff the keys in the keyboard buffer. How to do that depends on the operating system.

I have a weighing device. however the device has inter face for connecting it to serial or parallel port but the reading of the device is entered manually in a video page of a diskless pc which ultimately goes to central database on the server. Since I do not have access to the database and i want to automate the process of entering data directly from the weighing device to the video page how can i achieve this.

According to your subject title what i can understand is that u are trying to read data from serial and redirect it top PS/2.

Well, PS/2 are basically used for input devices, and perhaps if u wanted to read anything from there, u just access it through stdin standard input pointer as Ancient Dragon said.

Now can u make clear what are u trying to read from the input buffer and what are u trying to write on to the source. And what is your source.

What is Diskless PC?

ssharish

>>What is Diskless PC?
It is a PC without a hard drive -- boots up from a network drive.

Is the weighing device attached directly to the diskless PC via serial or parallel port? If yes, then why don't you just simply call printf() to display the information on the screen ? I think you are making it much more complicated than it needs to be.

>>What is Diskless PC?
It is a PC without a hard drive -- boots up from a network drive.

Is the weighing device attached directly to the diskless PC via serial or parallel port? If yes, then why don't you just simply call printf() to display the information on the screen ? I think you are making it much more complicated than it needs to be.

no the weighing device is not directly connected to the pc, but it can be attached directly to the pc with serial port. But the problem is that, I can enter the data manually in the video page of the diskless pc with key board. But since the pc has no hard disk how can I redirect the data from serial port to the given fields of video page.

>>no the weighing device is not directly connected to the pc, but it can be attached directly to the pc with serial port
That doesn't make sense. If the scale is not attached to the pc then how can you get the data from the serial port? And what does the absense of a disk drive have to do with anything ? Just get the information from the serial port and write it out to the monitor using standard printf() statements. If you have to put the information in existing fields on the screen then you will have to learn how to move the cursor before printing. Exactly how to do that will depend on the operating system. The most portable way will probably be to use curses library in *nix or pcurses port in MS-Windows/MS-DOS.

>>no the weighing device is not directly connected to the pc, but it can be attached directly to the pc with serial port
That doesn't make sense. If the scale is not attached to the pc then how can you get the data from the serial port? And what does the absense of a disk drive have to do with anything ? Just get the information from the serial port and write it out to the monitor using standard printf() statements. If you have to put the information in existing fields on the screen then you will have to learn how to move the cursor before printing. Exactly how to do that will depend on the operating system. The most portable way will probably be to use curses library in *nix or pcurses port in MS-Windows/MS-DOS.

the weighing device has a digital display & also a port for connecting it to PC. currently we take reading from the display and enter the data manually on video pages.
actually the whole system is based on client server architecture in which all the code and database is on the central server & the user has diskless client PC on which java video pages are shown for entering data.these clien t machines do not have hard disk & they get booted from the central linux server. User can enter the data of weighing device on specified field of java video pages using keyboard and mouse. So instead of using keyboard can we directly enter the data in specified field automatically if yes please tell me how? one more thing that we dont have access to the server.

OK, i guess i am with you now. So the weight machine has a display where you see the current weight, you want this value to be feed into the video display on your computer which you are at the movement doing it manually. But instead you wanted a system which can pick the value for the weight machine automatically and do some manipulation.

Well, the answer for that would be, did you get any device driver along with you weighting machine, if so they should be having some API calls, which you can call to read the values from the machine.

If you don't, try contacting your weighting machine vendor, they might having some idea, check out there website to find out if they have any facility of accessing their hardware from the machine.

ssharish

you are absolutely right,but i dont have any driver and even if i want to call the hardware by writing my code in c,where do i put my code i don't have access to the server, is there any other way of having this thing done?

>>the user has diskless client PC on which java video pages are shown for entering data
A project I worked on for several years had a server and several dump terminals. The server computer (a PC) had up to 32 devices attached to serial ports such as scales (weighing devices), barcode scanners, and large character printers (this was on assembly lines in factories). The information was collected by the server computer formatted for display then sent to the dumb terminals along with other information.

I think you will probably have to do something similar. Attach all the weighing devices to the server computer, format the java pages with the information then send it to the diskless PC for display. When something is weighed the scale will send the weight to the server computer, assuming you have a scale that can do that. At the time we used Accu-Sort scales.

>>i don't have access to the server
You will have to get access to the server. Or replace the diskless PCs with normal PCs so that it can run the program that collects information from the scanner.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.