Pull data from RS-232 aka Com port.

EasyUp Web Hosting

EasyUp Web Hosting
Company Rep
Joined
Mar 18, 2008
Messages
8,517
Reaction score
43
Location
Alberton
My request is related to Time & Attendance and helping a company out.

This company has a handpunch 4000 T&A machine, which connect to one of the computers via serial cable. They have to open a app (supplied by their current T&A support company), download the clocks and then print it. Then they have to manually enter the times into Pastel Payroll.

I cannot understand why the system has to work this way and the T&A support company will help, but their pricing isn't fair, imo. So I thought I will see if I can find a solution myself. My issue is, when I use putty to connect to the HP4000, I just get a black screen and I have to mention, this is kinda where my knowledge ends...

I was wondering if there is a way, where I can at least connect a raspberry to this device and pull the data to a csv file and maybe schedule it with cron jobs or something? I am unable to confirm if the HP4000 has the optional network card installed, as the device is locked and the client doesn't have a key.
 
My issue is, when I use putty to connect to the HP4000, I just get a black screen and I have to mention, this is kinda where my knowledge ends...

Have you tried different parameters for the serial port?

Baud rate
Data bits
Stop bits
Parity
Flow control
 
I copied the settings in the current app they use.

It's my understanding that you will only see data, once you request it? The thing is, I don't know how to request it from putty or telnet.
 
You might have to capture the serial port data to see how the app communicates with the device. The captured data might be all you actually need.
 
Thank you @ ArtyLoop, but at the end of the day, I want to connect a raspberry to the device to "pull" the data and save it to a csv file or similar.
 
Thank you @ ArtyLoop, but at the end of the day, I want to connect a raspberry to the device to "pull" the data and save it to a csv file or similar.

Step 1- get necessary info out of the system as it is working using a Windows PC to sniff the protocol.
Step 2- With the necessary info gleaned from Step 1 (which will give you the serial baudrate, and setup i.e. number of bits, stop bits, parity) you can begin to write an application to interact with the device because then in Linux you can simply open the port and do the necessary

I've done the above, many times, and with all kinds of embedded and "Pi" types of SBC. Its part of my job. I still do it, even today. If you battle you are welcome to drop me a PM
 
Com port. What a ****ing throwback.
Erm... many USB devices emulate the serial port to cut down on driver development effort, especially since Microsoft and their signed drivers BS... is kind of irritating.

Since most OS support USB-to-serial devices out the box, if you emulate them in the firmware of the device its plug and play, which is what many many manufacturers of things are doing now. Things like:

* Kiosk thermal printers
* Cash / coin vending and acceptance
* Biometric readers
* Smart card readers/writers.

appear as a COMx port or /dev/ttyUSB** when plugged into a computer. This is true for Windows, Linux, macOS.

Because of this, its a f**king snap to write code in any language and be up and running with the device. It takes me on average 4 1/2 hours to write a polling thread (if applicable), and receive buffering unit with parsing. I've done it too many times to count, in every language (C, C++, C#, python, Golang, Delphi)
 
Top
Sign up to the MyBroadband newsletter
X