damien's picture

iPhone Hacks source code!

Sun, 04/12/2009 - 22:39

iphone hacks book cover

The iPhone Hacks book is available in bookstores everywhere as of April 2009. Click on the image to go the O'Reilly website.

This page contains links to source code, addendums, and other materials related to the book.

Download the full hack materials here:

Book Content in single archive

If you would prefer to just grab a specific hack, here are the files.

Individual hacks:

Hack 12.16 - Control the Physical World with an iPhone

Hack 12.20 - Infrared Remote

Hack 12.21 - Serial Modem

Hack 12.22 - Keyboard

You'll also want:

iPhone Source code (with both the Serial Modem code and Keyboard code):

iPhone Source Code

If you're planning to modify the firmware for the Serial modem and keyboard hacks, you'll want the project files that are used with the Cypress PSOC Developer Studio:

Serial modem firmware project files
Keyboard firmware project files

April 4, 2009 - We also created a second, improved schematic after the release of the book that includes the IR hack, the serial modem, and the keyboard hacks:

Schematic Version 2

  • Posted by: Stephen
    on Thu, 04/23/2009 - 20:14

    We made PCB's to help you out! For hacks 12.21 and 12.22, you can buy pre made boards at our e-commerce portal, www.droidsupply.com. Here's the full product link: http://www.droidsupply.com/index.php?l=product_detail&p=6

  • Posted by: Anonymous (not verified)
    on Tue, 05/12/2009 - 21:03

    The iphone serial FSK Terminal project does not compile. It has 47 errors and 22 warnings. It is missing several files, including AudioSignalAnalyzer.h, PatternRecognizer.h, AudioQueueObject.h. Can you help please?

  • Posted by: Anonymous (not verified)
    on Wed, 05/20/2009 - 11:49

    The compile error happened because I didn't realize that you need to have the IR folders under the same parent as the serial FSK Terminal folders.

  • Posted by: Anonymous (not verified)
    on Fri, 05/22/2009 - 14:30

    Why 2 iPhone ports?

  • Posted by: Andrew (not verified)
    on Mon, 08/03/2009 - 10:10

    Is there a component list somewhere that would let me know what else I would need to purchase besides the pre-made board listed on droidsupply?

  • Posted by: John Goodman (not verified)
    on Fri, 08/14/2009 - 07:34

    It would be helpful for me (and others too, I imagine) to have a schematic for the IR-to-microphone circuit described in Hack 12.20.

    The text explains what to do, but the risk of blowing out my iPod touch microphone circuity makes me hesitant.

    Working with the description in words and deciphering row values on the Fig 12-135 breadboard photo is error prone. A nice schematic diagram would be better.

    Thanks for your support, and clever projects.

  • Posted by: Anonymous (not verified)
    on Thu, 08/27/2009 - 12:46

    Sorry your code for the reading infrared remote does not compile under SDK 3.0... error: type of accessor does not match the type of property "PulseData" and error: incompatible types in initialization

    BTW --- Great job on the hacks :)

  • Posted by: Anishvg (not verified)
    on Wed, 10/28/2009 - 06:43

    can i buy complete hardware device for hack 12.21 from somewhere ??

  • Posted by: Aegis (not verified)
    on Tue, 11/10/2009 - 12:48

    For Hack 12.18, is there a cable now available for purchase that does the dock to serial connection? Prefer just to buy in lieu of building since we may need quite a few of these.

  • Posted by: tomyuen007
    on Thu, 11/26/2009 - 09:45

    i brought the book from micro center and i want to know if the following will work in the sdk 3.0?

    Hack 12.20 - Infrared Remote

    Hack 12.21 - Serial Modem

    Hack 12.22 - Keyboard

    i am mostly interested in the serial modem and i really want to
    do the iphone develoopment with some serial access.

    best regards,

    thomas yuen

  • Posted by: Tim (not verified)
    on Wed, 12/09/2009 - 02:47

    Hi Thomas,
    Are you able to report any success yet? Have you achieved serial success!

  • Posted by: tomyuen007
    on Thu, 12/10/2009 - 19:15

    have not yet tried but i will try it out as soon as i have a day or so free up. what about you? the problem is not the firmware for i can just do the same decoding on a different mcu but the apple code may be a bit of problem since i do not have mac..

    what about you?

    by the way, do you know the psoc part number? may be i just use the psoc.

    also feel free to contact me at tomy...@gmail.com

    best regards

  • Posted by: paul (not verified)
    on Tue, 12/22/2009 - 15:59

    I've installed PSoc Programmer and PSoc Designer. I downloaded the Serial modem firmware project files above and when I open the "iPhoneModem.cmx" file I get an error message.

    Invalid project structure

    Name of folder that contains project's '.cmx' file must match '.cmx' file name.

    Help anyone? What am I doing wrong here?

  • Post new comment

    The content of this field is kept private and will not be shown publicly.
    • E-Mail addresses are hidden with reCAPTCHA Mailhide.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
    • Lines and paragraphs break automatically.

    More information about formatting options

    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.