Git Product home page Git Product logo

mfiwrapper's Introduction

Currently supported controllers

  • DualShock 4
  • Wii Remote
  • Wii U Pro Controller

Issues

  • Controllers can be iffy with regard to pairing or connecting; it may be necessary to attempt it multiple times, but once the connection is established there should be no issues with usage.
  • DualShock3 controllers are currently unsupported.

Pairing

You can pair devices using the normal bluetooth pairing method. Currently it may be necessary to attempt pairing many times before it will stick.

DualShock 4: Press and hold the Share and PlayStation buttons until the light bar begins flashing rapidly. Wii Remote / Wii U Pro: Press the red sync button located on the back of the controller.

Connecting

You can connect a paired controller to your device using normal means.

DualShock 4: Press the PlayStation button. Wii Remote / Wii U Pro: Press any button.

Building

  • iOS building is handled by theos. (http://iphonedevwiki.net/index.php/Theos)
  • Set the THEOS environment variable to the path where you installed theos.
  • Copy the Headers directory from an OS X version of IOKit.framework to MFiWrapper/IOKit/.
  • Copy the file System/Library/Frameworks/IOKit.framework/Versions/A/IOKit from a iOS SDK to MFiWrapper/libIOKit.dylib.
  • Run 'make'

Installing

  • Run 'make package' and install the resulting .deb file on your device.
  • As the 'mobile' user on the device, run 'killall BTServer'.

TODO

  • Fix odd timeouts that occur when pairing or connecting a controller.
  • Test BTServer patches on older versions of iOS.
  • Allow pairing of DualShock 3 controllers.

Technical

In order to facilitate device pairing and connection a cydia substrate tweak is loaded into the BTServer binary. The OS 'read' and 'write' functions are hooked to allow inspection and modification of bluetooth packets.

  • HCI Inquiry Result with RSSI and Extended Inquiry Result events which define a device whose Class of Device major field is Peripheral will have its minor filed set to keyboard. If this patch isn't applied pairing will fail with a device not supported message.

  • HCI PIN Code Request Reply commands set to Wii devices will replace the PIN with the iOS devices BT address.

  • HCI Accept Connection Request commands will have their role parameter switched to master. This is only required for Wii U Pro controllers, but until better device tracking is implemented it will be applied to all devices.

mfiwrapper's People

Contributors

meancoot avatar omgsus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mfiwrapper's Issues

Bundling with new RetroArch release?

Hi there,

I'm planning a new release of RetroArch for next week or so. How far along is the MFIWrapper and can it be used to successfully sync and play games with now for both iOS 6/7?

If further testing is required I can help out.

Issue building in Mavericks

For some reason, only in Mavericks, using theos proper, I'm having issues with:

 Linking tweak mfiwrapper...
ld: library not found for -lBTstack
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/mfiwrapper.dylib.ba964c90.unsigned] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [mfiwrapper.all.tweak.variables] Error 2

I am able to build btstack and btstack examples. But I have to use the separate rpetrich-theos (kept separate, I switch where $THEOS points depending on which I'm building )

I have tried putting build libBTstack.dylib files in ld's search paths with no change.

Again, this only happens in my Mavericks VM.

Hello?

Last commit over a month ago...anybody home?

Not working with Worms3/Sixaxis

I'd be happy to help with some beta testing of this project in the case that I can support.
I'm not sure how much you expect to be working right now, but from scanning the code it looks ready for basic functionality tests.

I have: iPhone4, iOS7.0.4, Worms3, SIXAXIS (non-DS) wireless controller (I also have a DS3 if needed).

Last night I set up Theos, ldid and your source, installed BTstack on my phone and copied libBTstack.dylib to $THEOS/lib; Ran 'make package' and installed the resulting deb on my device.

I changed the setting to use BTstack and fired up the Worms game. Powered on the controller (already paired with the sixpair tool) and:

  • The controller was found (screen changed from "Touch to continue" to "Press A to continue").
  • The player 1 light on the controller did not light up (all lights went off).
  • BTstack icon in my statusbar confirmed that there was a connection.
  • No buttons were responding in the game.

Not sure where to go from here - but let me know if there is any way I can help by providing particular logs etc. I would love to have this working in Worms... the touch controls are a pain in the ass for several of the weapons.

Could there be an added feature to function like Blutrol?

There was a tweak named Blutrol that functioned like MFiWrapper, but it allowed you to screenshot the game and place buttons where you wanted them. It doesn't have to do exactly that, but could there be a way to specify buttons in each game?

DualShock4 pairing and assignment not working

I couldn't get the dualshock 4 to pair using the iOS pairing setup. It just immediately fails and says pairing took too long, after only about 1 second. Retried about 100x and even re-paired to to another host and tried to pair it back in case it was messing up from being already pairs front he previous revision of MFiWrapper (btstack).

So, I can only get the DS4 to pair using wii-pair with btstack, then going back into native btserver pairing and initiating the pair from the DS4 PS button. it asks to allow pair from "wireless controller" and sets itself to the "ready" state (solid white) but never gets assigned a player and thus cannot be used.

I will say, the DS4 re-pairs itself flawlessly. it just stays in limbo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.