Tag Archives: usb

Simple 6X USB Charger with Current Monitor

This is a simple 6 port USB device charger with a individual current monitor on each port. The charging current is indicated using RGB LEDs. Blue means slow charge (under 250mA), green means 250mA to 750mA, red means over 750mA, and purple means over 1500mA (for tablets). This circuit involves an ATmega328P (if you do hobby electronics, I bet you have plenty spares of these), INA169 (check out this breakout board), and a OKR-T10-W12.

While this project is not as impressive as my other projects in terms of difficulty, I soldered and Continue reading

Keyboard and Mouse for PlayStation 4 Games (second prototype)

Why did you do this?

I like playing shooter games on PC but my laptop is too weak to play them. Game consoles do not support USB keyboards and USB mouse, they only support gamepads. Gamepad controls are not suitable for shooter games, using a keyboard and mouse is much more comfortable for gameplay.

How does it work?

I designed a circuit that features a microcontroller and USB hub. The keyboard and mouse plugs into the USB hub, and then the microcontroller takes the data from the keyboard and mouse, translates them to the data format used by the PlayStation 4. It does the translation in a way as though the mouse was the right thumbstick, and the keys are mapped to buttons (the WASD keys are mapped to the left thumbstick).

If you want to buy one from me, you can’t, I don’t want to sell anything. If you want to buy something similar from somebody else, try the XIM4 (my top choice), CronusMAX, Venom X, etc. (if there’s another product you would like to see on this list, give me one to try out first, and I’ll add it if it works)

Development Story

Latest News – July 20 2014

I wanted to share this story because I am very happy that I finally managed to get this far! Anybody who is attempting this and thought it was impossible to do can now breath a sigh of relief because it definitely can be done.

I have already accomplished a similar project that worked with a PS3 (UsbXlater), something that connected to the PS3 via USB that translated keyboard and mouse data format to gamepad data format.

Once the PS4 launched, I reversed engineered the USB protocol used by the DualShock, and then attempted the same technique. But… Continue reading

UsbXlater, DualShock 4, PlayStation 4, Weekly Report Dec 15, 2013

I haven’t worked on the firmware for the UsbXlater for a while. This is because I really want it to work on the PlayStation 4 by spoofing the DualShock 4, but after some heavy investigation. It seems like this is impossible (in the sense of spoofing).

On the DualShock 4 circuitry, I have recently found the UART (aka serial port) pins for the Bluetooth module’s HCI (host controller interface). I used my logic analyzer to capture the data from the HCI. The results are posted on my wiki page about the DualShock 4, along with the pcap file with the entire capture.

The PlayStation 4 does not seem to accept input through USB. I did get UsbXlater entirely working and replicating the behaviour of a real DualShock 4, but the PlayStation does not respond. The Bluetooth connection is always active during this time.

Over Bluetooth, it seems that the L2CAP packets that are sent containing the report contains 4 bytes at the end that appears to be random. This could mean it’s a checksum or a hash. Update: it’s a CRC32, with a standard initial value. It’s easy to generate and I’ve already tested it on my sample capture data, so that’s good news. Credit goes to Matlo from GIMX

I do have a new version of the UsbXlater hardware that I can get assembled next week. It will emulate button presses on the DualShock 4 directly using electrical signals connected to the buttons themselves, instead of digitally through spoofing data streams.

I am aware that CronusMax has a “proof of concept” video of his hardware working on the PS4, but that video is a fake, what he did is program it to act as a HID keyboard, which only works in the menus. This is why the video does not show gameplay and why he does not plain outright say that it will be supported. Everybody who is making a device similar to XIM or Cronus or Eagle Eye Converter or UsbXlater is facing the exact same difficulties I am facing. I am disappointed in Cronus because the video’s purposes is probably to drive up pre-orders for people who are hoping for PlayStation 4 support which might never come.

UsbXlater Preview

Hi HACKADAY readers, I have some updates: Progress on UsbXlater, DualShock 4 spoofing

This circuit is a STM32F2 chip with a USB host interface and USB device interface. The original goal of this project is to allow me to play Playstation 4 games using a keyboard and mouse (as opposed to using a gamepad, because the PS3/PS4/Xbox360/XboxOne do not support keyboard and mouse directly in games).

20131101_181657 (Large)20131101_181711 (Large)20131101_181722 (Large)20131101_181730 (Large)20131101_181741 (Large)usbxlater

This device has many possible uses…

Continue reading

Const. Current Dummy Load, Digital + USB

A simple adjustable constant current dummy load, with digital readout and USB data logging.

