Getting Started with nRF Studio Go on OSX and Linux

Alasdair Allan edited this page Jun 14, 2014 · 23 revisions

Nordic's tool for creating custom services on their radios is called nRFGoStudio. It runs only on Windows. Since none of us are Windows users, we had to get it to run on OSX or Linux. Sandeep got it running using PlayOnMac](http://www.playonmac.com/en/) using the following steps.

Here's a screencapture of the whole process. The video will download because we don't know how to embed video in markdown. Patches for this accepted.

Screen Capture

  1. Download and install PlayOnMac
  2. Download nRFGoStudio installer (32-bit) version 1.16.1. Note that 1.17.0 crashed on OS X 10.9 as of 2014-06-09, so we used 1.6.1 for stability.
  3. Open PlayOnMac disk image and drag PlayOnMac to the Applications folder: Screenshot: PlayOnMac disk image
  4. Eject the PlayOnMac disk image.
  5. Open PlayOnMac from the Applications folder. PlayOnMac will run you through a setup wizard: Screenshot: PlayOnMac first use PlayOnMac requires a number of extra elements, including Microsoft fonts, XQuartz, and X11, if they're not already installed on your system. When it asks you to install those elements, let it do so, and it'll do it automatically. You'll have to agree to the end user license agreements for the fonts, XQuartz, and X11 as you go. Screenshot: PlayOnMac installing Microsoft fonts
  6. When all the dependencies are installed, you'll get to the main PlayOnMac screen: Screenshot: PlayOnMac main screen
  7. Now you're going to install nRFGoStudio under PlayOnMac. Click on Install and you'll get the PlayOnMac Install Menu: Screenshot: PlayOnMac install menu
  8. Click on Install a non-listed program. PlayOnMac will instruct you to leave the default location, and to not tick the checkbox 'Run the program' if asked. Click OK to that. Next you'll get the Manual Install wizard: Screenshot: PlayOnMac manual install wizard
  9. Click next, and you'll get asked to either Install a program in a new virtual drive, or to Edit or update an existing application. Choose the former: Screenshot: Install a program in a new virtual drive
  10. Then you'll be asked to name your virtual drive. We're calling ours nRFGoStudio, but you can call yours anything you want. Screenshot: Name your new virtual drive
  11. When you're asked "What would you like to do before installation?", leave all options unclicked and click Next: Screenshot: Before installation
  12. PlayOnMac will now make a new virtual drive. When it's done, it'll ask you to pick a file to run. Click Browse, and you'll get a file browser. Browse to the nRFGo installer (probably in your Downloads folder) and select it. Then click Next: Screenshot: Browse for the file to run... Screenshot: ...And select the nRFGoStudio installer.
  13. This will open up the nRFGoStudio Installer. Confirm that you want to install it, and agree to the end user license agreement: Screenshot: Confirm installation of nRFGoStudio.
  14. When you're asked to choose the setup type, pick Typical, then click Begin. Screenshot: Choose a typical install of nRFGoStudio.
  15. You'll also need to install the JLink OB CDC Driver package to install virtual serial ports for PlayOnMac. Let the installer run and agree to the end user license agreement: Screenshot: Install JLink CDC driver
  16. When asked for the install location, you can go with the default. After that, click Install and the CDC drivers will be installed. Screenshot: CDC drivers installed
  17. Next, PlayOnMac will ask if you want to make a shortcut. Choose nRFGoStudio.exe and click Next. This will create a shortcut to launch nRFGoStudio on your Desktop, so give it any name you want, or stick with the default, nRFGoStudio: Screenshot: Make a shortcut
  18. Finally, choose I Don't Want To Make Another Shortcut and click Next: Screenshot: CDC drivers installed
  19. You'll get the main PlayOnMac screen, with nRFGoStudio as an item you can launch. Now you're ready to launch nRFGoStudio to make some custom Bluetooth LE services. Screenshot: nRFGoStudio installed!

Creating Custom Services with nRFGo Studio

The nRF8001 radio does not let you define services and characteristics directly from your Arduino code. Instead, they must be defined in nRFgo Studio.

Follow this example to generate the services.h configuration file for the LED service example.

Screen Capture

Once you have generated the services.h file which defines the services and characteristics,

  1. Add a new tab to your Arduino project containing the services.h file

  2. Then go ahead and modify the generated services.h:

Change:

#include "hal_platform.h" 
#include "aci.h"

to:

#include <stdint.h>
#include <hal_platform.h>
#include <aci.h>

See the LED service example for further details.