Skip to main content
Topic: IR TOY2 does IRscope2 (IR Widget) (Read 50264 times) previous topic - next topic

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #45
[quote author="ian"]
I do have JTRs irwidget source somewhere, I believe. Will try to dig it out.[/quote]

I think it's there on the googlecode SVN repo, but I seem to have lost the link to it
Looking forward to meeting other hobbyists. PM me if you are in or around Orange, CA!

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #46
[quote author="KamalS"][quote author="ian"]
I do have JTRs irwidget source somewhere, I believe. Will try to dig it out.[/quote]

I think it's there on the googlecode SVN repo, but I seem to have lost the link to it[/quote]

It's likely behind the couch ;)

Is this perhaps it? http://code.google.com/p/dangerous-prot ... 873&r=1873

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #47
lol :) That looks like it.

I don't mind if people prefer we don't use their stuff, even if technically we could. Open source always has a community attached and you have to work with them if you adopt their code, so getting along and mutual consent is a must.
Got a question? Please ask in the forum for the fastest answers.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #48
Yep, there may be a reason he took down the code, I know from personal experience that sometimes things you planned don't happen because life throws you something from left field - we don't really know why he took it down, so I don't think people should be upset with him.  It's his code, so he can do what he pleases with it, that's my view. But in any case it is still up on the SVN and if he changed his mind and didn't want people to get it, presumably he would have deleted it from there or made it private, etc.? So I say if it's up and you want to use it, well go for it!

...maybe it just fell down the back of the couch and he didn't notice  ;)

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #49
[quote author="ian"]lol :) That looks like it.

I don't mind if people prefer we don't use their stuff, even if technically we could. Open source always has a community attached and you have to work with them if you adopt their code, so getting along and mutual consent is a must.[/quote]

Exactly Ian, I have been trying to make this very point in another thread about modifying IRScope where the original maintainer has his own reasons to not cooperate.

There are commercial solutions to the IRT that work out of the box and if using it, without tinkering with it was all we wanted to do, those would be a better choice. Hacking a project where the changes will never be merged upstream (which is what modifying IRScope would lead to) seems like wasted effort where there are other solutions around (adding the same functionality to IRT fimrware) that will not only contribute to IRToy but extend its inherent functionality.
Looking forward to meeting other hobbyists. PM me if you are in or around Orange, CA!

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #50
Hi, is anyone still have the USBIRToy_irW.hex file ? Please reupload. Thanks.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #51
[quote author="secany"]Hi, is anyone still have the USBIRToy_irW.hex file ?[/quote]
The link posted on the last page is still working for me.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #52
I am new here so apoligize for my poor detailed understanding of the following.

I am actually try to decode IR protocols from various remotes, specially to understand which codes are used on a remote of Telenet (Belgian provider) digibox in order to play them back e.g. from a PC.
As the goal is ultimately using th IRT Decode mode, I am playing with all modes to better understand the behaviour and richness of the IRT for the time being.


One one hand I test the IRT through its basic commands: codes sent (TX) and responses or data Received (RX).
So everything should work through a Terminal emulator. I use Hercules 3.2.6 and Realterm 2.0.0 70 and thats already very nice.

I understand this is not the most functional approach, but clearly the basic one.

Once for a certain mode I see results from this basic approach, I step further into applications as OLS, and IRSCOPE.
So I am now stranded at the IRScope2 hoping to use their protocol decoding expertise and share mine.

But I am stuck in connecting IRT to IRSCope.

I read that there has been a special firmware USBIRToy_irW.hex which successfully linked to IRScope. However it was not distributed in the IRT V2.2 package, therefore I assume this is not the preferred way to go. Also two firmwares to flash and re-flash is not ideal.
But I also read that the IRT firmware has a mode called IR Widget mode (ascii command 'P' or 'p') although that mode is not described in the actual firmware V2.2 documentation http://dangerousprototypes.com/docs/USB ... _protocols

Once in this forum there was a discussion point that switching from one application to another application on the same COM-connection would reset the IRT in its default Decode mode. This seems not to be the case. Indeed I tested the Raw IR mode (ascii command 'x') from Hercules. Closed the connection. Reopened the connection, and the IRT still was in its Raw IR mode.