Inspired by the dummy load made by Dave from the EEVBlog. I decided I wanted one because I work with a lot of battery powered designs and it’d be nice to have a simple way of testing a battery or power supply in terms of capability, capacity, and heat. It features a 2 line voltage and current reading, a rotary encoder as the user input to adjust the current setting, and USB data logging (plus bootloading). There are more neat features, please watch the video.

Here are some pretty pictures: (Imgur Album)

Constant Current Dummy Load, Digital & USB

Continue reading

Arduino library to bring USB serial to XMEGA


I’m working on a XMEGA-A3BU Xplained board, along with Arduino IDE. (normally I’d stay away from anything related to Arduino but this time I’m forced). I connecting a FT232 for debugging is a pain so I modified LUFA and turned it into an Arduino library, so I can use print and println for debugging.

USB Descriptor and Request Parser

I wrote a tool to parse some USB data. You put in the data packet into the tool, and it’ll translate it into something you can understand.


The reason why I made this tool is because some USB traffic sniffers do not perform parsing on USB packets (especially the freeware ones), but the binary data can still be obtained. This tool will traverse through the binary data, and translate it into something human-readable, using the official documents from USB.org. The three types of data this tool can handle are “USB Standard Descriptors”, “USB Standard Requests”, and “USB HID Report Descriptors”.

The “parse USB HID report descriptor” function is the reverse of the (horrible) “HID Descriptor Tool” provided by USB.org, and the display format is very similar.

Because USB devices are generally embedded devices, this tool is designed with the C programming language in mind. The output can be imported as an array initializer.

I was frustrated when I couldn’t find a tool for this, so I wrote it in hopes that it will become useful for everybody looking for such a tool.

Nehebkau, Laptop Controlled Keyboard and Mouse

I got my Raspberry Pi. I do not have an ethernet connection or Wifi dongle available, or an extra keyboard. I don’t have any Bluetooth either. I needed a substitute keyboard to use the Raspberry Pi.

For fun, I designed a little USB device, actually it has two USB devices on a small board in the shape of a stick. Two USB capable microcontrollers are on this circuit. One will connect to the Raspberry Pi, and behave like a keyboard and mouse. The other will connect to my laptop. My laptop will run software that captures keystrokes and mouse events. The laptop will tell the microcontroller what to do, so when I press a key on my laptop, the Raspberry Pi thinks the same key is pressed. (and the same with the mouse)

Continue reading

Review: Total Phase Beagle USB 12 Analyzer

I obtained a Total Phase Beagle USB 12. This is an USB traffic analyzer that is capable of capturing USB traffic at full speed and low speed. It is a physical device that sits in between a host and a device, while the traffic between the two are sent to my computer so I can view every single event.

This one is a hardware analyzer, which is different from software analyzers. I tried various software analyzers before, there are some disadvantages of software based analyzers:

  • filter drivers make my laptop slower and sometimes unstable (sometimes my USB devices stop working, and sometimes I get a BSOD)
  • cannot capture data between a device and a seperate host that’s not the computer running the software
  • cannot let you unplug and replug and continue the capture (maybe this is not true for more expensive software)
  • cannot detect low level errors
I will be working on a embedded USB host project soon. Something to do with

Continue reading

Our Fourth Year Design Project: ARUCI

We turned my phone into a universal remote that uses augmented reality. We can track the location of objects and identify them in real time, so we can overlay an icon representing the object on the video shown on the touchscreen. Simply click on the object to interact with it. It’s all wireless, no base station required.

Actual video is 1080p, I recommend you view it full screen.

Presentation slides: without notes and with notes


Our group did circuit and PCB design, we did the soldering, we designed the phone casing, we designed all the IR and RF protocols, we wrote our own firmware and Android app.

Continue reading

Tutorial about USB HID Report Descriptors

This page is from my old website, and it is sort of popular, so I’ve moved it here.

A USB HID report descriptor is one of the descriptors that a USB host can request from a USB device. HID devices send data to the host using reports, and the descriptor tells the host how to interpret the data. I will try to show you how to write one of these descriptors.
Continue reading

GG Button USB Modification

The GG button (link to original website) is a button that yells “GG” when you press it. Similar to the Staples Easy Button.
I modified it so that it has a USB port and it becomes a USB keyboard when you plug it into a computer. When you press the button, it types out a certain key sequence. The key sequence is such that it chats “GG WP” to an opponent in Starcraft II, and then surrenders the game (by pressing F10, then ‘n’).

Continue reading