Posts | Comments

Planet Arduino

Archive for the ‘hid’ Category

Need to hook a classic Mac mouse up to your modern machine with the help of a DIY USB adapter? [John Floren] has you covered. [John]’s solution uses a board with an ATmega32U4 microcontroller on it to connect to the Mac mouse on one end, and emulate a USB HID (Human Interface Device) on the other. A modern machine therefore recognizes it like it would any other USB input device.

Why is this necessary? The connector on the classic Mac mouse may look like a familiar DE-9 connector, but it is not an RS-232 device and wouldn’t work if it were plugged into a 9-pin serial port. The classic Mac mouse uses a different pinout, and doesn’t have much for brains on the inside. It relies on the host computer to read its encoders and button states directly.

This project is actually a bit of an update to a piece of earlier work [John] did in making a vintage Depraz mouse work with modern systems. He suspected that it wouldn’t take much to have it also work with a classic Mac mouse, and he was right — all it took was updating the pin connections and adding some pull-up resistors. The source code and design files are on GitHub.

Even if one does not particularly want to use a classic Mac mouse for daily work, there’s definitely value in this kind of thing for those who deal in vintage hardware: it allows one to function-check old peripherals without having to fire up a vintage machine.

[Christofer Hiitti] found himself with the latest Microsoft Flight Simulator on his PC, but the joystick he ordered was still a few weeks out. So he grabbed an Arduino, potentiometers and a button and hacked together what a joke-yoke.

The genius part of this hack is the way [Christopher] used his desk drawer for pitch control. One side of a plastic hinge is attached to a potentiometer inside a drawer, while the other side is taped to the top of the desk. The second pot is taped to the front of the drawer for pitch control and the third pot is the throttle. It works remarkably well, as shown in the demo video below.

The linearity of the drawer mechanism probably isn’t great, but it was good enough for a temporary solution. The Arduino Leonardo he used is based on the ATmega32u4 which has a built-in USB, and with libraries like ArduinoJoystickLibrary the computer interface very simple. When [Christopher]’s real joystick finally arrived he augmented it with a button box built using the joke-yoke components.

We’ve seen There is no doubt that Microsoft Flight Simulator 2020 will spawn a lot of great controller and cockpit builds over the next few years. We’ve already covered a new joystick build, and a 3D printed frame to turn an Xbox controller into a joystick.

There was a time when building realistic simulations of vehicles was the stuff of NASA and big corporations. Today, many people have sophisticated virtual cockpits or race cars that they use with high-resolution screens or even virtual reality gear. If you think about it, a virtual car isn’t that hard to pull off. All you really need is a steering wheel, a few pedals, and a gear shifter. Sure, you can build fans to simulate the wind and put haptics in your seat, but really the input devices alone get you most of the way there. [Oli] decided he wanted a quick and easy USB gear shifter so he took a trip to the hardware store, picked up an arcade joystick, and tied it all together with an Arduino Leonardo. The finished product that you can see in the video below cost about $30 and took less than six hours to build.

The Leonardo, of course, has the ability to act like a USB human interface device (HID) so it can emulate a mouse or a keyboard or a joystick. That comes in handy for this project, as you would expect. The computer simply has to read the four joystick buttons and then decide which gear matches which buttons. For example up and to the left is first gear, while 4th gear is only the down button depressed. A custom-cut wooden shifter plate gives you the typical H pattern you expect from a stick shift.

Of course, the joystick doesn’t have a long handle like a true stick shift, so [Oli] added some extensions. In addition, a real shifter doesn’t require you to hold it in position as a joystick would. To rectify this, the shifter plate has magnets that grab the stick and hold it. They aren’t strong enough that you can’t move the stick, but they are strong enough to keep it from moving on its own.

We noticed that the design doesn’t allow for a clutch, so it isn’t quite the same as driving a real stick. However, [Oli] mentions several upgrades he has in mind and a clutch is one of them. Some haptics would be a cool addition so could feel the gears grind if you didn’t do the shift correctly.

The last shifter we saw like this was 3D printed. It is getting harder to find a car in the US with a manual transmission, but [Kristina Panos] is definitely a fan.

[Giovanni Bernardo] has a very important job – managing the audio for several Christmas events. Desiring a simple and effective control interface, he designed a dedicated media keyboard to run the show.