Building on this I sent a 'p' through Hercules, closed the connection, and opened that same COM port with the IRScope. Unfortunately nothing happens. The IRScope does not see any input. Has this sometning to do with DTR or RTS ?

Has anybody ever successfully used the IRToy firmware (V2.2) in IR Widget mode?
Feedback greatly appreciated.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #53
[quote author="domi"]I am new here so apoligize for my poor detailed understanding of the following.

I am actually try to decode IR protocols from various remotes, specially to understand which codes are used on a remote of Telenet (Belgian provider) digibox in order to play them back e.g. from a PC.
As the goal is ultimately using th IRT Decode mode, I am playing with all modes to better understand the behaviour and richness of the IRT for the time being.


One one hand I test the IRT through its basic commands: codes sent (TX) and responses or data Received (RX).
So everything should work through a Terminal emulator. I use Hercules 3.2.6 and Realterm 2.0.0 70 and thats already very nice.

I understand this is not the most functional approach, but clearly the basic one.

Once for a certain mode I see results from this basic approach, I step further into applications as OLS, and IRSCOPE.
So I am now stranded at the IRScope2 hoping to use their protocol decoding expertise and share mine.

But I am stuck in connecting IRT to IRSCope.

I read that there has been a special firmware USBIRToy_irW.hex which successfully linked to IRScope. However it was not distributed in the IRT V2.2 package, therefore I assume this is not the preferred way to go. Also two firmwares to flash and re-flash is not ideal.
But I also read that the IRT firmware has a mode called IR Widget mode (ascii command 'P' or 'p') although that mode is not described in the actual firmware V2.2 documentation http://dangerousprototypes.com/docs/USB ... _protocols

Once in this forum there was a discussion point that switching from one application to another application on the same COM-connection would reset the IRT in its default Decode mode. This seems not to be the case. Indeed I tested the Raw IR mode (ascii command 'x') from Hercules. Closed the connection. Reopened the connection, and the IRT still was in its Raw IR mode.

Building on this I sent a 'p' through Hercules, closed the connection, and opened that same COM port with the IRScope. Unfortunately nothing happens. The IRScope does not see any input. Has this sometning to do with DTR or RTS ?

Has anybody ever successfully used the IRToy firmware (V2.2) in IR Widget mode?
Feedback greatly appreciated.[/quote]

I had modified the IRScope software to automatically send the 'p' to switch into widget mode when it opens the connection.  That part worked ok, but when capturing an actual IR transmission, the FW would send a few dozen bytes and then wedge itself such that it no longer responded to anything aside from disconnecting the IRToy from the USB cable and reconnecting it.  I don't know what was wrong, but I wasn't keen on debugging it and no one else seemed interested at all.  So, I dropped it.  I was hoping to provide an alternative source for working widgets to the JP1 community since the primary widget supplier was somewhat unhappy.  Running the alternative "widget only" FW would work fine for the JP1 folks, but since the IRToy is not delivered with that FW or even the FW that included the 'p' switch to widget mode, it was a dealbreaker for JP1 folks that were not going to be able to fiddle with updating the FW for the IRToy. That is all not to mention, being discouraged here not to mess with the admittedly open source code for IRScope even if it was going to be backward compatible.

Also, yes the widget FW absolutely relies on IRscope sequencing of DTR and RTS to know which widget mode to use, since there are 2 different modes.  It has been many months since I was playing with this.  So, I don't remember the details, but it is not so hard to find in the IRScope source code.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #54
Thanks Qwlciguk.

Maybe another question. Where can I find the contents of the output in the different operation modes.

1- I imagine in Decode mode, the decoded value. But for this you already have to know the parameters needed for (Win)LIRC. For the time beeing it's too early for me as I don't know the protocol parameters. I also think, reversely,  the PC can send remote codes which are sent in IR by the IRT.

2- SUMP mode. After having sent 0x01 followed by a remote code nothing happens with hercules  (which I use to understand the data exchange). However with the OLS I get a beatiful wave form. What do I miss here?  This mode is only input to the PC.

3- Sampling mode(S). In this mode I can capture data in Hercules. I presume that I get a series of 0 and 1's of the waveform samples at 10 kHz. This mode is only input to the PC.

