Avatar for tomgidden


Member since Jan 2014 • Last active Jan 2014
  • 1 conversations

Most recent activity

  • in Tutorials
    Avatar for tomgidden

    Gah. Just to clarify: yes, that was me. For some reason, I can't log in as me other than via Chrome.

  • in Tutorials
    Avatar for tomgidden

    If you have more than one Espruino with the standard HC-05 Bluetooth attached, it can be a little confusing as they may all have the same name, HC-05, appearing on the PC. Also, by default they'll have the same default passkey, 1234, which you'll probably want to change.

    You can reconfigure the name and passkey by connecting to the HC-05 Bluetooth module from the Espruino itself, but to do so you'll need to put it into Command Mode. NOTE: This change is persistent, in that if you change it to something weird or you forget the new passkey, you'll need to repeat all this to change it back. (Also, don't blame me if it goes wrong...)

    1. Wire Pin 34 on the HC-05 to 3.3V. I did this by temporarily soldering on a wire and clipping it to the 3.3V pin on the Espruino. The pin is the one at the top right corner when viewing the HC-05 with the squiggly antenna trace at the top. In other words, it's the pin marked with the orange dot here:

    2. Connect the Espruino via USB to your PC. As the HC-05's Pin 34 is high on reset, it should put the HC-05 into Command Mode.

    3. Connect to the Espruino via the Web IDE as normal.

    4. As you've connected via USB rather than Bluetooth, the HC-05 itself is now on Serial1, in Command Mode and configured at 38400 baud.

    5. Run:

      Serial1.onData(function (d) {console.log(d.data);});


    1. Power down, disconnect, unsolder the pin.

    2. Power up the Espruino via a power supply (rather than via PC's USB port)

    3. It should now be available to pair under the new name Espruino1 and passkey 1701!

    Additional note: at the time of writing, on Mac, the Web IDE won't list Bluetooth serial ports, due to a limitation in Google Chrome. Instead, you have to fool Chrome into thinking it's a USB serial port by creating a symbolic link.

    To do so, pair the device, start Terminal.app, and do something like:

    cd /dev
    ls tty*

    Recognise the desired tty (eg. tty.Espruino1-DevB if following the instructions listed above) and:

    sudo ln -s tty.Espruino1-DevB tty.usbmodem1701

    Refresh the Web IDE's connection list. It should show the device under the name tty.usbmodem1701. You'll need to replace the tty.Espruino1-DevB in the command above with the correct name chosen in the reconfiguration steps above.

  • in General
    Avatar for tomgidden

    Neat albeit hacky solution... if I'd thought about it a bit more, I'd've tried a symlink too. :)

    The disconnection seems to occur after roughly 30 seconds after pairing. However, I just tried it with the IDE and the symlink and it looks like it reconnects successfully. Oh, now it looks like it reconnects okay using "screen" as well... which I'm sure it wasn't doing before. Hrngh.


  • in General
    Avatar for tomgidden


    I just received my four-pack with bits, and first things first, connected via USB, upgraded the firmware, disconnected and soldered on the two HC-05s as described in the tutorial. Via USB, it all works fine. However, via Bluetooth, connecting the IDE seems impossible.

    Now, I can connect to it via command-line screen /dev/tty.HC-05-DevB 9600, but not via the IDE: after "Refresh Serial Port List", only the generic /dev/{cu,tty}.Bluetooth-{Incoming-Port,MĀ­odem} ports appear. I suspect this is a lack of an appropriate pattern-match.

    This is on OS X Mavericks 10.9.1. I've tried this with two Espruinos with the two supplied HC-05s, powered via a known good USB power supply (the one RS supplies for the RPi).

    (Also, I figure this is a limitation of the Mac Bluetooth UI, but if left unused the Bluetooth device disconnects after a little while and won't come back. This is via the Bluetooth preferences panel: it goes to "Not Connected" and there's no clear way to get it to connect again.)

    Lovely little boards, by the way! Can't wait to think up a use for mine. :)