
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
A tool to pair your Sixaxis controller with an arbitrary Bluetooth device. A more readable and more usable Ruby port of sixpair.c
This was written by Rob Fletcher, but I looked at sixpair to figure out the USB stuff.
All this tool will do is tell your Sixaxis controller who it's Bluetooth master is. This is often called pairing. This should work with stock Ruby that comes with all OS X installations.
With USB devices, you can just plug it in, and it will send data. It knows where to go, just follow the wire. With Bluetooth, you need to jump through a few hoops in order for the device to know where to send data. Most devices make this easy... you can scan for Bluetooth devices, find the one you want, and you're good. The PS3 didn't really have to, since the Sixaxis controller came with a Mini-USB port, so you could just plug it into your PS3, it would pair itself silently, and when you unplugged it would remember where to send the data.
If you want a PS3 controller to send data to something ELSE (like a phone or a tablet) it can be bit more awkward. If you have a device without a USB port, it's entirely awkward.
That's what this will do. I have a Nexus 4 and it has a very useless USB port, but I wanted to pair my Sixaxis with it. The tools for Linux and OS X linked to from Dancing Pixel Studios weren't the greatest. I can't even remember why I gave up trying to build the tool, but I think it was the super-old version of libusb that was required.
But if you just plug your PS3 controller into your computer (I've only tested this on OS X) and run this, you can tell it to pair with any Bluetooth device address you want. I put in my phone's Bluetooth address (helpfully listed right from the Sixaxis app or if you dig into your settings. I suspect that's what most people will use this for.
All this does is pair the controller with something. It's not a driver. The thing you're pairing your controller with has to know what to do with the device. So if you're using this for an Android device, that probably means you need to root your phone and buy the super handy Sixaxis.
I don't know what it takes to get a Sixaxis controller paired via Bluetooth to be recognized by whatever OS you've got, but this won't do it.
TODO: Install the gem... that should do it once that's done
So, you know your phone's Bluetooth address. Let's say that it is aa:bb:cc:dd:ee:ff
.
This will be your usecase 99% of the time.
ruby -Ilib bin/dozen pair aa:bb:cc:dd:ee:ff
(lol I didn't set it up as a gem yet)So now you have 3 sixaxis controllers and want to use them all on your phone at once. Hopefully you also have an HDMI dongle, but that is beyond the scope of this document.
You could do the usage step 3 times, but ol' flubby was thoughtful enough to add an --all
flag!
ruby -Ilib bin/dozen pair --all aa:bb:cc:dd:ee:ff
All right then fancy pants. Now you have ... 18 Sixaxis controllers and you only want to pair one them with your phone.
ruby -Ilib bin/dozen list
ruby -Ilib bin/dozen pair aa:bb:cc:dd:ee:ff --index 4
(yeah yeah, gemspec something...)FAQs
Unknown package
We found that dozen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.