Adafruit IRKey Issues

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
vtwoods
 
Posts: 1
Joined: Sun Mar 16, 2014 11:38 pm

Adafruit IRKey Issues

Post by vtwoods »

I have the Adafruit IRKey plugged into my Ubuntu machine. The dongle works properly when I press keys; however, it randomly repeats the last key pressed. Do I have a defective unit? I wanted to try debugging the firmware; however, I get errors from avrdude. Initially it wouldn't even compile since "apple_codes.c" was missing (I removed this from the make file).

mjw87@Ponyo:~/source/IRKey$ sudo avrdude -B 3 -p attiny85 -c usbtiny -U flash:w:./irkeyboard.hex:a
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

avrdude done. Thank you.

mjw87@Ponyo:~/source/IRKey$ sudo lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 016: ID 0916:1302
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit IRKey Issues

Post by adafruit_support_mike »

When you're trying to program a Trinket or Gemma, the "Could not find USBtiny device (0x1781/0xc9f)" error means the bootloader wasn't running at the moment you tried to program the chip.

I don't think the IRKey has a bootloader though. How are you trying to program it?

User avatar
HenkW
 
Posts: 2
Joined: Thu Mar 19, 2015 12:16 pm

Re: Adafruit IRKey Issues

Post by HenkW »

Can't believe how happy I was to find this post after searching the internet endlessly for 'ubuntu usb spurious keyboard event' and not finding anything useful. This is EXACTLY the problem I'm having and it is driving me nuts. The IRKey is plugged directly into one of the USB3 ports (no cable) of an Intel-based ubuntu x86_64 box (kodibuntu, to be precise) and, every now and then after pressing a key on the remote, it would repeat the keystroke on the IRKey, light blinking and all. So, when I press the key, the green light blinks, and then, even when the remote is put away, the IRKey blinks again after some seconds and emits the same key again. Particularly frustrating if it is the space bar in kodi.... This happens sometimes after a second or so, sometimes 10 secs, sometimes every minute or so. I clocked it but it is not regular and does not follow any obvious pattern. I updated ubuntu to the latest release using apt. Looked into /var/log/kern.log, /var/log/dmsg and /var/log/syslog but nothing I can relate to the strange behaviour.

I did not dare venture into firmware programming/debugging for the IRKey. I am almost sure it is Ubuntu-related because the key does not behave like that when plugged in to my mac.

Any idea what could cause this behaviour? I really like the IRkey because it greatly enhances the WAF of the kodi box :-)

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit IRKey Issues

Post by adafruit_support_mike »

That's a known issue with the IRKey, and there's no easy solution. It's one of the reasons we have the design tagged for an overhaul. We don't have any ETA on a new version though.

User avatar
paulf8080
 
Posts: 208
Joined: Sat Jan 18, 2014 10:25 pm

Re: Adafruit IRKey Issues

Post by paulf8080 »

vtwoods wrote:I have the Adafruit IRKey plugged into my Ubuntu machine. The dongle works properly when I press keys; however, it randomly repeats the last key pressed. Do I have a defective unit?
I had the same problem and determined that a large enough ambient IR spike would cause a repeat loop. I spent a few months debugging and learning AVR programming on the ATTiny. I gave up on measuring pulses with timers and switched to a sampling clock and clock interrupt handler. I asked why it was discontinued in the the the admin section. I shared my code hoping they would critique it and to maybe help reviving the little guy.

viewtopic.php?f=10&t=65139

If you try my code, ask questions here. I made a mistake posting it there. Projects are frowned upon in the admin section.

User avatar
HenkW
 
Posts: 2
Joined: Thu Mar 19, 2015 12:16 pm

Re: Adafruit IRKey Issues

Post by HenkW »

OK, so I got all the tools (CrossPack for AVR Development; I'm a Mac user) and the source code from friendly paulf8080's dropbox. Figured that, even if I would not be capable of compiling or adapting the source code, I could still use his .hex file (yes, I can read a makefile and know what 0x%08lX means). Then got EXACTLY to the point where vtwoods got marooned:

$ make burn
avrdude -B 3 -p attiny85 -c usbtiny -U flash:w:./irkeyboard.hex:a
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

That's when it started to dawn on me (don't chuckle), but to 'ordinary mere mortal' users like me it is not immediately obvious that to program a USB device, connected to your computer through USB, you actually need ANOTHER USB device, called a 'USB programmer' device (some people refer to that device as a 'boot loader' which to me is a complete misnomer), in this case, the USBTiny, research revealed. And it's getting even better, to program the IRKey, you actually need to SOLDER the programming wires onto the IRKey pcb. This was not quite what I had in mind when I read about 'updating the firmware of the IRKey'.

Learnt a lot, though....

User avatar
paulf8080
 
Posts: 208
Joined: Sat Jan 18, 2014 10:25 pm

Re: Adafruit IRKey Issues

Post by paulf8080 »

HenkW wrote: Learnt a lot, though....
Me too and I programmed my first computer in 1967. Learning is the true spirit of Adafruit, grasshopper. I soldered pins into the IRKey thinking I would just plug in the USBTiny. The signal names are the same, but pins are out of order. The converter in the attachment was handcrafted by a master craftsman. :-) If knew ahead of time, I would have put the socket in the IRKey instead of pins.

About the misnomer. The first Univac computers, where I worked, had a big controller that would write a program directly to the memory from tape or punch cards, much like a USBTiny. The 418II added a printed circuit board with hundreds of diodes the represented one bits in a program the would read the first block of tape into memory at power on. The computer was its own controller and would lift itself off the ground much like the mythical person who could lift himself off the ground by his bootstraps. Hence, the diodes were called the "bootstrap program". Now, it is the "boot loader" in ROM that loads a "boot block" into RAM..

I really had fun playing with IRKey that was much more powerful than the mainframes I worked on.
Attachments
kludge.JPG
kludge.JPG (39.27 KiB) Viewed 262 times

User avatar
paulf8080
 
Posts: 208
Joined: Sat Jan 18, 2014 10:25 pm

Re: Adafruit IRKey Issues

Post by paulf8080 »

You know how the jerks put ads on your browser tailored for you because they spy on you? Did anyone else in this thread get this ad for GPIO version?

http://www.miniinthebox.com/raspberry-p ... 16871.html

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”