Receiving data from Scanner via serial port

445 Views Asked by At

I want to receive data from a scanner through a serial port. My scanner is connected to a EPT (Electronic Paiment Terminal) on COM0.

The scanner seems to work fine, I can detect barcodes and QrCodes but nothing is received on serial PORT. Every scanner I tried ended with the same result, but I managed to receive data from other devices.

Is there any specificities about that kind of devices ?

On EPT side, serial port is formated as the scanner dialog (115200, 8, N, 1 with no flow control) I can receive data from the scanner to a computer and from computer to the EPT.

I have tried with two different scanner: - HoneyWell 3310G - Posline PS-75

I work on a IWL250 and a IUC180B. Both are EPT made by INGENICO. Both react in the same way.

On EPT, I have to use a C API given by the constructor of the machine.

Below my test code :

if(IsCOM0()){

    if(stdcom0() == 0)
        hCom0 = Telium_Fopen("COM0", "rw");
    else
        hCom0 = stdcom0();

    Telium_Format("COM0", 115200, 8, 1, NO_PARITY, EVEN, 0);
    Telium_Send_receive(hCom0, ON, ON);
    iRet = Telium_Ttestall(COM0, 0);
    iRet = Telium_Ttestall(COM0, 0);

    do{

        j = Telium_Fread(&test[i++], 1, 1, hCom0);

    }while(j > 0);

    Telium_Fclose(hCom0);
}

With every devices except the scanner i have, Telium_Ttestall detect an event on COM0 and I can read data in &test.

Thanks in advance

1

There are 1 best solutions below

0
On BEST ANSWER

Nevermind,

We have solved the issue. The wire we were using was not made correctly. Sorry for disturbing.

Best Regards,