4- IRIO Raw mode (X). Controlled by the setup parameter is a more general sampling mode, but also bidirectional.

5- USB to serial (U). I have still not figured out how to use that mode. Also here nothing happens in Hercules after I dend U and get U01 back. How can we see its basic working principles through Hercules?

6- IRWidget mode(P), with two flavors: Frequency and Time. Here different viewpoints seem causing trouble yet.

What are the fundamental differences between the protocols of these modes? Which of all these modes is the most versatile to analyse IR codes ?

All this will take me a lot of time and therefore taking a good start will result in time saving later on.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #55
[quote author="domi"]Thanks Qwlciguk.

Maybe another question. Where can I find the contents of the output in the different operation modes.

6- IRWidget mode(P), with two flavors: Frequency and Time. Here different viewpoints seem causing trouble yet.

What are the fundamental differences between the protocols of these modes? Which of all these modes is the most versatile to analyse IR codes ?

All this will take me a lot of time and therefore taking a good start will result in time saving later on.[/quote]

I don't know much about any of the modes except the frequency protocol of the widget mode.  That, is very simple.  Once you enter frequency sub-mode of widget mode via the proper DTR/RTS sequencing, nothing will be output immediately.  It will wait until an infrared pulse is detected and accumulate the count of pulses for 100 usec.  At the end of 100 usec, it will send a single byte containing the number of pulses detected.  A new 100 usec period will then start and count the number of pulses detected and at the end of 100 usec, send the count for that period.  This will be repeated until the host computer closes the port.  It is the responsibility of the host computer to take the stream of bytes with the pulse counts and reconstruct the original signal and do the protocol analysis via decodeir.dll  The "time" mode of IR Widget is generally deprecated, as it was found to not be sufficiently accurate for the detailed analysis needed by the JP1 community.  Pretty much anything you can do with time mode, you can do better with frequency mode.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #56
The firmware, as shipped with the IRT and I used until now, was V212. I had not yet realized it was an older one.
Now I updated the firmware to V222 which gives better results.
Indeed e.g. IRIO Raw mode has disappeared, but Widget mode has appeared, and I got data using that widget mode:

Set DTR and RTS, then send 'p'.

The data I get back is about 1500 bytes, which however I could not get it in IRScope yet.
Sample and SUMP modes seem also to work OK.

I investigate further.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #57
[quote author="domi"]The firmware, as shipped with the IRT and I used until now, was V212. I had not yet realized it was an older one.
Now I updated the firmware to V222 which gives better results.
Indeed e.g. IRIO Raw mode has disappeared, but Widget mode has appeared, and I got data using that widget mode:

Set DTR and RTS, then send 'p'.

The data I get back is about 1500 bytes, which however I could not get it in IRScope yet.
Sample and SUMP modes seem also to work OK.

I investigate further.[/quote]

The data you get back from a real widget or the IRToy running the widget only firmware, will not end.  It will continue on forever until you close the port.  The fact that you only got 1500 bytes back is consistent with what I saw.  That is, it works for a short time and then just quits when it should continue sending continuously until you close the port.

As for getting the data that you did receive into IRScope, normally IRScope software takes the raw data stream received directly from the port and processes into a different format that is then saved to a .ict format file which does not even remotely resemble the captured data stream.  It is just a text file something like this:

