IrDA with Wizcom's Quick Link Pen

B

bt

Has anyone been able to connect and transfer notes using the IrDa with
the QuickLink Pen? I've used the following code, but it doesn't work:

Public Function openConnection() As String
Dim irdaDevices() As System.Net.Sockets.IrDADeviceInfo
irdaDevices = irdaClient.DiscoverDevices(10)
If irdaDevices.Length > 0 Then
''get endpoint and connect to IrDA device
Try
Dim endP As New
System.Net.IrDAEndPoint(irdaDevices(0).DeviceID(), "IrDA:IrCOMM")
irdaClient.Connect(endP)
Catch e As Exception
MessageBox.Show(e.Message.ToString & " thrown in
openConnection")
End Try
irStream = irdaClient.GetStream

Return irdaDevices(0).DeviceName().ToString()
Else
Return "No IrDA Devices Found"
End If
End Function
 
B

bt

Some additional info:

Working on VS2003 Ent, VB.net

I have done some additional digging and have at least been able to
discover the QuickLink Pen Device. I am not able to retrieve data
back from it though. The program throws an exception when it get's to
System.Net.IrDAEndPoint(irdaDevices(0).DeviceID(), "IrDA:IrCOMM").
The message is "The requested address is not valid in its context".

Any ideas?




Public Function FindDevices() As String
Dim irClient As New System.Net.Sockets.IrDAClient
Dim irdaDevices() As System.Net.Sockets.IrDADeviceInfo
Dim devicelist As String

irdaDevices = irClient.DiscoverDevices(10)

If irdaDevices.Length = 0 Then
devicelist = "No Devices Found"
Else
Try
devicelist = irdaDevices(0).DeviceName.ToString()
Catch e As Exception
MessageBox.Show(e.Message.ToString & " thrown in
FindDevices")
End Try
End If

If devicelist.StartsWith("QuickLink") Then
' Read the date from the pen
Try
Dim irdaClient As New System.Net.Sockets.IrDAClient
Dim endP As New
System.Net.IrDAEndPoint(irdaDevices(0).DeviceID(), "IrDA:IrCOMM")
Dim irStream As Stream
irdaClient.Connect(endP)

Catch e As Exception
MessageBox.Show(e.Message.ToString & " thrown in
FindDevices - Read")
End Try
Else
Return devicelist
End If
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top