Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello everyone, this is my first post so if something is wrong with it be gentle!

I'm really new to the vb programming thing.

 

I am trying to build a program to control my home av system. The GUI is the easy part. I purchased a IR xmt/rcv 'er by smarthome I have been reading everything out there on rs232 and mscomm (not used with .net ) and can't get this thing to work below is what I have to work with from smarthome can someone help me translate it into something I can apply to my program.

 

 

This is what they sent me.

>>>>>>>>>>>>>>>>>>>>>

 

 

This instruction set is for users with a Smarthome PC to IRLinc model 1623PC. This document will enable power users to create their own programs using the IRLinc. It uses an IR blaster microchip that is an excellent learner of IR commands. This document will explain the protocol used to communicate with the chip.

 

IRLinc basically has two commands, send and receive. It can send a predefined IR code as listed in the attached text files, or it can send learned codes. In order to send, the chip must be �woken up.� The way this is done is by enabling the RTSEnable(In VB, mscomm, Allows a request to send signal to be sent) and then waiting for 20ms for the chip to prepare the next set of instructions. This chip must be woken up for every command sent. If a continuous command needs to be sent (volume up) where as long as the key is pressed a command triggers, the RTS can stay true for the entire sequence of commands.

 

Communication Protocol: 19200,8N1

 

 

How to wake up the chip to send:

 

Mscomm1.RTSEnable = True

Sleep (20)

Mscomm1.OutBufferCount = 0

�Sending Procedure goes here

Sleep (20)

Mscomm1.RTSEnable = False

 

Sending Protocol:

 

The format for sending to the blaster is as follows:

StringLength, StringFunction, StringType, StringKey, StringFlag

 

StringLength = �05�; length of string to send

StringFunction = �01�; Function code to send

StringType= 4 digit device type from enclosed .txt files

StringKey= 2 digit code to send the operation (Hex code only , see enclosed table)

StringFlag= �00� -> static.

 

Here is a copy of our sending function:

 

Public Sub SendCode(ByVal strOut As String)

Dim i As Long

Dim newline(200) As String, outline(200) As String

With frmIRLinc.MSComm

.RTSEnable = True

Sleep (20)

.OutBufferCount = 0

For i = 1 To (Len(strOut) / 2)

.Output = Chr(outline(i)) �outline is an array storing each byte in strOut, so we can �send one byte at a time

Next

Sleep (20)

.RTSEnable = False

End Sub

  • 5 months later...
Posted

IRLinc

 

It would appear that you at least managed to get some documentation from Smarthome on the IRLinc. They essentially told me to take a hike, that no such information exists, which is obviously not true, since you have it. Besides the code snippet you posted, did they send you the IR codes in a text file that is mentioned? Any further info would greatly appreciated.

 

Did you make any further progress figuring out programming for the IRLinc?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...