VB and COM ports and mscomm.vbx and hung PCs 
Author Message
 VB and COM ports and mscomm.vbx and hung PCs

I'm trying to write a more or less straightforward program that will let me
move bytes between two PCs through their serial ports and a null modem cable.
I'm having problems - one PC tends to lock up *hard* when I run it - hard
enough that Windows won't respond to cntrl-alt-del and I have to use the
reset button.

I believe I have the cabling and com port settings right - I can run Terminal
on each PC, with the respecting com ports set to 19200,8,n,1 and hardware
flow control, and when I type things on one, the other echos it properly.

For the folk who know the MSComm vbx, I'm using:
DTREnable True
Handshaking RTS
NullDiscard True
RThreshold 1
RTSEnable True
Settings 19200,n,8,1
InBufferSize 1024
OutBufferSize 2048
and everything else 0 or boring except CommPort, which is properly set.

If I run Terminal on one PC and my app on the other, they can usually
talk.

If I run my apps on both, one usually hangs, apparently immediately on
doing the OpenPort or the send of the first string.

I've evidence that if I run Terminal on one or both and then exit and run
my apps, they sometimes work, so I assume Terminal is setting something that
I'm not, and it helps. But if I exit my app and restart it, it instantly
hangs again.

I've used this vbx without problem when talking to a modem - it is
only talking over the cable to another PC (running the same copy of
the vbx) that I get the hang.

The project already involves a DLL written in C, so if I have to
I can try doing the serial I/O in C. But I was hoping to avoid
polling for characters - the vbx offers a VB event when it is time
to read data.

What causes a hard Windows 3.1 hang when opening a port or writing a byte?




Sat, 18 Apr 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. QUESTION - Sending data out COM port (w/o using MSCOMM.VBX)

2. VB MSCOMM close port w/o hang-up

3. Why does MSComm hang PC on Open?

4. MSComm.VBX hangs computer? (Visual Basic 3.0, 4.0)

5. hanging up w/ mscomm.vbx?

6. MSCOMM.VBX Hanging UP

7. (MSCOMM.VBX) Hanging up the connection?

8. Finding COM Ports - Mouse dies when VB talks to its COM Port

9. VB3 Serial Port Control without MSCOMM.VBX

10. Access to a com-port of another PC

11. How use RS232 com port of the PC

12. How use RS232 com port of the PC

 

 
Powered by phpBB® Forum Software