Using .NET dll

The place where software developers meet

Moderator: marcus

Using .NET dll

Postby cheetah » Wed 22. Aug 2012, 15:53

I am using the .NET dll to send commands to up to 6 USB devices. How do I differentiate those devices in the available parameters. Specifically, I'm talking about this method.

public NETWORKSTATUS IRSend(string remote, string command, uint addressmask, byte ledSel, byte bus);

Please explain each of the parameters, the legal values, and how they are used. I understand the remote and command parameters. But the next 3 do not seem to work intuitively.

Also, I would like to run turn on some of the options for the irserver windows service running on windows 7. How do you do that? There is absolutely no documentation on how to edit the irserver.ini file. Adding parameters to the "start parameters" field of the windows service has no effect. So how is it done?
cheetah
 
Posts: 2
Joined: Wed 22. Aug 2012, 15:34

Re: Using .NET dll

Postby IRTrans » Wed 22. Aug 2012, 16:22

Hi,
regarding your questions:

IRSend Parameters:

addressmask: Not needed in your application. Only needed to address devices connected to the IRTrans serial bus (old). Set to "1".
ledSel: Selects the IR Output to use. 0 = Default, 1 = Internal, 2 = External, 3 = All
bus: Selects the Device to use when sending. That is the parameter you should use. 0 = First USB device, 1 = 2nd and so on

In general we do not recommend to use the irserver as a service as it is very difficult to monitor.

Anyways, the easiest way to edit the parameters:

- Stop the service
- Start "IRTransserver.exe" from the start menu. If there is no link in the Start menu (because of the service installation) please start from the IRTrans installation folder. On Windows 7 do a right-click -> Start as Administrator.
- The context menu "Startup Parameter" allows to edit all parameters using a comfortable GUI
- Click on "Save"
- Close IRTransserver.exe
- Restart the service

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: Using .NET dll

Postby cheetah » Wed 22. Aug 2012, 23:14

The addressmask set to "1" worked.

The next odd thing I see is that it appears that both USB transceivers connect via USB to my PC "see" the same commands being sent from the IRServer. What I mean is that when viewing the trace of the IRServer, I see the following displayed in the console window.

Send [1] sony - OK [d0001 - B:1 M:0x1 LED: External]

The associated method call is irTransServer.IRSend(setTopConfig.codeSetString, digitString, 1, 2, 1);

I would expect the transceiver on USB 1 to see the command but it appears that the transceiver on USB 2 also sees the same command because both show the same result on the TVs that they are controlling.

Is there some filter setting on the device itself that allows it to receive all commands? Otherwise, how is this possible.
cheetah
 
Posts: 2
Joined: Wed 22. Aug 2012, 15:34

Re: Using .NET dll

Postby IRTrans » Thu 23. Aug 2012, 00:19

From the log everything seems to be correct:

You use bus = 1 that means you address the 2nd IRTrans device. That is also shown in the log,
Please note that the BusIDs start with bus = 0. That means bus = 1 is the 2nd device.

We already have hundreds of customers using bus addressing - therefore I am sure that it works as it should.

I would suggest you have a look at the IRTrans device when sending the IR Code - only the IRTrans device you have addressed will blink red.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32


Return to APIs

Who is online

Users browsing this forum: No registered users and 8 guests

cron