C# API and ledSel

The place where software developers meet

Moderator: marcus

C# API and ledSel

Postby kburdack » Wed 9. Jul 2008, 05:18

Hi, I am calling this function:

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

Values of 1 and 3 seem to be the internal led. What is the correct way to specify a specific led only?

I test it using only the IRTrans Client UI, and selecting individual leds works, so the problem seems isolated to the C# API.
kburdack
 
Posts: 4
Joined: Wed 9. Jul 2008, 05:14

Re: C# API and ledSel

Postby IRTrans » Wed 9. Jul 2008, 15:36

Hi,
the ledSel parameter works as follows:

0: Default (as defined in device settings)
1: Internal LEDs
2: All External LEDs
3: All LEDs
4: External LED 1
5: External LED 2
6: External LED 3
7: External LED 4
8: External LED 5
9: External LED 6
10: External LED 7
11: External LED 8

This parameter is described in the IRTrans LAN Controller Manual.

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

Re: C# API and ledSel

Postby kburdack » Mon 4. Aug 2008, 07:59

Hi, I just had a chance to look at this:

Just to be sure, im calling:
IRTransServer.IRSend
From the C# .net libs.

I experimented again with the internal, external LED1 and external LED2 output:
These values do nothing:

4, 8, 12

These send a signal:

5, Internal
6, All Ext.
7, Both.
9, Internal.
10, All Ext.
11 Both.

So naiively looking it appears as though ledSel = ledSel & 3

Looking over the C api documentation:
NETWORKSTATUS *SendRemoteCommand
NETWORKSTATUS *SendRemoteCommandEx

There is a big difference in the usage of LEDSel that would suggest the C# api is calling SendRemoteCommand and not SendRemoteCommandEx
Is this true?
kburdack
 
Posts: 4
Joined: Wed 9. Jul 2008, 05:14

Re: C# API and ledSel

Postby IRTrans » Mon 4. Aug 2008, 09:15

Hi,
we will check that and let you know.

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

Re: C# API and ledSel

Postby IRTrans » Mon 4. Aug 2008, 09:30

Hi,
I just had a look at the sourcecode of the C# lib. The code looks fine, however I will grab myself a LAN Controller to check that.

SendRemoteCommand and SendRemoteCommandEX of the C++ DLL are totally different calls that are only used by that lib.
The .NET DLL is directly generating a TCP command for the irserver.

What IRTrans device are you using ?

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

Re: C# API and ledSel

Postby IRTrans » Mon 4. Aug 2008, 10:17

Hi,
I just tried that here - on my system it works.

Which version of irserver and .NET DLL are you using ?
Which IRTrans device are you using ?
Are you sure you are using the correct DLL ?

Please try to start the server with the option "-loglevel 4". That will give you a log of the used send parameters.

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

Re: C# API and ledSel

Postby kburdack » Tue 5. Aug 2008, 02:06

Versions:

IR Server ver E5.09.07
IRTrans.NET.dll ver: 2.7.2.0

Device:
IR Trans LAN Controller XL V1.2

Log:

C:\Program Files\IRTrans>IRServer.exe -loglevel 4 10.25.51.244
Name : IRTrans LAN
Version: E5.09.07
FW SNo : 32482
Capab : Power On; Dual Transmitter Drivers; IR Database;
FW Cap : -1357349033
USB SNo: 00-50-c2-52-78-4f
Node : 10.25.51.244

IRServer Version 5.10.01
[ 0]: IRTrans LAN: IR VER: E5.09.07 ETH VER: L1.06.22 SN: 32482
MAC:00-50-c2-52-78-4f IP Addr: 10.25.51.244
Remote ccf compiled: 20 Timings - 20 Commands
Remote dbox2 compiled: 1 Timings - 26 Commands
Remote denon-dvd compiled: 2 Timings - 52 Commands
Remote dream compiled: 0 Timings - 36 Commands
Remote irtrans compiled: 1 Timings - 33 Commands
Remote mce-keyboard compiled: 1 Timings - 78 Commands
Remote mce-mouse compiled: 1 Timings - 1 Commands
Remote mediacenter compiled: 1 Timings - 49 Commands
Remote pace compiled: 2 Timings - 38 Commands
Remote premiere compiled: 0 Timings - 36 Commands
Remote sky-digital compiled: 1 Timings - 31 Commands
Remote xbox360 compiled: 13 Timings - 12 Commands
Duplicate Commands for ccf.1: ccf.2 ccf.3 ccf.4
Duplicate Commands for ccf.2: ccf.3 ccf.4
Duplicate Commands for ccf.3: ccf.4
Duplicate Commands for pace.0: pace.0-
Total: 12 Remotes - 43 Timings - 412 Commands - 0 Calib. Commands
19 CCF Data - 0 CCF RAW - 0 CCF Error
IRTRANS TCP/IP Socket connection request
IRTRANS TCP/IP Client 1 accepted from 127.0.0.1

************ ledSel 4:

Netcommand: 1 [1]
Send xbox360-power [0 - B:0 M:0x0 L:0 Ext L: 0]

************ ledSel 5:

Netcommand: 1 [1]
Send xbox360-power [20000 - B:0 M:0x0 L:1 Ext L: 0]


************ ledSel 6:

Netcommand: 1 [1]
Send xbox360-power [40000 - B:0 M:0x0 L:2 Ext L: 0]


******
Finally here is the call I make in C#:

Server.IRSend("xbox360", "power", 0, led);
kburdack
 
Posts: 4
Joined: Wed 9. Jul 2008, 05:14

Re: C# API and ledSel

Postby IRTrans » Tue 5. Aug 2008, 12:58

Hi,
looks like you are using a very, very old version of the IRTrans .NET DLL - the version you are using is more than 2 years old.

Please try the attached version - that is the one I used for testing.

IRTrans.
Attachments
IRTrans.NET.zip
(8.43 KiB) Downloaded 2581 times
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: C# API and ledSel

Postby kburdack » Wed 6. Aug 2008, 03:06

Thanks, that fixed the problem of course :)

Perhaps this dll should be downloadable from this web site. Indeed I went hunting for a download of it but couldnt find one, so instead looked at where the driver was installed, and found the dll I was using from here:

C:\Program Files\IRTrans\APIs\.NET DLL

This is the current install of the driver, so it would be great if you could update the dll in the install package.

Apart from this one issue, using this device has been very easy, and is a great bit of hardware. And I really appreciate the fast support response time.

Regards,
Karl Burdack
2k Games Australia
kburdack
 
Posts: 4
Joined: Wed 9. Jul 2008, 05:14

Re: C# API and ledSel

Postby IRTrans » Wed 6. Aug 2008, 09:27

Hi Karl,
the DLL should be part of the installer (setup.exe) that can be downloaded from the internet.

If you select the APIs when installing the SW it should be installed.

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 49 guests