I've been messing around with Bluetooth Low Energy on a few projects lately. There's some fun stuff out there, but like a lot of embedded stuff it can be a bit tricky in a non-Windows environment (I run Linux whenever I can.)

The BL-600SA

One module I've come across is the Laird Technologies BL-600 Series. The BL-600SA is a complete, FCC module certified, Bluetooth Low Energy systems-on-a-chip. It costs $13US in single quantity at Digikey.

BL600-SA Modules

Inside the metal can the BL-600SA is actually a Nordic nRF51822 Cortex M0 microcontroller with built in Bluetooth Low Energy, bundled with its supporting components and a chip antenna.

Here's the breakout I made for my BL-600, a sort-of-prototype for a miniature BLE tag tracking application:

The terrible soldering and bent pins are included at no charge!

The terrible soldering and bent pins are included at no charge!


I haven't published this board design as it's pretty terrible, knocked together in an evening. Its mechanical dimensions only allow you to use either the coin cell battery or solder on the breakout headers, never both. Oops!

If you're looking for a nicer development board which breaks out the pads on the BL-600SA, fellow Melbournite Luke Weston has a very nice open source BL-600SA breakout board with onboard USB-Serial.

Luke Weston's BluetoothModule
Luke Weston's BluetoothModule

Programming Options

Ideally, you'd program the BL-600 the same as its host nRF51822 processor. The in-circuit SWD programming & debugging interface of the nRF51822 is broken out on the module's pads. As far as I can tell if you have access to the (non freely available) Nordic SDK then you can program it directly.

For the rest of us, Laird provide a freely available (though proprietary) programming environment just for the BL-600 - "SmartBASIC". It feels a lot like a hardware vendor making software. The BASIC-derived syntax is weird and unforgiving. A shame, when there are options like Lua, MicroPython and Python-on-a-chip out there under permissive licenses.

The program used to interact with the BL-600 modules is Windows only. It hides the mouse pointer when in focus(!), uses contextual menus as its main interface, and feels like it was not usability tested on anyone outside the core programming team.

Despite the poor software environment, SmartBASIC does have many redeeming features. It allows you to program nearly all the available hardware (I couldn't seem to use the Watchdog Timer, which I think would allow the absolute lowest power consumption.) It has quite a neat "virtual filesystem" abstraction over the internal flash, allowing multiple programs and "data files" to be uploaded and downloaded independently over a serial link. The documentation for SmartBASIC is fairly comprehensive. The Laird people have been very friendly and helpful.

Introducing blutil.py

Although Laird's SmartBASIC software is Windows only, the actual BASIC cross-compilers are simple standalone command line Windows executables that the main GUI calls out to. I've written a small Python script "blutil.py" to allow the BL-600SA to be programmed in SmartBASIC from the command line. "blutil.py" can transparently use wine to run the compilers under Linux, and it should work with wine under OS X as well. At this stage it's only been tested in Linux.

To use blutil.py

  • Install Python 3 for your platform.

  • Install Pyserial for your platform, as it's not part of Python itself. The Debian/Ubuntu package to install is "python3-serial".

  • Visit the Laird BL-600 series home page, click on the Software Downloads tab half-way down the page, and download "Laird UW Terminal version 6.93 including Xcompiler". EDIT: You now need to register and log in for this download, it used to be freely available.

  • Clone the blutil.py repository from github, or just save the single blutil.py file directly.

  • Unzip the contents of the zip file into the same directory as blutil.py. There should be a bunch of executables with names like "XComp_BL600r2_4E68_C700.exe".

  • Connect your BL600 serial port to your computer somehow.

  • Test blutil.py from a command line by listing any existing "files" stored on the module

blutil.py -p /dev/ttyACM0 --ls

Replace /dev/ttyACM0 with the name of the serial port (something like COM3 on Windows.)

Output should look like:

Resetting board via DTR...
Listing files...

  • Create a new "SmartBasic" file, helloworld.sb, in a text editor:
print "Hello World"
  • Compile, load and run the SmartBasic file:
blutil.py -p /dev/ttyACM3 --run helloworld.sb

Output will look like:

Resetting board via DTR...
Detected model BL600r2 CA0D 1DA6
Performing compile, load, run for helloworld.sb...
Compiling helloworld.sb with XComp_BL600r2_CA0D_1DA6.exe...
Compilation success
Uploading helloworld.uwc as helloworld
Upload success
Running helloworld...
Hello world
Program completed successfully.


  • Use --help to see the other options - there are options to just compile or upload files to the device, list files, remove files and "format" the uploaded files area. There are still lots of SmartBASIC "interactive commands" not supported, see the SmartBASIC documentation for details. Although a lot of them are probably better used from inside a terminal program.

  • Find a bug? Please raise an issue. Have an improvement/fix? Pull Requests welcome!.

To branch out further, the Laid BL-600SA firmware download comes with many SmartBASIC example programs to work from. You have to register for that download, but it's also free.

13 thoughts on “Laird BL-600 modules outside Windows

  1. You don’t really need proprietary Nordic SDK to program that part. Latest OpenOCD from master supports nRF51(unfortunately now only with ST-Link). The only proprietary blob that you might need is a SoftDevice stack(BLE stack implementation)

    • Totally true, I’ve bee messing around with OpenOCD on this nrf51 as well. There is even a project that (I think) will allow you to write C code that interfaces with most of the hardware (including SoftDevice) without any Nordic headers/libraries, or the need to go bare metal: https://github.com/mrquincle/bluenet .

      As for a completely open source solution, I’ve got some ideas in the pipeline…

    • I didn’t experience any, I saved the Laid firmware and the UICR registers in case I needed to roll back and then issued an “erase all” operation.

  2. Hello,
    thank you for this article

    Please note that the

    “Visit the Laird BL-600SA home page, click on Documentation, then scroll down to “Utilities” and download “Laird UW terminal”. Here’s a direct download link.”
    Links to a page that doesn’t exist anymore


    • Hi Anton,

      In theory, if it works with the standard Laird software then it should work here (because we’re using the same compiler, etc.) The BL-600SA has a “DTR” pin so I’d assume that works like you’d expect, but I’ve never personally used it.


  3. Hi! I’m trying to use your Python script under Ubuntu 14.10 with my BL600-ST module built in the DVK-BL600-V03. I’m getting the next error in the terminal.

    sudo python blutil.py -p /dev/ttyUSB0 –run hello.sb
    Resetting board via DTR…
    Traceback (most recent call last):
    File “blutil.py”, line 209, in
    File “blutil.py”, line 189, in main
    File “blutil.py”, line 56, in detect_model
    model = self.read_param(0)
    File “blutil.py”, line 53, in read_param
    return self.writecmd(“I %d”%param).split(“\t”)[-1]
    File “blutil.py”, line 43, in writecmd
    return str(response, “ascii”)[:-3].strip()
    TypeError: str() takes at most 1 argument (2 given)

    • Hi grenier,

      Sorry I somehow missed this comment when you posted.

      The cross compiler is Windows only, or it was last time I checked. But the executables are simple command line ones, and they run fine under wine without any special setup required. The blutil.py script automatically wraps the calls to the cross compiler with ‘wine’.


  4. Thanks for putting this together!

    I made some additions that conditionally strip debug-type UART output statements from temporary copies of the source files before compilation to reduce the size of the binary. This allows me to keep these statements in my code modules for dev and testing, but strip them out when I compile my full application to stay within the available flash storage. Let me know if you’re interested in that functionality.

Leave a Reply

Your email address will not be published.