text: This is a tutorial on how to test WebJack.
  What is WebJack? WebJack is a JavaScript library that allows to communicate with an Arduino microcontroller via headphone jack. There is no need of a usual serial connection via USB or whatever, and therefore no drivers need to be installed. Instead, you can plug a cable into the headphone jack and open a website to begin data transfer. The aim of WebJack is to enable communication between smartphones (equipped with a browser) and Arduinos, without installing additional software on the phone.
  I successfully tested WebJack with a handful of different mobile devices. To get WebJack working with as much devices as possible, I kindly ask for your help on testing at real life conditions!
  What do you need to test WebJack?
  Hardware:
  - Arduino/Genuino (currently only tested with the Uno)
  - 3 resistors
  - 1 capacitor
  - a 4-pin headphone connector (tip-ring-ring-sleeve)
  Software:
  - Arduino IDE of your choice
  - SoftModem library
  Everyone not equipped with an Arduino can switch to this alternative tutorial.
  Now these are the steps to get it running:
  1. Install SoftModem to your 'libraries' directory
  Get the pre-configured version from the webjack branch:
  2. Load this sketch to the Arduino
  #include <SoftModem.h> SoftModem modem = SoftModem(); void setup() { Serial.begin(115200); Serial.println("Booting"); delay(100); modem.begin(); } void loop() { delay(150); uint8_t c[7] = {'W', 'e', 'b', 'J', 'a', 'c', 'k'}; modem.write(c, 7); }
  It will repeat sending "WebJack" all the time.
  3. Patch the hardware together
  Use this circuit at your own risk. Just want to make sure I'm not responsible if you damage your phone or your Arduino ;)
  Ring 2 is the one closer to the sleeve. The resistors and the capacitor don't necessarily have to be of exactly the same values. I've build the circuit with three resistors of 1k Ohm and it worked well, too. The sum of R1 and R3 should not be much less than 1k Ohm. You also don't need a jack as pictured above, I just ripped of a cable and connected the wires of ring 2 and sleeve.
  Here is a photo of my setup:
  4. Plug in the headphone connector
  ...and visit the demo page of WebJack. Here's a QR code for that, so you don't have to type it:
  Hint for Safari users: please switch to Chrome/Firefox/Opera. Safari does not support WebRTC yet.
  The browser may ask if you permit to take recordings from the microphone: answer 'yes'. You should see the string "WebJack" ocurring multiple times in the "Received Data" box. If nothing appears after a couple of seconds, or if the output is very cryptic text, the test failed. Else, it was successful and you can skip the following step.
  5. Feedback
  Nothing appeared in the mentioned box? Then please go to this WebRTC recorder and record for about 5 seconds. Please save the recording and attach it with this information about your setup in the comments:
  - resistor/capacitor values
  - smartphone model
  - browser
  That's it, thank you for your help! And of course I would also love to hear your feedback and suggestions in the comments if the test was successful!
  45 Comments
  Hi Richard, These are great instructions! I don't have experience to read the wiring diagram, and can't tell from the photo exactly what the significant positions are on the breadboard, so i'm not sure if i can test this for you. I'll ask folks in my lab, but maybe you could upload another photo?
  Is this a question? Click here to post it to the Questions page.
  Reply to this comment...
  Log in to comment
  Hi Liz, thanks for your feedback! You can click on the photo to get a larger version. There the connections are visible more clearly. I'll see if I can get it even sharper.
  Reply to this comment...
  Log in to comment