Hi, I seem to have a similar problem with my raspberry pi. Want to try to test this new firmware.
I once managed to update the firmware but it failes now. Can use some help.
Steps i did: * downloaded "USBIRToy.package.v22.zip" and unpacked it * downloaded this alternative firmware "USBIRToyv24.hex" en copied it to the "firmware" folder * created "bat" file "update-USBIRToy.v24.bat", modified it to use "USBIRToyv24.hex"
* wired PGC and PGD * plugged it in, orange light is burning * In the device manager, under "human interface devices" i get a "usb input device" with a exclamation mark (This device cannot start. (Code 10))
* start "cmd" with admin rights * Enter Com Port => pressing enter
Results below:
C:TEMPbin>update-USBIRToy.v24.bat Enter Com Port Number Could not open com port. Once the device has entered boot loader mode Press any key to continue . . . U2IO flash erasing: FAILED. Device is not found. Operation aborted. Press any key to continue . . .
In my other thread i have problems with the irtoy. I also found a Zotac IR Receiver. It seems this one likes to behave like a keyboard. I found two sites with a udev rule. Tried both. It does not seem to work for me.
[ 54.859074] input: PHILIPS MCE USB IR Receiver- Spinel plus as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:0471:20CC.0001/input/input0 [ 54.912086] hid-generic 0003:0471:20CC.0001: input,hiddev0,hidraw0: USB HID v1.00 Keyboard [PHILIPS MCE USB IR Receiver- Spinel plus] on usb-3f980000.usb-1.5/input0
I Assume this whole "hid-generic" line should dissapear? What will be the device name?
Another solution would be a working alternative. Anyone ideas? I have a couple (simple) requirements: * small, casing, should be placed under the TV * must have a usb cord * receiver is enough * if it works with the ancient lirc versions is a plus * easy to order in Holland
I do not understand the bug. So i find it kinda hard to file it. Furthermore, am i the only one with problems? I did not suspect problems with the latest version of Lirc. I did another test, now on verbose level 10. I pressed the button a couple of times until irw stopped detecting presses. After a pause it will work again. See attachment
I noticed the debian deb builder is using a extra patch.
pi@raspberrypi:~/lirc-debian-src-0.9.4b/lirc-0.9.4b/debian/patches $ cat 0003-irtoy-improve-error-handling-220.patch From 62b9172bf52584e0c621d0163052ccca9a240846 Mon Sep 17 00:00:00 2001 From: Helen Foster <helen-foster@users.sourceforge.net> Date: Sun, 14 Aug 2016 14:00:30 +0100 Subject: [PATCH 03/10] irtoy: improve error handling (#220).
Avoid double init. Avoid calling setPin or trying to send if irtoy is not initialized (segfault). --- plugins/irtoy.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/plugins/irtoy.c b/plugins/irtoy.c index f6e81d7..f7a6feb 100644 --- a/plugins/irtoy.c +++ b/plugins/irtoy.c @@ -467,6 +467,9 @@ static int init_device(void) IRTOY_MINFWVERSION, dev->swVersion); free(dev); + dev = NULL; + close(drv.fd); + tty_delete_lock(); return 0; } rec_buffer_init(); @@ -490,10 +493,15 @@ static int init(void) "Additional irtoy device found: %s (ignored)"; const char* const MSG_FOUND = "irtoy device found on %s";
+ log_trace("irtoy: init"); if (drv.device == NULL) { log_error("irtoy: NULL device."); return 0; } + if (dev != NULL) { + log_debug("irtoy: init: irtoy already initialized"); + return 1; + } if (strcmp(drv.device, "auto") != 0) return init_device(); for (found = 0, i = 0; i <= 9; i++) { @@ -516,6 +524,8 @@ static int init(void)
static int deinit(void) { + log_trace("irtoy: deinit"); + // IMPORTANT do not remove this reset. it is vital to return the // irtoy to IRMAN mode. // If we leave the irtoy in sample mode while no-one has the @@ -527,14 +537,14 @@ static int deinit(void) // sending the next one, while sample mode will keep streaming // (and under fluorescent light it WILL stream..) // triggering the problem - setPin(openPin, 0); - setPin(sendingPin, 0); - setPin(receivePin, 0); if (dev != NULL) { + setPin(openPin, 0); + setPin(sendingPin, 0); + setPin(receivePin, 0); irtoy_reset(dev); free(dev); + dev = NULL; } - dev = NULL;
close(drv.fd); drv.fd = -1; @@ -562,10 +572,6 @@ static int irtoy_send_double_buffered(unsigned char* signals, int length) unsigned char reply[16]; int irtoyXmit;
- if (dev == NULL) { - log_error("irtoy_send: irtoy not initialized"); - return 0; - } res = write(dev->fd, IRTOY_COMMAND_TXSTART, sizeof(IRTOY_COMMAND_TXSTART));
if (res != sizeof(IRTOY_COMMAND_TXSTART)) { @@ -647,6 +653,12 @@ static int send(struct ir_remote* remote, struct ir_ncode* code) lirc_t val; int res;
[quote author="Barf"] Unfortunately, most Linux distros ship a Linux that is many, many years old. So, unless you are using a Linux that has a current Lirc (Fedora + ???) you should get the current version and compile it. [/quote]
No, i am using Raspbian. It has a really old (0.9.0) version of LIRC. If i compile the newer versions myself i get the "lock" problem i mentioned. If i use the device with my Fedora laptop (lird 0.9.4) it works fine.
Spend more time as expected with this "toy". Hope someone can help. The device did not work on my raspberry pi 3 with the Rasbian verion of LIRC. (0.9.0). According to the wiki you should be able to use the "irman" driver.
After some hours i tried Fedora. It has version 0.9.5 of LIRC. And i found out that the device is only supported by version 0.9.2 It works fine with Fedora.
So i tried to manually compile the latest LIRC sources (stable and unstable). After many struggles it compiled. It works but if i start "irw" it registers two keypresses and it seems to "hang". Some keypresses afterwards are registered.