How to get the BLED112 to connect to 8 devices


I’ve been helping a customer get 8 Mooshimeters connected through a BLED112 dongle using the Python API through a BLED112. The user found they were only able to connect to 3 Mooshimeters maximum, which seems odd because I know the BLED112 is based around the CC2540 (same chip as the Mooshimeter uses), which can support up to 8 simultaneous connections.

I tracked the issue down to a problem in the BLED112 firmware itself, and have amended that firmware to allow connection to more than 3 BLE devices. I’ve tested with 5 units so far (that’s as many as I have at my desk at the moment) and am successfully aggregating data from all 5 units to a single logfile.

Upgrading BLED112 Firmware

BlueGiga decided to artificially limit the number of simultaneous connections available on the BLED112.  Why?  I have no idea.  But since the BLED112 is just a portable version of their BLE112 development board, it’s quite easy to update the firmware on it.


To follow these instructions, you’ll need:

  1. BLED112
  2. Windows 7 or later computer
  3. The BlueGiga Software Stack
    1. The default installation settings worked fine for me

Recompiling the Firmware

The goal of this section is to produce a new firmware binary to load onto the BLED112.  If you want to skip this section, here is the one I made that will connect to 8 Mooshimeters.  Use this as the input file for the next section, “Loading the Firmware to the Dongle”.

  1. Open C:\Bluegiga\ble-1.6.0-140\example\dkble112\usbcdc\config.xml in a text editor.
  2. Change the line that reads
    <connections value="3" />

    to read

    <connections value="8" />
    1. Yes, this is the only change.  It seems like such an arbitrary restriction it made me slap my forehead.
  3. Open a command prompt and navigate to C:\Bluegiga\ble-1.6.0-140\example\dkble112\usbcdc
  4. Rebuild the project with the command “..\..\..\bin\bgbuild.exe project-ble112.bgproj”.  The output should look like this:

  5. That’s it!  Your new firmware file is the hex file in the usbcdc directory.

Loading the Firmware to the Dongle

Now that we have a patched firmware image, we need to load it to the BLED112.  For this task we will put the dongle into a special bootloader mode, send the new firmware, and reboot the dongle.

  1. Connect the BLED112 to your computer
  2.  Run ble2gui.exe .  In the default installation of the BlueGiga Software Stack, it’s in C:\Bluegiga\ble-1.6.0-140\bin
  3. Select the correct COM port from the dropdown (A) and click the “attach/detach” button (B).  The badge to the right of the button should turn green and say “Connected”

  4. Select “Commands->DFU”

  5. In the new DFU window, click “Boot Into DFU Mode”.

    This will reboot the dongle into a special mode where it can receive firmware.  It will enumerate to your PC as a different kind of device (not a COM port).  You can check to make sure the DFU reboot has been successful by opening the device manager and looking for “BlueGiga Bluetooth Low Energy DFU”

  6. Select the firmware image to load on to the dongle by pressing the “Browse” button.  If you built your own following the section above with default settings, the image will be at C:\Bluegiga\ble-1.6.0-140\example\dkble112\usbcdc\out-ble112.hex.  If you downloaded the one I built, unzip the hex file and put it somewhere accessible.
  7. Press the “Upload” button.  If successful, your window should look like this:

  8. You’re finished!  Enjoy your newly enhanced BLED112.

3 Responses to “How to get the BLED112 to connect to 8 devices”

  1. sheikh September 8, 2020 at 4:12 am #

    very informative and well explained.
    Can you do a tutorial for bleuIO . here is the product

  2. Phermanspmc September 9, 2020 at 6:07 am #

    This is incredibly helpful, thanks so much for the post!
    The directory path in Recompiling the Firmware step 4 text is missing the “bin” sub-directory, shown in your figure.

    • James October 13, 2020 at 11:22 am #

      Good catch, thanks!

Leave a Reply