[Ido Gendel] was thinking about new and interesting ways to send data between devices, when he realized that the answer was right in his hand. Literally: he decided to try sending data using the mouse pointer. What he came up with was an interesting hack that uses small movements of the mouse pointer to send data at up to 1200bps, or about 150 bytes per second.
The way he did this was very, very clever. He used an Arduino Leonardo that is set to emulate a mouse, working alongside his existing mouse. This setup means that he can use his existing mouse: the system just sees the Arduino as a second mouse, and the pointer just looks a little jerky when you zoom in. That is because the Arduino is just sending tiny movements, each of which is a code that represents a nybble (4 binary bits) of data. By using both a combination of three left-right or up-down movements, he was able to create 16 movements, each of which can encode 4 bits of data. Each of these encoding movements also returns the mouse to its origin point, so the mouse doesn’t mysteriously scroll off the screen when data is being sent.
On the computer, a custom program detects and decodes this movement, recreating the stream of data. In his example, this is data from a photoresistor, but it could be anything from random data to the contents of a secret file.
Of course, this isn’t a practical way of sending secret data: it only works when the custom program is active, 150 bytes per second is rather slow and enabling mouse acceleration in Windows stops it working because it masks the small movement. But it is an awesome hack that shows how you can send data in ways that you might not first think of. When you are trying to make a device as simple as possible, this is an important lesson to learn.
one word: webcam.
Two words: Please elaborate… :-)
maybe he should intercept the mouse movements before the OS makes the mouse pointer actually move so that it could be completely invisible to the user
Um, you’ve got it backwards…
Why is this “(quote)very, very clever(/quote)”?
I’d accept “interesting”…
pro tip: have Arduino emulate keyboard, send unlimited ammounts of data quite fast!
neither efficiency nor speed are the point here.
Without interfering with the normal use of the PC? I don’t think so. It is interesting, though, to measure the speed at which characters can be sent from an emulated keyboard.
Quite fast if you want too. As USB allows you to specify the poll frequency, and amount of key downs per poll.
However, putting the poll frequency very high does cause problems. (I noticed problems when I put a poll frequency on 5ms for an USB keyboard+mouse)
You better use vendor HID requests, as those are not that hard to use, and guarantee not to mess with other applications.
Thanks for the information. I’m not too familiar with the USB internals, so these tweaks are beyond me right now – but I do hope to learn this soon!
It would be cool if you could do this with a gyro that is just attached to the wrist. Possibly a Bluetooth connected smart watch would make it interesting