I've got this infrared device here (just little receiver node on a wire to a serial plug - on com1) and thought I'd have a play with it to see what I could do, but I'm gettin nothin from it and I've tried with 2 different TV remotes!

All I get is 2 of these comEventBreak errors when I open the port. If anyone is IrDA savy would you please fill me in on how they work and what they are supposed to be sending etc . According to MSDN and the description on VB it's just what the name says; "when the device sends a break". What is a break? What does it mean? I haven't got a clue!

From what I've been reading, some remotes and devices receive\send at different kHz, could this be my problem? I'm also sceptical if this thing is still working but I've no idea how to find out properly either, so haha.

Here's the code I've been testing with:
VB Code:
  1. Option Explicit
  2.  
  3. Private Sub Form_Load()
  4.   'number of comEventBreak received on portopen
  5.   ' 2400 - 2
  6.   ' 4800 - 2
  7.   ' 9600 - 1
  8.   ' 19200 - 1
  9.   ' 38400 - 1
  10.   ' 57600 - 1
  11.   ' 115200 - 1
  12.  
  13.   With MSComm1
  14.     .CommPort = 1
  15.     .Settings = "9600,n,8,1"
  16.    
  17.     'if changed from none to RTS, i sometimes get a comEvCTS on portopen
  18.     'i've even had blank data coming through with this as well
  19.     .Handshaking = comRTS
  20.     .RTSEnable = True
  21.    
  22.     .RThreshold = 1
  23.     .PortOpen = True
  24.   End With
  25. End Sub
  26.  
  27. Private Sub Form_Unload(Cancel As Integer)
  28.   MSComm1.PortOpen = False
  29. End Sub
  30.  
  31. Private Sub MSComm1_OnComm()
  32.  
  33.   List1.AddItem "oncomm! - " & MSComm1.CommEvent, 0
  34.  
  35.   Dim s As String * 1
  36.  
  37.   If MSComm1.CommEvent = comEvReceive Then
  38.     Do
  39.       s = MSComm1.Input
  40.       List1.AddItem "data - " & s, 0
  41.     Loop While MSComm1.InBufferCount
  42.   End If
  43. End Sub

Cheers.