1055 can't send raw data

Supporting Visual Studio on Windows
lightbulb
Phidgetsian
Posts: 5
Joined: Wed May 16, 2012 2:46 pm
Contact:

1055 can't send raw data

Postby lightbulb » Wed May 16, 2012 3:04 pm

Using the IR-full example program I can use the "Learn" portion of the program to learn IR Codes for a standard remote control, I can also Re-Transmit the codes without problems. I cannot however send the raw data using transmitRaw(). I need to do this as the remote I want to replicate will only work in the raw data mode.

I have tried many remote controls that work in the "Learn" mode so that I can rule out any other potential problem. Regardless of the remote control I use I cannot seen to get "transmitRaw" to work.

I click the checkbox for ShowRawData then press a button on the remote. I get the code, for example:
LONG
2650, 920, 400, 490, 400, 490, 460, 880, 450, 880,
900, 430, 460, 430, 450, 440, 460, 430, 450, 440,
890, 880, 910, 430, 450, 440, 450, 880, 460, 430,
450, 440, 450, 440, 900, 870, 460, 430, 900, 880,
460, 430, 450,

I then save this sequence in the code for a button event handler:

int[] data =
{
2650, 920, 400, 490, 400, 490, 460, 880, 450, 880,
900, 430, 460, 430, 450, 440, 460, 430, 450, 440,
890, 880, 910, 430, 450, 440, 450, 880, 460, 430,
450, 440, 450, 440, 900, 870, 460, 430, 900, 880,
460, 430, 450
};
ir.transmitRaw(data, 149877);

I can never get this to work. Am I doing something wrong, missing a key part? Please help.

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1055 can't send raw data

Postby Patrick » Wed May 16, 2012 3:39 pm

Hi,

Is this code the same every time you press the button, or does it change? What does it look like when you hold down the button?

-Patrick

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1055 can't send raw data

Postby Patrick » Wed May 16, 2012 3:40 pm

Also, try varying the carrier frequency from 30 kHz to 45 kHz to see if there is a 'sweet spot'.

-Patrick

lightbulb
Phidgetsian
Posts: 5
Joined: Wed May 16, 2012 2:46 pm
Contact:

Re: 1055 can't send raw data

Postby lightbulb » Tue May 22, 2012 5:51 am

Hi,

Sorry for late reply... I though I would receive an email when the post was answered.

I have tried adjusting the Carrier Frequency from 1000 - 100000, stepping up in 1000's. Nothing works.

What worries me is that I cannot get transmitRaw to work even with a remote control that can be learned. I have a remote that outputs this raw sequence:

9030, 4490, 530, 600, 520, 600, 520, 600, 520, 600,
520, 600, 520, 610, 520, 600, 520, 600, 520, 600,
530, 600, 520, 600, 520, 600, 530, 1710, 520, 610,
520, 600, 520, 600, 520, 1720, 530, 1720, 520, 600,
530, 590, 520, 610, 510, 610, 520, 600, 520, 600,
520, 600, 530, 600, 520, 1770, 480, 1710, 530, 1720,
520, 1720, 530, 1720, 520, 1720, 530

I've tried...

ir.transmitRaw(data, 108129);

and...

ir.transmitRaw(data, 0, data.Length, 108129, 38000, 50);

If I let the code be learned it works with the Re-Transmit button. I also set a breakpoint and wrote down all the information to create IRCode and IRCodeInfo objects manually...this also works:

IRCode irCode = new IRCode(new byte[]{0,8,192,63}, 32);

IRCodeInfo codeInfo = new IRCodeInfo(
IRCodeInfo.IREncoding.Space,
32,
new int[]{9006,4520},
new int[]{520,595},
new int[]{520,1742},
520,
108129,
new int[]{0,0,0,0},
1,
new byte[]{0,0,0,0},
IRCodeInfo.IRCodeLength.Constant,
38000,
50);
ir.transmit(irCode, codeInfo);

I feel that if I can't get transmit raw to work on a remote control that can be learned and does work when using IRCode and IRCodeInfo objects, then I have little chance of getting it to work on a remote control that must be transmitted with raw data.

Can you spot any obvious mistakes? It's a long-shot but could my device be faulty with regards to transmit raw?

Thanks again in advance for any help.

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1055 can't send raw data

Postby Patrick » Tue May 22, 2012 8:52 am

Make sure you don't hold the remote too close to the PhidgetIR when you capture the raw data - this can distort the code.

I'm not sure why you would be having this problem - we are able to re-transmit raw data here. It's hard to debug without a second PhidgetIR to see what the first is actually transmitting.

What is your host system? Are you opening the PhidgetIR directly, or over the webservice?

-Patrick

lightbulb
Phidgetsian
Posts: 5
Joined: Wed May 16, 2012 2:46 pm
Contact:

Re: 1055 can't send raw data

Postby lightbulb » Wed May 23, 2012 4:20 am

Thank you for the suggestions.

I attempted to do it again with the remote held further away from the device but it still did not work.

I am quite sure the data array has the correct information as the raw data for the remote control has two int values representing the header, 32 bits of data representing the code and a trail value. Looking at the learned values and comparing them to the raw data array I could see that the correct 0's and 1's were represented in raw data.

I then used the learn function to output the header, code data, and trail values and created the array manually with those exact values (without the slight variance in time values for the pulses and spaces), this also failed.

I have ordered another device so I can debug this more efficiently as you suggested.

My host system is Windows 7 64bit with Visual Studio 2010. I am opening the PhidgetsIR directly...actually I have just modified small parts of the IR-full_vs2008 program provided with the device to attempt to transmit the code.

Any other pointers you can suggest I try before the new device arrives would be appreciated. Thanks again for all your helpful suggestions.

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1055 can't send raw data

Postby Patrick » Wed May 23, 2012 9:08 am

This could be a 64-bit issue, I will try to recreate on a 64-bit machine.

Yes, this is definitely a 64-bit issue. I'll be able to fix this and issue a new library.

-Patrick

lightbulb
Phidgetsian
Posts: 5
Joined: Wed May 16, 2012 2:46 pm
Contact:

Re: 1055 can't send raw data

Postby lightbulb » Thu May 24, 2012 2:34 am

Hi Patrick,

That is great news! I can stop tearing my hair out now! Would you please post a message in this thread when the library is fixed?

Thank you again!

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1055 can't send raw data

Postby Patrick » Fri May 25, 2012 2:43 pm

Hi,

A fixed library is being released now - should be live in about an hour.

-Patrick

lightbulb
Phidgetsian
Posts: 5
Joined: Wed May 16, 2012 2:46 pm
Contact:

Re: 1055 can't send raw data

Postby lightbulb » Mon May 28, 2012 4:02 am

Hi Patrick,

I have downloaded the new library. It works great! Thank you so much for fixing the issue so quickly.

Steve


Return to “C#.NET”

Who is online

Users browsing this forum: No registered users and 2 guests