Serial port - Rx problem

Presently we are working on a project in which we have used QNX 4.25.
We are using TDMA microwave communication link between Client and
Server with synchronous V.35 interface. For testing purpose, we have
connected both of our machines to ‘Async to Sync’ convertors and
RS-232 TO V.35 convertors and tried file transfer. For file transfer
we are using our proprietory program in which error detection is
taken into consideration.
Our major problem is that, the serial port of the Receive end machine
stops receiving data at any point of time.
The sender machine is able to send data that time, but not a single
character is received at receiving end.
It was also ensured with the help of loopback that, the data reaches
upto Receiver machine.

We tried following options but found same result.

  • Restarted the serial driver ( Dev.ser ) and program.
  • Increased size of raw i/o buffers
  • Instead of our program, we tried qcp.
  • Exchanged serial port of the same machine.
  • Exchanged machine and even the roles of Client and Server.
    But each time it was noticed that, the receive end machine gets
    blocked.
    The problem gets solved only when we restart the Receive end machine.
    Line properties set :
    Hardware / Software flow controls are disabled.
    Stop bits = 2, Parity = None, Baud rate = 64 Kbps.

What could be the reason ? Please help.

Regards,
Mrudula

Are you sure the problem isn’t with the ‘Async-to-Sync’ convertors? If you
have access to an oscilloscope, take a look at the RX signal at the
receiving serial port to see whether the data is, in fact, making it through
the communication link.

Regards,

Bert


Bert Menkveld
P.Eng.
B&E Technologies

“Mrudula” <mrudula_vartak@rediffmail-dot-com.no-spam.invalid> wrote in
message news:cua2cu$i5n$1@inn.qnx.com

Presently we are working on a project in which we have used QNX 4.25.
We are using TDMA microwave communication link between Client and
Server with synchronous V.35 interface. For testing purpose, we have
connected both of our machines to ‘Async to Sync’ convertors and
RS-232 TO V.35 convertors and tried file transfer. For file transfer
we are using our proprietory program in which error detection is
taken into consideration.
Our major problem is that, the serial port of the Receive end machine
stops receiving data at any point of time.
The sender machine is able to send data that time, but not a single
character is received at receiving end.
It was also ensured with the help of loopback that, the data reaches
upto Receiver machine.

We tried following options but found same result.

  • Restarted the serial driver ( Dev.ser ) and program.
  • Increased size of raw i/o buffers
  • Instead of our program, we tried qcp.
  • Exchanged serial port of the same machine.
  • Exchanged machine and even the roles of Client and Server.
    But each time it was noticed that, the receive end machine gets
    blocked.
    The problem gets solved only when we restart the Receive end machine.
    Line properties set :
    Hardware / Software flow controls are disabled.
    Stop bits = 2, Parity = None, Baud rate = 64 Kbps.

What could be the reason ? Please help.

Regards,
Mrudula

Bert Menkveld <bert@betech.biz> wrote:

Are you sure the problem isn’t with the ‘Async-to-Sync’ convertors? If you
have access to an oscilloscope, take a look at the RX signal at the
receiving serial port to see whether the data is, in fact, making it through
the communication link.

Or, if you can, put on of the little serial debug in-line thingies that
blinks various lights. Put one on the receive side, and see whether or
not the appropriate lights are blinking.

Probably cheaper than an oscilloscope – not as completely accurate though.

Or, to verify the software, you can test with a null-modem cable. If it
works fine machine to machine over the null-modem cable, that starts to
suggest the Sync to Async and back have a problem of some sort.

Now, it may be one of those problems where they do everything “almost
right” and we do everything “almost right”, and the two don’t come
out right.

Also, uarts can be cheap commodity hardware on a machine – sometimes they
aren’t quite standard. Again, they’re in the category of “almost right”.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

Could you post output of “traceinfo” command? Look for TX timeout entries.

You can also try following program. I use it on many new motherboards where
I see similiar symptoms as you (computer stops receiving data)


#include <stdio.h>

#include <stdlib.h>

#include <unistd.h>

#include <errno.h>

#include <conio.h>

// tento program by mal vediet rozchodit seriove porty na P4 doskach

// od Advantechu (ktore radi zamrznu)

int main(int argc, char *argv[])

{

int i, go = 1, base;

if(argc < 2){

printf(“Nezadany ziadny argument\n”);

return(-1);

}

while(go){

for( i = 1; i < argc; i++){

base = strtol(argv_, NULL, 0);

if(base && errno != EOK){

outp(base + 1, 0x00);

outp(base + 1, 0x0f);

}

}

sleep (1);

}

return(0);

}



-----------------------------------


Pavol Kycina


“Mrudula” <mrudula_vartak@rediffmail-dot-com.no-spam.invalid> wrote in
message news:cua2cu$i5n$1@inn.qnx.com…_

_Presently we are working on a project in which we have used QNX 4.25.
We are using TDMA microwave communication link between Client and
Server with synchronous V.35 interface. For testing purpose, we have
connected both of our machines to ‘Async to Sync’ convertors and
RS-232 TO V.35 convertors and tried file transfer. For file transfer
we are using our proprietory program in which error detection is
taken into consideration.
Our major problem is that, the serial port of the Receive end machine
stops receiving data at any point of time.
The sender machine is able to send data that time, but not a single
character is received at receiving end.
It was also ensured with the help of loopback that, the data reaches
upto Receiver machine.

We tried following options but found same result.

  • Restarted the serial driver ( Dev.ser ) and program. iu
  • Increased size of raw i/o buffers
  • Instead of our program, we tried qcp.
  • Exchanged serial port of the same machine.
  • Exchanged machine and even the roles of Client and Server.
    But each time it was noticed that, the receive end machine gets
    blocked.
    The problem gets solved only when we restart the Receive end machine.
    Line properties set :
    Hardware / Software flow controls are disabled.
    Stop bits = 2, Parity = None, Baud rate = 64 Kbps.

    What could be the reason ? Please help.

    Regards,
    Mrudula_

Really thankful to all of you !
We have checked loopback upto PC. It is confirmed that, the data
reaches upto machine.
When ser1 got blocked, I just connected the cable to ser2 and found
that ser2 is able to communicate well ( Tx and Rx both ).
I am wondering, why the problem gets solved only when PC is restarted
and not on restarting the driver ?
I will get back with the results of what Pavol has suggested.

Regards,
Mrudula

I know this sounds obvious, but did you check for flow control on the
inbound machine? Try setting -isflow -ihflow.

“Mrudula” <mrudula_vartak@rediffmail-dot-com.no-spam.invalid> wrote in
message news:cuctq0$oen$1@inn.qnx.com

Really thankful to all of you !
We have checked loopback upto PC. It is confirmed that, the data
reaches upto machine.
When ser1 got blocked, I just connected the cable to ser2 and found
that ser2 is able to communicate well ( Tx and Rx both ).
I am wondering, why the problem gets solved only when PC is restarted
and not on restarting the driver ?
I will get back with the results of what Pavol has suggested.

Regards,
Mrudula

How did you start the /bin/Dev.ser driver?
Did you enable RxTx FIFO by “-t8” flag? I think you have to reboot the box
because i8259A might have the pending IRQ stuck…

Tony.