USB IRToy V2 (fw v22 and v24) Not Working Properly

USB infrared remote control receiver/transmitter. Get one for $20, including worldwide shipping.

USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Synper311 » Mon May 09, 2016 9:05 pm

Hey,

I'm finally getting into using my IRToy to capture/repeat some signals. I've run everything below on both firmwares v22 and v24, and under Windows (10 x64 pro) and Raspbian Linux (4.4.9, armhf). Behavior is exactly the same in both places.

I'm using the pyirtoy Python3 library to capture and repeat infrared signals. This goes perfectly fine provided I don't write out the captured signal to a file. If I repeat the signal from memory, the IRToy will play back the signal just fine.

If I instead run my other python script which just plays the file from a stored file, the IRToy will error out and crash the script.

I've attached the log here:
http://pastebin.com/N9E0yURs

Can anyone help me debug this? I can't understand what is happening to make it error when reading a file, but it has no problems transmitting a code from memory.
User avatar
Synper311
Newbie
Newbie
 
Posts: 8
Joined: Mon Mar 16, 2015 1:29 am

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Synper311 » Wed May 11, 2016 1:19 am

Anyone?

I could really use some help with this, but I'm beginning to suspect there is a firmware issue with this device.
User avatar
Synper311
Newbie
Newbie
 
Posts: 8
Joined: Mon Mar 16, 2015 1:29 am

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Synper311 » Fri May 13, 2016 3:34 pm

I've been in contact with the developer of the pyirtoy library (crleblanc) and he says that it is almost certainly bad firmware.

Can anyone assist me, or can anyone recommend a suitable replacement that isn't so poorly made?
User avatar
Synper311
Newbie
Newbie
 
Posts: 8
Joined: Mon Mar 16, 2015 1:29 am

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Barf » Sat May 14, 2016 4:50 am

If I understand you correctly, you have not (successfully) used the IrToy with any application; you try it with the pyirtoy library, and that does not work. And pyirtoy says that the "other guy" is to blame...

I would suggest that you try (using FW 22!) IrScrutinizer and/or some other alternative, to see if that works

can anyone recommend a suitable replacement that isn't so poorly made?

This is my "toy".
Barf
Jr. Member
Jr. Member
 
Posts: 64
Joined: Mon Jul 07, 2014 3:12 pm

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Simpkins » Sat May 14, 2016 12:02 pm

Agree with Bart. I'm using the irtoy with other software and it plays from files ok. Not that there is anything different between playing from a file or from memory as for as the irtoy knows.
Simpkins
Newbie
Newbie
 
Posts: 25
Joined: Mon Jul 21, 2014 12:23 pm

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Synper311 » Sat May 14, 2016 12:33 pm

Barf wrote:If I understand you correctly, you have not (successfully) used the IrToy with any application; you try it with the pyirtoy library, and that does not work. And pyirtoy says that the "other guy" is to blame...
I would suggest that you try (using FW 22!) IrScrutinizer and/or some other alternative, to see if that works
can anyone recommend a suitable replacement that isn't so poorly made?

This is my "toy".

No, I've used it semi-successfully in the past with the Play/Rec demo program, but I never figured out how to get that ported to armhf to run on my Raspberry Pi, so I abandoned that line of development a few years ago. I just recently picked this back up with Python.

I got around the problem causing my toy to not send IR codes from file and only from memory.

Your device looks really well made. How stable is it? Does it randomly hang up and require being plugged/unplugged like the USB IRToy does?

Simpkins wrote:Agree with Bart. I'm using the irtoy with other software and it plays from files ok. Not that there is anything different between playing from a file or from memory as for as the irtoy knows.

No, there isn't. I had made a stupid mistake in my code. Now I'm fighting to get it to not randomly hang up after sending/receiving a number of codes in a row.

Supposedly the v24 firmware had fixed an overrun/timing issue that would lead to this instability, but it still hangs up on my rPi after a while of usage.

