I made a program that communicates with an external device using IRDA as a
UART port. (NS Basic's Serial command is used for access)
It worked well on IBM WorkPad30J(OS Ver3.1) but it doesn't on WorkPad
c505(OS Ver4.0). It doesn't even show an error.
In Ver4.0, can't the Serial command access to IR?
Here is my source code:
Sub Form1003_After() 'serial setting
Dim intError as Integer
intError = SerialOpen(0,9600)
If intError = 0 Then
gboolConnect = True
Field1029.Text = "IR Active"
Else
gboolConnect = false
Field1029.Text = "IR Deactive"
End If
Field1029.Redraw
intError = SerialSet("IR",1)
intError = SerialSet("BitsPerChar",8)
intError = SerialSet("handshake",0)
intError = SerialSet("Parity",3)
intError = SerialSet("Stopbits",1)
intError = SerialSet("Ctsauto",2)
intError = SerialSet("Rtsauto",2)
End Sub
Sub object1006() 'serial data send
Dim Data(9) as Integer
Dim intError as Integer
Dim strSend as String
Dim i as Integer
strSend = ""
' Select AUX data=02h(2)
Data(1) = 170
Data(2) = 140
Data(3) = 0
Data(4) = 1
Data(5) = 2
Data(6) = 0
Data(7) = 85
Data(8) = 13
Data(9) = 10
For i = 1 to 9
intError = SerialSend(chr(Data(i)),1)
Next
End Sub