Using the IR port for serial communication
- From: rrryanc@xxxxxxxxx
- Date: 4 Apr 2006 21:20:25 -0700
Hi all,
I have an HP iPaq 2495 with Mobile 5.0. I'm trying to create a program
to send data to a Lego Mindstorm unit. Using a regediting program I
installed, I found the following several entries, from which I think
the communications port is COM2 or COM3
HKEY_LOCAL_MACHINE/Comm/Irsir1/Parms/Port = 2
HKEY_LOCAL_MACHINE/Drivers/Builtin/IRCOMM/Index = 3
HKEY_LOCAL_MACHINE/Drivers/Builtin/IrDA/Index = 2
Now thinking that IrDA is not the format I want, as I need to have
direct control over the emitted IR signal, I used COM3 in the following
code
<code>
dim serialtest as new system.io.ports.serialport("COM3")
serialtest.open()
serialtest.write(bytes, 0, 10) 'Writing a byte file of length 10
serialtest.close()
</code>
This gives me the following error triggered at the serialtest.write()
line:
IOException
at System.IO.Ports.SerialStream.WinIOError()
at System.IO.Ports.SerialStream.Write()
at System.IO.Ports.SerialPort.Write()
at DeviceApplication3.Form1.tester()
at DeviceApplication3.Button1_click()
....
It also produces no IR transmission. I also tried switching to COM2,
and while this gave me no errors, it also produced no IR transmission.
Thanks for your help,
Ryan
.
- Follow-Ups:
- Re: Using the IR port for serial communication
- From: Yaroslav Goncharov
- Re: Using the IR port for serial communication
- Prev by Date: Re: Frist Time Handheld Developer - Is it Hard to Code a Basic Barcode Scanner App?
- Next by Date: Re: resources.GetObject
- Previous by thread: Re: UnsupportedPlatforms
- Next by thread: Re: Using the IR port for serial communication
- Index(es):