Are there best practices to avoid this condition? Keep the port open the entire job? Open the port to send and immediately close it after send?

Unfortunately, I can't seem to find a programmatic way to reset the device/port when it hangs up. Even rebooting doesn't always get it out of the "yellow light" state.
User avatar
Synper311
Newbie
Newbie
 
Posts: 8
Joined: Mon Mar 16, 2015 1:29 am

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Barf » Mon May 16, 2016 2:38 pm

How stable is it? Does it randomly hang up and require being plugged/unplugged like the USB IRToy does?

The short version: it is stable. It makes sending and receiving an atomic command; You just send a "send" command over the "serial" line (with parameters), and the hardware sends it. This is in contrast to the IrToy which needs to be fed with data every few milliseconds. Analogous with receiving.

BTW, using IrScrutinizer, the IrToy is also very stable and reliable.

Keep the port open the entire job? Open the port to send and immediately close it after send?

In IrScrutinizer, I keep the port open all of the time.
Barf
Jr. Member
Jr. Member
 
Posts: 64
Joined: Mon Jul 07, 2014 3:12 pm

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Synper311 » Mon May 16, 2016 2:46 pm

Barf wrote:The short version: it is stable. It makes sending and receiving an atomic command; You just send a "send" command over the "serial" line (with parameters), and the hardware sends it. This is in contrast to the IrToy which needs to be fed with data every few milliseconds. Analogous with receiving.
BTW, using IrScrutinizer, the IrToy is also very stable and reliable.

That sounds interesting and promising. Is there any reason this wouldn't work with the rPi that you can think of? I don't know as if there is a python library currently to work with your tool, which could be problematic for me...
Barf wrote:In IrScrutinizer, I keep the port open all of the time.

Okay, perhaps that is where I am going wrong. I open and close the port between "jobs", which run at 15m intervals. I think it also might have to do with a Linux Kernel setting for power management on the USB-bus, because my Wi-Fi adapter soemtimes will be put to sleep and not recover.

Thanks for the help and info so far!
User avatar
Synper311
Newbie
Newbie
 
Posts: 8
Joined: Mon Mar 16, 2015 1:29 am

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Barf » Tue May 17, 2016 2:56 pm

Is there any reason this wouldn't work with the rPi that you can think of? I don't know as if there is a python library currently to work with your tool, which could be problematic for me...

Unfortunately I do not know the possibilities for accessing the "serial usb" ports in Python, but it is obviously done in the other library, so you can "steal" from that. Again, with my firmware, you write lnes and real lines to the port (typically /dev/ttyUSB0), with no timing requirements, so that is a much easier task than to feed an IrToy. Writing a Python client really cannot be a very large challenge.

It is possibly more appropriate to one an issue here?
Barf
Jr. Member
Jr. Member
 
Posts: 64
Joined: Mon Jul 07, 2014 3:12 pm

Re: USB IRToy V2 (fw v22 and v24) Not Working Properly

Postby Simpkins » Thu May 19, 2016 3:12 am

Again I have to agree with Bart that it is best to keep the com port open during sessions but I have to add that you must close it before you quit you host app and you must also reset the irtoy from sample mode before you close the comport. The best way to reset the irtoy is to send it a string of 0xFF, 0xFF, 0xFF 0xFF, 0xFF, 0x00. This will work for every predicable, if unlikely case and for all the irtoy firmware (including mine.)

The problem of the irtoy not responding in the transmit mode is really a problem with the irtoy and the host not working together. If you give the irtoy what it wants when it wants it and nothing else then the transmit mode pretty much works well. At least from everything I have seen and I have send mind a lot of codes without trouble.

Atomic mode firmware for the irtoy would be nice especially if it turns out the rPi is not able to send and receive fast enough.
Simpkins
Newbie
Newbie
 
Posts: 25
Joined: Mon Jul 21, 2014 12:23 pm


Return to USB Infrared Toy