The project began with an Arduino Leonardo, commonly used in projects that aim to create a USB Human Interface Device. [Giovanni] then installed the HID-Project library from [Nicohood]. This was used to enable the device to emulate media buttons typically found on keyboards, something the standard Arduino HID libraries were unable to do. It’s a useful tool, and one that can be implemented on even standard Arduino Unos when used in combination with the HoodLoader2 bootloader.

For ease of use and a little bit of cool factor, arcade buttons were used for the media functions. Simple to wire up, cheap, and with a great tactile feel, they’re a popular choice for fun human interface projects. It’s all wrapped up in a neat plastic box with Dymo labels outlining the functions. It’s a neat and tidy build that should make running the Christmas show a cinch!

Ever hear of Microsoft Soundscape? We hadn’t, either. But apparently it and similar apps like Blindsquare provide people with vision problems context about their surroundings. The app is made to run in the background of the user’s mobile device and respond to media controls, but if you are navigating around with a cane, getting to media controls on a phone or even a headset might not be very convenient. [Jazzang] set out to build buttons that could control apps like this that could be integrated with a cane or otherwise located in a convenient location.

There are four buttons of interest. Play/pause, Next, Back, and Home. There’s also a mute button and an additional button you can use with the phone’s accessibility settings. Each button has a special function for Soundscape. For example, Next will describe the point of interest in front of you. Soundscape runs on an iPhone so Bluetooth is the obvious choice for creating the buttons.

To simplify things, the project uses an Adafruit Feather nRF52 Bluefruit board. Given that it’s Arduino compatible and provides a Bluetooth Human Interface Device (HID) out of the box, there’s almost nothing else to do for the hardware but wire up the switches and some pull up resistors. That would make the circuit easy to stick almost anywhere.

Software-wise, things aren’t too hard either. The library provides all the Bluetooth HID device trappings you need, and once that’s set up, it is pretty simple to send keys to the phone. This is a great example of how simple so many tasks have become due to the availability of abstractions that handle all of the details. Since a Bluetooth HID device is just a keyboard, you can probably think of many other uses for this setup with just small changes in the software.

We covered the Bluefruit back when it first appeared. We don’t know about mounting this to a cane, but we do remember something similar attached to a sword.

MalDuino is an Arduino-powered USB device which emulates a keyboard and has keystroke injection capabilities. It’s still in crowdfunding stage, but has already been fully backed, so we anticipate full production soon. In essence, it implements BadUSB attacks much like the widely known, having appeared on Mr. Robot, USB Rubber Ducky.

It’s like an advanced version of HID tricks to drop malicious files which we previously reported. Once plugged in, MalDuino acts as a keyboard, executing previous configured key sequences at very fast speeds. This is mostly used by IT security professionals to hack into local computers, just by plugging in the unsuspicious USB ‘Pen’.

[Seytonic], the maker of MalDuino, says its objective is it to be a cheaper, fully open source alternative with the big advantage that it can be programmed straight from the Arduino IDE. It’s based on ATmega32u4 like the Arduino Leonardo and will come in two flavors, Lite and Elite. The Lite is quite small and it will fit into almost any generic USB case. There is a single switch used to enable/disable the device for programming.

The Elite version is where it gets exciting. In addition to the MicroSD slot that will be used to store scripts, there is an onboard set of dip switches that can be used to select the script to run. Since the whole platform is open sourced and based on Arduino, the MicroSD slot and dip switches are entirely modular, nothing is hardcoded, you can use them for whatever you want. The most skilled wielders of BadUSB attacks have shown feats like setting up a fake wired network connection that allows all web traffic to be siphoned off to an outside server. This should be possible with the microcontroller used here although not native to the MalDuino’s default firmware.

For most users, typical feature hacks might include repurposing the dip switches to modify the settings for a particular script. Instead of storing just scripts on the MicroSD card you could store word lists on it for use in password cracking. It will be interesting to see what people will come up with and the scripts they create since there is a lot of space to tinker and enhanced it. That’s the greatness of open source.

You can watch the prototype in action in the video:


Filed under: Arduino Hacks, peripherals hacks, security hacks
Gen
27

[Nikhil] has been experimenting with human interface devices (HID) in relation to security. We’ve seen in the past how HID can be exploited using inexpensive equipment. [Nikhil] has built his own simple device to drop malicious files onto target computers using HID technology.