Code: [Select]
irscope 0
carrier_frequency 36060
sample_count 256
+2639,96
-892
+443,16
-446
+443,16
-447
+443,16
-891
+443,16
-892
+1332,48
-892
+443,16
-446
+443,16
-447
+443,16
-419
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+888,32
-446
+443,16
-447
+443,16
-419
+443,16
-891
+888,32
-446
+444,16
-446
+443,16
-891
+888,32
-892
+443,16
-446
+443,16
-447
+443,16
-446
+861,32
-891
+888,32
-891
+443,16
-447
+443,16
-446
+443,16
-69363
+2667,96
-891
+444,16
-446
+443,16
-447
+443,16
-891
+443,16
-891
+1305,48
-892
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+415,16
-447
+888,32
-446
+443,16
-447
+443,16
-446
+444,16
-891
+888,32
-446
+443,16
-447
+443,16
-891
+888,32
-864
+443,16
-446
+443,16
-447
+443,16
-446
+888,32
-892
+888,32
-891
+443,16
-446
+444,16
-446
+443,16
-69363
+2667,96
-891
+443,16
-447
+443,16
-419
+443,16
-891
+443,16
-891
+1333,48
-891
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-419
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+888,32
-446
+443,16
-447
+443,16
-446
+443,16
-892
+888,32
-418
+443,16
-447
+443,16
-891
+888,32
-891
+444,16
-446
+443,16
-447
+443,16
-446
+888,32
-891
+888,32
-864
+443,16
-446
+444,16
-446
+443,16
-69363
+2667,96
-891
+443,16
-447
+443,16
-446
+444,16
-891
+443,16
-891
+1333,48
-891
+443,16
-419
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-446
+444,16
-446
+443,16
-447
+443,16
-446
+443,16
-447
+443,16
-446
+888,32
-447
+415,16
-447
+443,16
-446
+443,16
-892
+888,32
-446
+443,16
-447
+443,16
-891
+888,32
-891
+443,16
-447
+443,16
-419
+443,16
-446
+888,32
-891
+888,32
-892
+443,16
-446
+443,16
-447
+443,16
-47928

One of the trickiest things that IRScope software does in processing the data stream from the widget is to determine the pulse frequency.  Once it has that (assumes a constant frequency), it calculates the burst on/off times and saves the on times with pulse count for "on" bursts in the .ict file along with the "off" times on alternating lines in the .ict file.

So, you would need to replicate what the IRScope software does in creating the .ict file, in order to be able to import the data into IRScope.  If I remember correctly, you can also import Pronto format data and the JP1 learned format data via pasting into the import window in IRScope.  Both formats are documented, Pronto quite a bit better than JP1 learned format.  I am the author of one document describing the JP1 IR format.  I'll hunt up a link to it if you want to pursue this.

In any case, this is all for naught, as the integrated FW containing the widget mode is broken.  The standalone widget only FW for the IRToy works perfectly, but it's very inconvenient to have to reflash back and forth between the FWs just because you want to use the IRToy as a widget and all the other IRToy modes.  I considered just buying another IRToy so that I could have one IRToy for widget mode and another for everything else, but I already have built my own hardware based widget and don't have any need for another one.  So, my IRToy stays running IRToy standard FW.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #58
I am coming back with some results.

I wrote my own program (I called it IRToyBoy) which shows the waveform in the 3 modes of the V2.2 Firmware of the IRT.
All tests were the reaction of the IRT on the same remote code sent by my IRremote commander.
The pictures are captures of my program plot of the waveform.

The Sampling mode is clean. I measured  a total code time of 23.13 ms.
[attachment=4]

The SUMP mode also shows very nice. Measures time between first pulse raising edge until last pulse falling edge is now 23.73 ms.
[attachment=3]

This is very possible as for Sampling mode I rely on the theoretical 21.33 µs count interval.

But I do not understand the output of the Widget Mode. I plot the value of each byte received. The step on the x-axis is assumed 100  µs.
First, sometimes I receive about 5600 bytes before transmission stops, sometimes only about 1500.  That behaviour already is strange.
Secondly 5600*100µs is much longer that the 22µs of one command. What is the IRT doing while nothing is being sent?
Following picture is of the same time scale of the two previous ones. I do not see any relation.

[attachment=2]

Here the value of the 25 first bytes received.
[attachment=0]

And finally, this last picture shows the full 5600 samples,  of which picture 3 represents the beginning of in more detail.
[attachment=1]

Is the Widget mode totally erroneous, of do I miss the basics thereof?
Maybe I have to compare with the firmware USBIRToy_irW.hex . Unfortunately I did not found that firmware yet.

Re: IR TOY2 does IRscope2 (IR Widget)

Reply #59
To accentuate the strange output I derived pulses from the wave. These are shown in red in the following picture.
[attachment=0]
There were 5705 data bytes in total.
On top of the pulses stays the width of the pulse.

The mark widths increases regularely : 31,33,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,101,101,... to stay at 101.
The space of the pulse stays at 26.

This seems more test output of the IRToy rather than an encoded form or an IR command.
This time I used V223-test, but V222 is the same in this respect.

Can somebody give a clue ?