Posts with «hid» label

Latency Meter For Accurate Gaming

The gaming world experienced a bit of a resurgence in 2020 that is still seen in the present day. Even putting aside the effects from the pandemic, the affordability and accessibility has arguably never been better. Building a gaming PC can have its downsides, though, and a challenging issue to troubleshoot is input lag or input latency. This is something that’s best measured with standalone hardware, and if this is an issue on your setup you may want to take a look at this latency meter.

Unlike other measurement devices that use the time between a mouse button input and the monitor’s display of a bullet or shooting event, this one looks at mouse movement and the change in the scene instead. This makes it much more versatile than other methods since it’s independent of specific actions, and can be used in any game without any specific events needed to perform the measurement. A camera is placed on the monitor’s top edge and the Arduino-based device sends mouse commands to the computer while measuring the time between those commands and the shift in the image on the monitor.

The project is open source, so with the right hardware it’s possible to build one to troubleshoot latency issues or just to learn more about a particular hardware configuration’s behavior. Arduinos and other microcontrollers have been doing all kinds of things by pretending to be human interface devices like this for a while now. One of our favorites of late was this effects pedal that replicates musical effects on mice and keyboards.

QTPy-knob: Simple USB knob w/ CircuitPython

I like minimal solutions to problems. I was playing with a CircuitPython-enabled QT Py on a breadboard with and a rotary encoder and I ended up making a USB knob, like many others have done before. But I realized: waitaminute, I can literally just plug the encoder directly onto the QT Py… Thus was born [...]
Todbot 26 Feb 01:10
hardware-hacking  hid  knob  neopixel  qtpy  usb  

Turning A Desk Drawer Into A Flight Yoke

[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.

Four on the Floor for Your Virtual Race Car

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.

Control Your Web Browser Like It’s 1969

Imagine for a moment that you’ve been tasked with developing a device for interfacing with a global network of interconnected devices. Would you purposely design a spring-loaded dial that can do nothing but switch a single set of contacts on and off from 1 to 10 times? What kind of crazy world would we have to live in where something like that was the pinnacle of technology?

Obviously, such a world once existed, and now that we’ve rolled the calendar ahead a half-century or so, both our networks and our interfaces have gotten more complex, if arguably better. But [Jan Derogee] thinks a step backward is on order, and so he built this rotary phone web browser. The idea is simple: pick up the handset and dial the IP address of the server you want to connect to. DNS? Bah, who needs it?

Of course there is the teensy issue that most websites can’t be directly accessed via IP address anymore, but fear not – [Jan] has an incredibly obfuscated solution to that. It relies on the fact that many numbers sound like common phrases when sounded out in Chinese, so there end up being a lot of websites that have number-based URLs. He provides an example using the number 517, which sounds a bit like “I want to eat,” to access the Chinese website of McDonald’s. How the number seven sounding like both “eat” and “wife” is resolved is left as an exercise to the reader.

And here we thought [Jan]’s rotary number pad was of questionable value. Still, we appreciate this build, and putting old phones back into service in any capacity is always appreciated.

Hack a Day 24 Jul 06:00
arduino  classic hacks  dial  dns  hid  homophone  ip  phone hacks  pulse  rotary  url  usb  

A HID For Robots

Whether with projects featured here or out in the real world, we have a tendency to focus most upon the end product. The car, solar panel, or even robot. But there’s a lot more going on behind the scenes that needs to be taken care of as well, whether it’s fuel infrastructure to keep the car running, a semiconductor manufacturer to create silicon wafers, or a control system for the robot. This project is one of the latter: a human interface device for a robot arm that is completely DIY.

While robots are often automated, some still need human input. The human input can be required all the time, or can be used to teach the robot initially how to perform a task which will then be automated. This “keyboard” of sorts built by [Ahmed] comes with a joystick, potentiometer, and four switch inputs that are all fully programmable via an Arduino Due. With that, you can perform virtually any action with whatever type of robot you need, and since it’s based on an Arduino it would also be easy to expand.

The video below and project page have all the instructions and bill of materials if you want to roll out your own. It’s a pretty straightforward project but one that might be worth checking out since we don’t often feature controllers for other things, although we do see them sometimes for controlling telescopes rather than robots.

 

 

Hack a Day 02 Jun 06:00

MalDuino — Open Source BadUSB

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

KeyMouSerial Solves Your Raspberry Pi Keyboard Problems

All laptops have a working keyboard and mouse built into them, the only problem is that you can’t use these tools on other computers that don’t have them. At least, until now. [Peter] has created the KeyMouSerial in order to use his laptop’s keyboard and mouse as physical devices on his Raspberry Pi, finally freeing the bonds holding our laptops’ human interface devices back.

The software for KeyMouSerial copies keystroke and mouse information and sends this out via a serial port on his laptop (using a USB to serial adapter). From there the information is translated by an Arduino into HID commands which are sent via USB to the target computer, in this case a Raspberry Pi. It’s a pretty elegant solution to carrying a bulky keyboard and mouse along just for a Raspberry Pi, or for any computer that might not have access to a network and SSH.

[Peter] has also been working on using his iPod as a serial-to-USB converter, so if you’re a Rockbox developer and want to help out then drop him a line. All of the software is available (for Windows, Mac, or Linux) including the Arduino sketch if you want to try this software out for yourself. And, if you don’t want to turn a computer into a keyboard and want to go the other direction and turn a keyboard into a computer, that is also an option.


Filed under: laptops hacks

Using HID Tricks to Drop Malicious Files

[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

Walkman-esque Human Interface Device

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