At the end of October, I attended a national, annual conference on computing in higher education, and they always have a huge vendor expo with lots of swag being given away. These days, my interest really boils down to free t-shirts and what I refer to as LED trinkets (anything flashy); but a couple of other things turned out to be irresistible. So I brought them home and took them apart to see what makes them go.
USB Software Demo Fob
Orion, whoever they are and whatever they sell, snagged me as I was walking past and offered me this “demo on USB.”
I responded truthfully that I was fascinated . . . although I didn’t point out that I was fascinated merely by the idea of demo-on-USB, and really unfascinated by whoever they are and whatever they sell.
Inside, the only components are LEDs and their current-limiting resistors, a pushbutton switch, and a Cypress CY7C63803 USB peripheral controller chip. From the datasheet, this thing is an 8-bit microcontroller with integrated USB support, in-system reprogrammability, and 14 (total, configurable) I/O pins in a 16-pin SOIC package.
It’s targeted for use in mice, keyboards, gaming peripherals, barcode scanners, etc., and it strikes me as a really slick little device. It’s available at Digi-Key in single quantities for about $1.45 — seems like there may be some kind of opportunity there, if the development system isn’t prohibitively expensive.
So . . . it seemed unlikely that an 8-bit microcontroller would have an entire software demo on it, which led me to question exactly what the dongle did. I assume it was made to demo on Windows; and even if I had a Windows machine, there’s no way I’d plug this thing in and get pwned.
Instead, I did what any self-respecting geek would do and hooked it to my Linux box, with tail -f /var/log/messages
running.
Nov 4 18:17:06 dell2600 kernel: usb 4-2: new low speed USB device using uhci_hcd and address 10
Nov 4 18:17:06 dell2600 kernel: usb 4-2: configuration #1 chosen from 1 choice
Nov 4 18:17:06 dell2600 kernel: input: Cypress Semiconductor, Inc. enCoReII Keyboard RDK as /class/input/input9
Nov 4 18:17:06 dell2600 kernel: input: USB HID v1.11 Keyboard [Cypress Semiconductor, Inc. enCoReII Keyboard RDK] on usb-0000:00:1d.3-2
Nov 4 18:17:06 dell2600 kernel: input: Cypress Semiconductor, Inc. enCoReII Keyboard RDK as /class/input/input10
Nov 4 18:17:06 dell2600 kernel: input: USB HID v1.11 Device [Cypress Semiconductor, Inc. enCoReII Keyboard RDK] on usb-0000:00:1d.3-2
It was automatically detected as a keyboard-class device. Okay. And its little blue LEDs were glowing, glowing, hypnotizing me, luring me . . . press the button . . . it can’t be that bad . . . press the button . . .
rwww.orionondemand.com
Huh. Typed that right into my terminal, as if it were a keyboard.
Looks like it’s trying to go to a URL, but I don’t know what’s up with the “r” in front. I tried “keying” it into vi after hitting Ctrl-v to capture escape codes; I redirected it into od -c as well. Nothing. Just the “r.”
I have to assume on Windows, it does something else — that there’s a keycode my Linux doesn’t recognize that starts up the default browser, or that there’s additional USB functionality sending through another driver that Linux doesn’t support by default. But how it works, in general, is now easy enough to see.
Solar-Powered Flashy LCD Shutter Thingum
I didn’t even see these at the show, but after we got back, my boss gave me his.
It’s apparently a picture holder; but in the lower right corner, there’s a little sign that flashes on and off every couple of seconds saying “Confirmed.” (I have yet to figure out what is confirmed, but maybe it’s part of the vendor’s current marketing campaign. Brilliant, that, if you can’t associate the keyword with the company without having seen their literature first.)
My first impression was that there was an EL backlight going on and off. But the glass looked like an LCD . . . and why would they put in a whole color LCD just to display a static graphic saying “Confirmed???” It turns out there’s no backlight, and the LCD is being used as a shutter to hide and reveal a paper graphic.
Here’s what it looks like after prising it out of the frame and opening the clear plastic case. The circuit board has two transistors, and the power source is a narrow strip solar cell hidden along the lower edge of the enclosure.
It occurred to me that perhaps the solar cell could be part of the timer oscillator — when light shines through the LCD, the cell builds up enough charge on a capacitor to darken the LCD, which in turn discharges the capacitor and restarting the cycle. Not so, as far as I can tell; the LCD continues flashing with the solar cell out of the case and exposed directly to continuous bright light.
Rather, I assume that the circuit is a simple two-transistor oscillator . . . and that’s about as far as I care to take my analysis. The PCB’s pretty intelligible if anyone wants to trace it out, but I already know enough to satisfy my curiosity: solar cell rather than battery, and LCD shutter rather than backlight.
The rwww…. bit is probably actual [windows-key]+[r] which opens up the run dialog, and then types in the website address. This opens the website in your default browser on windows.
I’m going out on a limb, but I’ll guess that the ‘r’ at the start of the address is supposed to be Win+r – which loads up the “run” dialog in windows.
It then types in the address, hits enter, and your favourite browser loads it all up for you.
Pretty simple, yet sophisticated for a demo fob. I was expecting a flash drive and software =)
In Windows, alt-r (from what I remember) I think opens the run command window. If you put a url in there it would probably open the site in IE. Demo-on-usb, wow. lol
Okay, you guys are obviously all right, because you’re telling me the same thing.
I didn’t know a URL in the Run dialog would open a browser. That makes sense.
I betcha Linux doesn’t know how to parse the Windows key, so it just ignored it.
On Linux handling the windows key, I use it as a magic “do stuff” key with my window manager, media player, etc.
However it’s not going to appear in your terminal (or vim) without some stuffing around. (Yay for stuffing around)
I just snagged one of those “easy buttons” from the world furniture market this last week. I find it a great item… The thing that I’m curious about is if the website that it loads is customizable I’d like to change it from what it came with to one I use. I’ve browsed the registry and can’t seem to find it.
Any help would be appreciated.
Doug, because the USB button (at least the one I took apart) emulates a USB keyboard, the target URL is burned into the FLASH/PROM of the button’s microcontroller.
You won’t be able to change that without a programmer; and the μcont is probably fused so you can’t read out the existing code.
Thanks Keith for your help and time.