The system runs on a Teensy 3.0. The Teensy is like a very small version of Arduino that has built-in functionality for emulating human interface devices, such as keyboards. This means that you can trick a computer into believing the Teensy is a keyboard. The computer will treat it as such, and the Teensy can enter keystrokes into the computer as though it were a human typing them. You can see how this might be a security problem.

[Nikhil’s] device uses a very simple trick to install files on a target machine. It simply opens up Powershell and runs a one-liner command. Generally, this commend will create a file based on input received from a web site controlled by the attacker. The script might download a trojan virus, or it might create a shortcut on the user’s desktop which will run a malicious script. The device can also create hot keys that will run a specific script every time the user presses that key.

Protecting from this type off attack can be difficult. Your primary option would be to strictly control USB devices, but this can be difficult to manage, especially in large organizations. Web filtering would also help in this specific case, since the attack relies on downloading files from the web. Your best bet might be to train users to not plug in any old USB device they find lying around. Regardless of the methodology, it’s important to know that this stuff is out there in the wild.


Filed under: Arduino Hacks, security hacks
Ott
26

Walkman-esque Human Interface Device

arduino, arduino hacks, ATMEGA8, hid, human interface device, keyboard, multimedia, USB Commenti disabilitati su Walkman-esque Human Interface Device 

mc1_4

Cheap keyboards never come with extra buttons, and for [Pengu MC] this was simply unacceptable. Rather than go out and buy a nice keyboard, a microcontroller was found in the parts drawer and put to work building this USB multimedia button human interface device that has the added bonus of looking like an old-school Walkman.

The functions that [Pengu MC] wants don’t require their own drivers. All of the buttons on this device are part of the USB standard for keyboards: reverse, forward, play/pause, and volume. This simplifies the software side quite a bit, but [Pengu MC] still wrote his own HID descriptors, tied all of the buttons to the microcontroller, and put it in a custom-printed enclosure.

If you’re looking to build your own similar device, the Arduino Leonardo, Micro, or Due have this functionality built in, since the USB controller is integrated on the chip with everything else. Some of the older Arduinos can be programmed to do the same thing as well! And, with any of these projects, you can emulate any keypress that is available, not just the multimedia buttons.


Filed under: Arduino Hacks
Ott
26

Walkman-esque Human Interface Device

arduino, arduino hacks, ATMEGA8, hid, human interface device, keyboard, multimedia, USB Commenti disabilitati su Walkman-esque Human Interface Device 

mc1_4

Cheap keyboards never come with extra buttons, and for [Pengu MC] this was simply unacceptable. Rather than go out and buy a nice keyboard, a microcontroller was found in the parts drawer and put to work building this USB multimedia button human interface device that has the added bonus of looking like an old-school Walkman.

The functions that [Pengu MC] wants don’t require their own drivers. All of the buttons on this device are part of the USB standard for keyboards: reverse, forward, play/pause, and volume. This simplifies the software side quite a bit, but [Pengu MC] still wrote his own HID descriptors, tied all of the buttons to the microcontroller, and put it in a custom-printed enclosure.

If you’re looking to build your own similar device, the Arduino Leonardo, Micro, or Due have this functionality built in, since the USB controller is integrated on the chip with everything else. Some of the older Arduinos can be programmed to do the same thing as well! And, with any of these projects, you can emulate any keypress that is available, not just the multimedia buttons.


Filed under: Arduino Hacks
Dic
09

USB NeXT Keyboard

arduino hacks, Arduino micro, computer hacks, hid, keyboard, NeXT Commenti disabilitati su USB NeXT Keyboard 

USB NeXT Keyboard

[Ladyada] and [pt] had an old keyboard from NeXT, but since it used a custom protocol it wasn’t usable with modern hardware. So they built a custom device to convert the NeXT protocol to USB.

The device uses a Arduino Micro to read data from the keyboard and communicate as a HID device over USB. It connects to the keyboard using the original mini-DIN connector, and is housed in the classic Altoids tin enclosure.

Since the protocol used by NeXT isn’t standard, they had to figure it out and write some code to interpret it. The keyboard communicates bidirectionally with the computer, so they needed to send the correct frames to key data back.

Fortunately, they hit on a Japanese keyboard enthusiast’s site, which had protocol specifications. They implemented this protocol on the Micro, and used the Keyboard library to create a HID device.

The final product is an adapter for NeXT to USB, which allows for the old keyboards to be used on any computer with USB. It’s a good way to bring back life to some otherwise unusable antique hardware.


Filed under: arduino hacks, computer hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook