Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: HOWTO: Using libusb on iOS 5 with the iPad Camera Kit
is a discussion within theFile Mods
forums, a part of theiPhone Modding
section;Libusb is an open-source C library for creating drivers for USB devices across different OS's and devices. It also works on iOS, although, I have never seen any tweaks/apps using
...-
01-30-2012, 03:45 PM #1iPhone? More like MyPhone
- Join Date
- Sep 2009
- Location
- Netherlands
- Posts
- 134
- Thanks
- 7
- Thanked 26 Times in 19 Posts
HOWTO: Using libusb on iOS 5 with the iPad Camera Kit
Libusb is an open-source C library for creating drivers for USB devices across different OS's and devices. It also works on iOS, although, I have never seen any tweaks/apps using it. You could, for example, tweak some dj app to work with your USB turntable or you could make your game controller work for games.
Requirements:
- You have a jailbroken iDevice(with openSSH) and the iPad Camera Kit (I have only tested with iPad 2, but it should work on iPhone 4 too)
- You have Xcode with the iOS 5 SDK installed.
- You are able to make a tweak/program for a jailbroken iDevice
- You know how to use libusb
1. Make a symlink to IOKit.
In Terminal: (Change this according to your OSX and iOS version)
2. Download the newest libusb. (1.0.9b3 at the time of writing; 1.0.8 doesn't work as far as I know)Code:sudo ln -s /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/IOKit.framework/Headers /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/IOKit.framework
In Terminal:
3. Download build-ios.sh and put it in the libusb folder.Code:$ git clone git://git.libusb.org/libusb.git
build-ios.sh.zip
4. Build libusb.
In Terminal:
5. Copy the content of libout to /usr/lib/ onto your iDevice.Code:$ ./autogen.sh $ chmod 775 build-ios.sh $ sudo ./build-ios.sh
6. Also copy the content of libout to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/ on your mac. (change this for your iOS version)
7. Copy libusb.h from the libusb folder(so libusb/libusb) to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/ on your mac.
8. Build your libusb app/tweak with this SDK and put it onto your iDevice. (don't forget to add -lusb-1.0 to the compiler flags)
9. Copy your app(or the app you tweaked) from /private/var/mobile/Applications/***/ to /private/var/stash/Applications/ to circumvent sandboxing restrictions.
10. Respring and connect the device to your iDevice with the Camera Kit. Your app should be able to access an USB device.
Important: I don't take responibility for any malfunctioning related to this howto.Last edited by koekje00; 01-30-2012 at 03:49 PM.




LinkBack URL
About LinkBacks
Reply With Quote