root@1FC39F40:~/IRToyRecPlay# nice -n -20 /root/IRToyRecPlay/IRToy -d /dev/ttyACM0 -p -f dfgdgf +-----------------------------------------+ |IR Toy Recorder/Player utility v21 (CC-0)| |http://dangerousprototypes.com | +-----------------------------------------+ Opening IR Toy on /dev/ttyACM0 at 115200bps... opening serial port /dev/ttyACM0 Setting up serial port... Initializing IR Toy... Asking for firmware version...(0/2)...wrote v... Firmware version: V222 Entering IRs sample mode...(0/2)...wrote S... IRs sampler version: S01 Current sample timer resolution: 21.3333us binary mode Enabling handshaking. Asking for transmit count reporting. Asking for completion reporting. Playing back files... Bin file does not exist. shutting down...wait for serial port to clear...done. root@1FC39F40:~/IRToyRecPlay# nice -n -20 /root/IRToyRecPlay/IRToy -d /dev/ttyACM0 -p -f dfgdgf +-----------------------------------------+ |IR Toy Recorder/Player utility v21 (CC-0)| |http://dangerousprototypes.com | +-----------------------------------------+ Opening IR Toy on /dev/ttyACM0 at 115200bps... opening serial port /dev/ttyACM0 Setting up serial port... Initializing IR Toy... Asking for firmware version...(0/2)...wrote v...(1/2)...wrote v...(2/2)...wrote v...no response. Abort.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Found Garbage data when reading the firmware version. Please re-start this utility again. You may need to replug the IR toy. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
As you can see the device does not respond as well even without sending data when invoked the second time. To my mind it seems that the irtoy command does not close the device properly after using it.
Anyway I cannot explain why it works on another machine. So weired.
root@1FC39F40:~/IRToyRecPlay# lsusb Bus 001 Device 005: ID 0930:0225 Toshiba Corp. Bus 001 Device 004: ID 10f1:1a5b Importek Bus 001 Device 003: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon Bus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 007: ID 04d8:fd08 Microchip Technology, Inc. <-------- this must be IRToy Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@1FC39F40:~/IRToyRecPlay# lsusb Bus 001 Device 005: ID 0930:0225 Toshiba Corp. Bus 001 Device 004: ID 10f1:1a5b Importek Bus 001 Device 003: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon Bus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I even tried with the nice command, but there is no change in behavior.
USBreset command does not work here, You must replug the device.
I read a lot of problems concerning Irtoy Hardware and Arduino/Raspi. Could it be there is an unresolved problem with this hardware with a certain kind of USB ports? Reagrds
the firmware has been flashed several times. I can always reproduce the issue. Once "./irtoy -d /dev/ttyACM0 -p -f mute.bin" was used, you have to replug the IrToy device. Regards, Erwein
I received my IRToy V2 a few days ago and try experimenting (Linux only). I installed firmware V22 successfully and had success playing around in IrScrutinizer 1.4.2. I exported one signal to IrToy-bin format (only one signal which mutes my receiver).
Next I wanted to check if the irtoy command can replay this signal, so I compiled irtoy from the latest git sources (https://github.com/myshen/IRToyRecPlay).
./irtoy -d /dev/ttyACM0 -p -f mute.bin +-----------------------------------------+ |IR Toy Recorder/Player utility v21 (CC-0)| |http://dangerousprototypes.com | +-----------------------------------------+ Opening IR Toy on /dev/ttyACM0 at 115200bps... opening serial port /dev/ttyACM0 Setting up serial port... Initializing IR Toy... Asking for firmware version...(0/2)...wrote v... Firmware version: V222 Entering IRs sample mode...(0/2)...wrote S... IRs sampler version: S01 Current sample timer resolution: 21.3333us binary mode Enabling handshaking. Asking for transmit count reporting. Asking for completion reporting. Playing back files... Playing single file mute.bin Playing mute.bin... tx 760 bytes fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Checking # bytes sent....62 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. bytes_to_tx (62) is greater than number of bytes left (16). Setting to 16. Checking # bytes sent....16 bytes...ok. fetching next packet size...handshake mode ON. requested 62 bytes. Bad sent count: 3E 74 02 Bad completion status: 00 shutting down...wait for serial port to clear...done.
But after this, I cannot invoke the command a second time because the device /dev/ttyACM0 is not accessible any more. This is the output, after irtoy was invoked second time:
./irtoy -d /dev/ttyACM0 -p -f mute.bin +-----------------------------------------+ |IR Toy Recorder/Player utility v21 (CC-0)| |http://dangerousprototypes.com | +-----------------------------------------+ Opening IR Toy on /dev/ttyACM0 at 115200bps... opening serial port /dev/ttyACM0 Could not open serial port: errno: 5
The file /dev/ttyACM0 is not available after invoked the second time:
Now the IR Toy is plugged in: Oct 7 14:06:49 1FC39F40 kernel: [ 9396.952203] usb 1-1.3: new full-speed USB device number 67 using ehci-pci Oct 7 14:06:49 1FC39F40 kernel: [ 9397.063616] usb 1-1.3: New USB device found, idVendor=04d8, idProduct=fd08 Oct 7 14:06:49 1FC39F40 kernel: [ 9397.063627] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Oct 7 14:06:49 1FC39F40 kernel: [ 9397.063632] usb 1-1.3: Product: CDC Test Oct 7 14:06:49 1FC39F40 kernel: [ 9397.063637] usb 1-1.3: Manufacturer: Dangerous Prototypes Oct 7 14:06:49 1FC39F40 kernel: [ 9397.063641] usb 1-1.3: SerialNumber: 00000001 Oct 7 14:06:49 1FC39F40 kernel: [ 9397.064314] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device Oct 7 14:06:49 1FC39F40 mtp-probe: checking bus 1, device 67: "/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3" Oct 7 14:06:49 1FC39F40 mtp-probe: bus: 1, device: 67 was not an MTP device
Now the above irtoy command is being invoked. You see no log entry after this is done
This is, when the above command is invoked second time: Oct 7 14:07:10 1FC39F40 kernel: [ 9418.292288] usb 1-1.3: reset full-speed USB device number 67 using ehci-pci Oct 7 14:07:21 1FC39F40 kernel: [ 9428.972287] usb 1-1.3: reset full-speed USB device number 67 using ehci-pci Oct 7 14:07:32 1FC39F40 kernel: [ 9439.724297] usb 1-1.3: reset full-speed USB device number 67 using ehci-pci Oct 7 14:07:37 1FC39F40 kernel: [ 9445.324291] usb 1-1.3: reset full-speed USB device number 67 using ehci-pci
Something odd is here; I did not use lirc, so it cannot be blamed. Is this because of the error when first invoked?: Bad sent count: 3E 74 02 Bad completion status: 00 I attached the file mute.bin as bzip2 archive.